From claude-resources
Creates before-push validation script (b4push) that analyzes project for checks (lint, build, test, docs, e2e), generates run-b4push.sh, adds package.json script, and local b4push skill.
npx claudepluginhub takazudo/claude-resourcesThis skill is limited to using the following tools:
Generate a comprehensive before-push validation script for the current project.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Share bugs, ideas, or general feedback.
Generate a comprehensive before-push validation script for the current project.
Read package.json to understand:
check, build, test, lint, format, typecheckdoc/, docs/, website/ directories with their own package.json)generate-* scripts in doc)Common step patterns (adapt to project):
| Step | Command | When to include |
|---|---|---|
| Code quality | pnpm check or pnpm lint && pnpm format | Always |
| TypeScript build | pnpm build | If build script exists |
| Unit tests | pnpm test | If test script exists |
| Doc data generation | cd doc && pnpm run generate-* | If doc site has generate scripts |
| Doc quality checks | cd doc && pnpm run check | If doc site has check script |
| Doc site build | cd doc && pnpm build | If doc site exists |
| E2E tests | Start server + run playwright | If e2e tests exist |
For projects with e2e tests, add server lifecycle management (start, wait for ready, run tests, kill).
Create scripts/run-b4push.sh based on the template in assets/run-b4push-template.sh.
Key patterns:
set -euo pipefail for strict error handlingFAILURES=() array - continues all steps even if some failstep(), pass(), fail() helper functions(cd "$DIR" && command) to isolate directory changesROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)" for reliable path resolutionMake the script executable: chmod +x scripts/run-b4push.sh
Add to package.json:
{
"scripts": {
"b4push": "./scripts/run-b4push.sh"
}
}
Create .claude/skills/b4push/skill.md based on assets/b4push-skill-template.md.
Customize:
pnpm check:fix, cd doc && pnpm check:fix)The skill should have user-invocable: true and allowed-tools: [Bash]. The description must include triggers for automatic invocation on big changes, PR completion, etc.
Run pnpm b4push to verify all steps execute correctly. Fix any issues found.
These projects have working b4push setups: