skills/code-review/SKILL.md
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
npx skillsauth add raddue/crucible code-reviewInstall 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.
All subagent dispatches use disk-mediated dispatch. See shared/dispatch-convention.md for the full protocol.
Dispatch a code review subagent (general-purpose) to catch issues before they cascade.
Core principle: Review early, review often.
Mandatory:
Optional but valuable:
1. Get git SHAs:
BASE_SHA=$(git rev-parse HEAD~1) # or origin/main
HEAD_SHA=$(git rev-parse HEAD)
2. Dispatch code-reviewer subagent:
Use Task tool with subagent_type="general-purpose". Fill in the template at code-reviewer.md in this directory and pass it as the subagent prompt.
Placeholders:
{WHAT_WAS_IMPLEMENTED} - What you just built{PLAN_OR_REQUIREMENTS} - What it should do{BASE_SHA} - Starting commit{HEAD_SHA} - Ending commit{DESCRIPTION} - Brief summary3. Act on feedback and iterate:
4. Re-review after fixes (iterative loop):
After fixing Critical/Important issues, dispatch a NEW fresh code-reviewer subagent (not the same one — fresh eyes, no anchoring). Compare issue count to prior round:
Fresh reviewer every round. Never pass prior findings to the next reviewer.
After dispatching the host code-reviewer subagent, optionally call the external_review MCP tool for an independent second opinion from external models. The preferred pattern is: dispatch the host reviewer as a background Agent first, call external_review, then collect host results — this gives effective parallelism where background agents are available.
Invocation:
Call external_review with:
prompt: contents of skills/shared/external-review-prompt.mdcontext: the same diff and requirements context given to the host reviewerskill: "code_review" (top-level argument for per-skill toggle enforcement)metadata: {"skill": "code_review", "round": N} (traceability; where N is the current review round)Per-skill toggle: The server checks the skill argument against skills.code_review in the external review config. If false, the server returns unavailable.
Graceful degradation:
external_review tool not available (MCP server not running): skip silently.status is "unavailable" (no config or disabled): skip silently.status is "partial" (some models failed): show available reviews, note which models failed.Output format: After the host review output, append each external review in its own section:
## External Review — {provider} ({model_id})
{review content}
Contract INV-1: External review dispatch must never block or delay the host review. If external review times out or fails, the host review stands alone.
[Just completed Task 2: Add verification function]
You: Let me request code review before proceeding.
BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | awk '{print $1}')
HEAD_SHA=$(git rev-parse HEAD)
[Dispatch fresh code-reviewer subagent — Round 1]
Issues: 2 Important (missing progress indicators, no error handling for empty input)
Minor: 1 (magic number)
You: [Fix both Important issues]
[Dispatch NEW fresh code-reviewer subagent — Round 2]
Issues: 1 Important (error handling catches wrong exception type)
Round 2 (1 issue) < Round 1 (2 issues) → progress, continue
You: [Fix the exception type]
[Dispatch NEW fresh code-reviewer subagent — Round 3]
Issues: 0 Critical/Important
Minor: 1 (could use named constant)
Clean — proceed to Task 3.
When code-review is used standalone (not from build, debugging, or finish — those pipelines handle test-coverage automatically), the caller should consider dispatching crucible:test-coverage after code review completes if behavioral changes were made.
This is especially valuable when:
Build Pipeline:
Standalone Plan Execution:
Ad-Hoc Development:
crucible:test-coverage after review if behavioral changes were madeNever:
If reviewer wrong:
See template at: code-review/code-reviewer.md
testing
Standalone instance-bug reviewer — runs a parallel finder fan-out + verify gate over a diff or a path and prints ranked, verified findings. Use when the user says "delve", "find bugs in this diff", "review this for bugs", "scan this file/subsystem for defects", "instance-bug sweep", or wants concrete reproducible defects (not a merge verdict, not systemic health). Works on a PR id, a base..head range, or a path, on any forge (GitHub, GitLab, Bitbucket, self-hosted).
testing
Render the Crucible calibration ledger weekly report — the honest "Crucible caught N silent bugs" headline, verdict breakdown, per-skill severity rates, and the inflation detector. Triggers on "/ledger", "weekly report", "weekly ledger", "caught N", "quality ledger", "calibration report", "render the ledger".
development
The Book of Grudges — cross-session bug graveyard. Every fixed bug is recorded as a structured "grudge"; before touching code, skills query the grudgebook for the files in scope and surface past regressions as forced "DO NOT REPEAT" context. Read mode (pre-flight) and write mode (on bug resolution / fix(*) PR). Machine-local, per-repo, never committed. Triggers on /grudge, "check grudges", "record a grudge", "any past bugs here", "regression oracle", "bug graveyard".
testing
Reconcile the Crucible calibration ledger — walk merged fix/hotfix branches to falsify the originating gating-verdicts, compute per-skill Brier calibration scores, and append a falsification log. Triggers on "/calibration-reconcile", "reconcile ledger", "reconcile calibration", "falsify verdicts", "brier score", "calibration reconcile", "compute brier".