Ask your agent
What it does
This skill has seven code reviewers that each start fresh, so your agent never grades its own work. Includes a bug reviewer, a test reviewer that rejects mocks and fake data, a spec checker, a "is it really done?" checker, a CLAUDE.md / AGENTS.md rules checker, and a debugger that writes a failing test before it fixes anything. The skill picks which reviewers a change needs, runs them in parallel and merges what they find. Use it before you commit, test or deploy, and whenever an agent says a task is done.
SKILL.md
--- name: 'code-review-stack' description: 'Independent reviewers for code work, each run as a fresh subagent. Use before committing, testing or deploying a diff; when a task is claimed "done"; when a test file is created or edited; for a bug you can''t explain from one read of the code; or to check work against the spec or the project''s CLAUDE.md / AGENTS.md.' --- # Code review stack Seven reviewers, each a **cold read**: a fresh subagent that has never seen the author's reasoning, so it judges the work, not the story about the work. The author never grades its own output. Each reviewer's full system prompt lives in `references/`. **Needs** file and shell access to the repo (read files, run `git`, run tests). In a chat-only assistant, paste the diff and the relevant files, and treat each review as limited to what you pasted. | Reviewer | Run it when | Returns | |---|---|---| | `code-reviewer` | Any code change, before running tests, committing or deploying | Verified bugs, `[P0]`-`[P3]`, or LGTM | | `stephen` | Every test file created or edited | Violations of the production-grade test standard | | `bug-architect` | A bug you can't explain from one read: intermittent, environment-specific, cross-service, a performance regression, or a fix that already failed once | Feedback loop, root cause, failing-before and passing-after runs | | `task-completion-validator` | Right after anyone claims a task is "done" | APPROVED or REJECTED | | `karen` | Several things are "done" but the whole doesn't work; you need the real remaining work | Reality assessment plus a prioritized plan | | `jenny` | A spec, ticket or requirements doc exists and you need to know if the build matches it | Gaps: Missing, Incomplete, Incorrect, Extra | | `claude-md-compliance-checker` | Changes in a repo that has a CLAUDE.md or AGENTS.md | PASS/FAIL against quoted project rules | `stephen` is deliberately strict: tests run the real production code on real input files from the project's real-data folder, use no mocks, and save the raw output instead of asserting pass/fail. That standard is the point of the reviewer. Expect it to reject tests most suites would accept. ## Dispatching a reviewer 1. Pick every reviewer whose "run it when" matches. A typical code change gets `code-reviewer`; add `stephen` if tests changed and `claude-md-compliance-checker` if the repo has instruction files. 2. For each, read its file in `references/` in full and start a **fresh** subagent with that file as its instructions. A re-review after fixes is a new subagent too, never a follow-up message to the old one. 3. Give it the inputs, not your conclusions: repo path, base and head refs or the file list, the task or spec as originally written, and the claim being checked. Leave out your own assessment, so the reviewer can't anchor on it. 4. Send independent reviewers in one message so they run in parallel. Run `bug-architect` alone: it changes code, and the others should review its result afterwards. **No subagent tool?** Run each reviewer file inline, one at a time, and tell the user the reviews were not cold reads. For an independent verdict, they can re-run a reviewer in a fresh session. **Done when** every matching reviewer has returned and each of its findings is accounted for in the merge below. ## Merging findings - Deduplicate by root cause: the same underlying problem reported by two reviewers is one finding. Keep the best-anchored `file_path:line_number` and the higher severity. - Map severities onto one scale: `[P0]` = Critical, `[P1]` = High, `[P2]` = Medium, `[P3]` = Low. - Where reviewers contradict each other, check the code yourself and say which one was right. - Project rules win over the spec; the spec wins over general best practice. ## Fixing The reviewers are **report-only**, except `bug-architect`, whose job ends with a fix. - Fix findings in code this change wrote. - Bring findings that would restructure code the change didn't touch to the user as a decision, with the reviewer's evidence. - After fixing, run the same reviewers again as fresh subagents until they come back clean or every remaining finding has a recorded decision. - A REJECTED from `task-completion-validator` or a FAIL from `claude-md-compliance-checker` means the work isn't done, whatever else passed. ## The failing-test-first bug loop For any bug fix, inside or outside `bug-architect`: 1. Write a test that reproduces the bug, and run it before touching production code. 2. Confirm it fails **for the intended reason**: the bug's own symptom, not an import error, bad fixture or typo. If it passes, or fails for another reason, fix the test first. 3. Fix the root cause in the shared code, not in one caller. 4. Re-run the same test, unaltered, and watch it pass. 5. Report both runs by name: the failing-before run and the passing-after run. This regression test keeps its one check on the bug's exact symptom, since that check is what makes the before/after runs mean something. `stephen` still reviews it for real code and real inputs. A test written or edited in this loop goes to `stephen`. To guard against a fix that only satisfies its own test, have a separate `code-reviewer` check that the fix addresses the root cause and not just the one test case.
9 files
- SKILL.md5.2 KB
- references/NOTICE.md2.7 KB
- references/bug-architect.md5.8 KB
- references/claude-md-compliance-checker.md3.1 KB
- references/code-reviewer.md11.5 KB
- references/jenny.md3.3 KB
- references/karen.md3.6 KB
- references/stephen.md3.5 KB
- references/task-completion-validator.md3.3 KB