skills/b4push-wisdom/SKILL.md
Guide for setting up before-push validation (b4push) and CI checking. Covers analyzing project structure, creating run-b4push.sh, adding package.json entry, creating project-specific b4push skill, setting up GitHub Actions CI. Use when: (1) User says 'set up b4push', 'add CI', 'before push checks', (2) Setting up a new project's validation workflow, (3) User wants CI + local validation.
npx skillsauth add takazudo/claude-resources b4push-wisdomInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Set up comprehensive before-push validation and CI for any project. This covers three parts:
Read package.json and explore the project structure to understand:
pnpm-lock.yaml, package-lock.json, yarn.lockcheck, build, test, lint, format, typecheckpnpm-workspace.yaml for sub-packages with their own testsdoc/, docs/, website/ directories with their own package.jsonplaywright.config.*, cypress.config.*generate-* scriptsCommon patterns (adapt to project):
| Step | Command | When to include |
| --- | --- | --- |
| Workspace tests | pnpm --filter "@scope/*" test | If pnpm workspace with test scripts |
| App unit tests | pnpm --filter app-name test:unit | If app has unit tests |
| Code quality | pnpm check or pnpm lint && pnpm format | Always |
| TypeScript | pnpm typecheck or pnpm --filter name typecheck | If TypeScript |
| Build | pnpm build | If build script exists |
| Doc quality | cd doc && pnpm check | If doc site has check script |
| Doc build | cd doc && pnpm build | If doc site exists |
| E2E tests | Start server + run playwright | If e2e tests exist |
scripts/run-b4push.shUse this template structure:
#!/usr/bin/env bash
set -euo pipefail
START_TIME=$(date +%s)
FAILURES=()
step() {
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "▶ $1"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
}
pass() { echo "✅ $1"; }
fail() { echo "❌ $1"; FAILURES+=("$1"); }
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
# Steps here — each wrapped in:
# step "Step N/M: Description"
# if (cd "$ROOT_DIR" && command); then
# pass "Description passed"
# else
# fail "Description"
# fi
# Summary
END_TIME=$(date +%s)
DURATION=$((END_TIME - START_TIME))
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo " SUMMARY (${DURATION}s)"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
if [ ${#FAILURES[@]} -eq 0 ]; then
echo "✅ All checks passed! Safe to push."
exit 0
else
echo "❌ ${#FAILURES[@]} check(s) failed:"
for f in "${FAILURES[@]}"; do
echo " - $f"
done
exit 1
fi
Key rules:
set -euo pipefail for strict error handling(cd "$ROOT_DIR" && command) to isolateMake executable: chmod +x scripts/run-b4push.sh
{
"scripts": {
"b4push": "./scripts/run-b4push.sh"
}
}
Create .claude/skills/b4push/SKILL.md (uppercase — the canonical name; lowercase skill.md causes git dual-tracking / clone collisions on case-insensitive filesystems):
---
name: b4push
description: >-
Run comprehensive pre-push validation covering [list steps]. Use when: (1) Completing a PR
or feature implementation, (2) Before pushing significant changes, (3) After large refactors,
(4) User says 'b4push', 'before push', 'check everything', or 'ready to push'.
user-invocable: true
allowed-tools:
- Bash
---
# Before Push Check
Run `pnpm b4push` from the project root. This executes `scripts/run-b4push.sh`:
1. [Step list with descriptions]
Takes ~[duration]. All steps must pass.
## On failure
1. Read the failure output to identify which step failed
2. Auto-fix what you can:
- Formatting: `pnpm check:fix` or `cd doc && pnpm check:fix`
- Lint: `pnpm lint:fix` or `cd doc && pnpm lint:fix`
3. Re-run `pnpm b4push` to confirm all checks pass
4. Report the final status
If the project uses GitHub and doesn't have CI yet, create .github/workflows/ci.yml:
name: CI
on:
pull_request:
types: [opened, synchronize, reopened]
branches: [main]
push:
branches: [main]
concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
checks:
name: Checks
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: pnpm install --frozen-lockfile
# Mirror the b4push steps here
- name: [Step description]
run: [command]
The CI workflow should mirror the b4push steps so local and CI validation are consistent.
Key CI patterns:
concurrency group)pnpm/action-setup@v4 + actions/setup-node@v4 with no cache: (fresh install from the npm CDN beats cache restore — see gh-actions-wisdom rule 5)pnpm install --frozen-lockfile for reproducible installsrun for clear failure identificationRun pnpm b4push to verify all steps execute correctly. Fix any issues found.
These projects have working b4push setups:
tools
Acceptance gate for a branch produced by an OpenAI Codex CLI run — usually Codex implementing a /big-plan epic that was handed off to it. Codex reports the work 'done' (or the user flags it WIP with corrections); this skill confirms the branch actually fulfils the original spec, fixes what falls short, and routes larger discoveries into GitHub issues. Use when: (1) User says '/finalize-codex-work', 'finalize codex work', 'confirm the codex work', 'check the codex branch', or 'codex said it's done', (2) A branch is the result of a Codex CLI session and needs verification against its spec issue/PR, (3) After assigning a /big-plan epic to Codex CLI. Pass -m/--merge to run /pr-complete -c at the end.
tools
Read a Figma design node directly from a share URL via the Figma REST API — no Dev Mode subscription, no MCP, no desktop app. Renders the node to PNG and dumps its full style/layout JSON so the design can be described, compared, or implemented. Use whenever the user gives a Figma design URL (figma.com/design/... or /file/...) and wants to see, read, inspect, reference, or implement that node — including `/fig-url-refer <url>`. This is the URL-based counterpart to `/figrefer` (which needs a Dev-plan desktop MCP); prefer this one when the input is a URL rather than a live desktop selection.
tools
Sync the user's Claude Code workflow skills into the OpenAI Codex CLI settings repo ($HOME/.codex) as Codex-native ports, fix the Codex .gitignore for new local state, then commit and push. Use when: (1) user says '/dev-codex-sync-settings-from-claude', 'sync codex settings', 'sync claude skills to codex', 'port skills to codex', or 'update codex from claude'; (2) after updating ~/.claude workflow skills (big-plan, x, x-as-pr, x-wt-teams) and Codex should catch up; (3) the $HOME/.codex repo has drifted behind $HOME/.claude. The ports are condensed Codex-native REWRITES, never file copies.
development
Analyze a video file (mov, mp4, webm, etc.) or a YouTube video by extracting still frames with ffmpeg and reading them chronologically with vision — Claude cannot ingest video files directly. Use whenever the user provides a video file path or YouTube URL and wants to know what happens in it: "read this video", "watch this video", "check this recording", "what happens in this .mov/.mp4", analyzing a screen recording of a UI bug, or verifying UI behavior captured in a video, even if they don't name this skill.