/forge:precheckfrom forge
Run local tests before pushing. Catches CI failures locally in 30s instead of 4min round-trip. Usage: /precheck
Ships in forge. Installing the plugin adds it to Claude Code.
Run the mechanical test suite locally before creating a PR. Catches failures in 30 seconds instead of a 4-minute CI round-trip.
Run this EVERY TIME before pushing.
Before running mechanical tests, invoke the /revert-check skill in strict mode:
Skill { skill: "revert-check", args: "--strict" }This catches stale-buffer accidental reverts (post-stash-pop, branch switch, editor history
restore) that would silently undo recently-merged PRs. ~2 second overhead, no network calls
beyond a single git fetch.
If the user has confirmed the deletion is intentional (refactor), they can skip with
/precheck --skip-revert-check.
# What files changed on this branch vs main?
CHANGED=$(git diff main...HEAD --name-only 2>/dev/null || git diff HEAD~1 --name-only)
Based on what changed, run only the relevant suites:
| Files Changed | Suite | Why |
|---|---|---|
hooks/triage-router.sh | --suite 09 | Triage output format tests |
hooks/*.sh (any hook) | --suite 09 | Hook execution tests |
skills/*/SKILL.md | --suite 20 | Skill runtime safety (frontmatter, brackets) |
agents/*.md | --suite 19,20 | Brownfield classification + skill safety |
install.sh | --suite 01,02,03,04,19 | Install flow tests |
portable.manifest | --suite 01,02 | Manifest consistency |
tests/fixtures/** | --suite 19 | Brownfield fixture tests |
| Multiple categories | --mechanical | Run all mechanical tests |
# Must be on a feature branch (test runner refuses main)
BRANCH=$(git branch --show-current)
if [ "$BRANCH" = "main" ]; then
echo "Switch to a feature branch first: git checkout -b fix/my-change"
exit 1
fi
# Run the selected suites
bash tests/run.sh --suite {selected_suites} --scenario a
If all pass:
# Write precheck marker (triage router checks this before allowing /pr)
mkdir -p "$CLAUDE_PROJECT_DIR/.claude"
echo "$(date +%s) $(git rev-parse --short HEAD 2>/dev/null || echo 'unknown')" > "$CLAUDE_PROJECT_DIR/.claude/.precheck-passed"
✓ Precheck passed ({N} tests, {time}s)
Ready to push.
If any fail:
# Remove stale marker on failure
rm -f "$CLAUDE_PROJECT_DIR/.claude/.precheck-passed" 2>/dev/null || true
✗ Precheck FAILED
Failed tests:
{test name} — {failure reason}
Fix these before pushing. Do NOT push with failing tests.
After tests pass, run the full ship sequence. Do NOT ask — just do it.
5.1: Stage and commit (if uncommitted changes exist)
git add {relevant files — never .env or credentials}
git commit -m "{descriptive message}
Co-Authored-By: Claude Fable 5 <[email protected]>"
5.2: Push
git push -u origin {branch}
5.3: Create PR
gh pr create --title "{title}" --body "{body}"
5.4: Merge
# IMPORTANT: Never use --auto. It's not enabled on this repo.
gh pr merge --squash
5.5: Cleanup
git checkout main
git pull
git branch -d {branch}
5.6: Report
✓ Shipped: PR #{number} merged to main
Tests: {N} passed, 0 failed
Files: {changed files summary}
The entire ship flow as a single sequence — test, commit, push, PR, merge, cleanup:
# 1. Test
bash tests/run.sh --suite {suites} --scenario a
# 2. Commit (if needed)
git add {files}
git commit -m "{message}"
# 3. Push + PR
git push -u origin {branch}
gh pr create --title "{title}" --body "{body}"
# 4. Merge (NEVER use --auto)
gh pr merge --squash
# 5. Cleanup
git checkout main && git pull && git branch -d {branch}
| Failure | Cause | Fix |
|---|---|---|
| "classify_file returns IDENTICAL" | Agent fixture is stale — you changed an agent file | Update the fixture: cp agents/{name}.md tests/fixtures/claude-setups/poweruser/.claude/agents/ |
| "regex-unsafe [brackets] in arguments" | Skill frontmatter has [brackets] | Replace [x] with <x> in SKILL.md arguments/description |
| "compact SPEED reminder" | Triage router compact output changed | Update test assertion in 09-triage-router-output.sh |
| "STALE/MODIFIED classification wrong" | Agent grew too much, ratio shifted | Check fixture agent size vs toolkit — restore original fixture if needed |
--suite 19 (brownfield fixtures).--suite 09.~2-5 units per invocation.
Spawn ladder: 0 sub-agents. Inline: /revert-check (linked skill, cost borne there) + tests/run.sh (bash test harness).
Tier weights: Haiku=1, Sonnet=7, Opus=50.
Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub arthtech-ai/sarathi --plugin forge12 commands in this plugin
/docsAudit and generate documentation for skills, agents, and hooks — including full per-skill customer doc pages. Usage: /docs <audit|write|check> <skill-name>/implementSpin up an implementation team from a plan. Usage: /implement <feature-name> <--frontend-only> <--backend-only> <--no-redteam> <--redteam-once> <--redteam-once-strict> <--redteam-strict> <--phase> <--phases> <--all-phases> <--tasks> <--resume-from> <--workflow|--classic> <--decisions off|shadow|enforce>/implementation-planSpin up an adversarial planning team for a feature whose PRD already exists. Reads .claude/specs/<feature>.md, runs the PM + Architect (+ Devil's Advocate) debate, and writes a locked-scope plan to .claude/plans/<feature>.md. Usage: /implementation-plan <feature-name> <--design> <--gtm> <--fast> <--lite> <--sync>/perfRun a performance optimization pass with a cross-functional team. Usage: /perf <scope> <--backend-only> <--frontend-only> <--audit-only> <--deep>/planningGenerate a PRD (product requirements document) for a feature — user stories, journey, edge cases, success criteria — plus an async tech feasibility note from the architect. Includes a design spec HTML by default (use --no-design to skip). Usage: /planning <feature-name> <--no-design> <--gtm> <--sync> <-- brief>/prRun QA, create a GitHub PR, and manage post-merge workflow. Never push directly to main. Optional flags --skip-qa and --decisions off|shadow|enforce.2 plugins in one repository ship this exact command · first indexed Dec 1, 2026