Create B4Push Script
Generate a before-push validation script (scripts/run-b4push.sh), wire it into package.json, and create the project-level .claude/skills/b4push/SKILL.md.
All templates and step tables live in the /b4push-wisdom skill — the single canonical source. Read it before generating anything; do not keep a second copy of the templates here. This skill is the focused "just create the local script + skill" entry point; /b4push-wisdom is the full guide (local script + skill + CI workflow).
Workflow
- Analyze the project — package manager (lockfiles), available scripts (
check,build,test,lint,format,typecheck), doc site (doc/,docs/,website/), e2e tests (playwright/cypress), data-generation scripts. See/b4push-wisdomStep 1. - Determine steps — pick the check steps that apply, using the step table in
/b4push-wisdomStep 2. - Create
scripts/run-b4push.sh— use the template in/b4push-wisdomStep 3, thenchmod +x scripts/run-b4push.sh. - Add the
package.jsonscript —"b4push": "./scripts/run-b4push.sh"(/b4push-wisdomStep 4). - Create
.claude/skills/b4push/SKILL.md— use the project-skill template in/b4push-wisdomStep 5. UppercaseSKILL.mdis canonical; lowercaseskill.mdcauses git dual-tracking / clone collisions on case-insensitive filesystems. Give ituser-invocable: trueandallowed-tools: [Bash], with a description whose triggers fire on big changes, PR completion, etc. - Test — run
pnpm b4pushand fix any issues found.
For the optional GitHub Actions CI workflow and the reference-project list, see /b4push-wisdom.