claude-code-review
Skill11 starsChanged 2 months agoMITView on GitHub
Deep code review via Claude subagent — reviews uncommitted changes by default, loops until no critical issues remain. Use after /qq:test passes, before /qq:commit-push.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- oborchers/proqitheir own version, first seen Sep 25, 2026
- schneidenbach/skillstheir own version, first seen Aug 26, 2026
- imankulov/skillstheir own version, first seen Aug 2, 2026
- thattimc/skillstheir own version, first seen Jul 16, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- oborchers/proqi★ 42same name
- schneidenbach/skills★ 13same name
- imankulov/skills★ 2same name
- thattimc/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-testsSkill
- best-practiceSkill
- bootstrapSkill
- briefSkill
- changesSkill
- claude-plan-reviewSkill
- codex-code-reviewSkill
- codex-plan-reviewSkill
- commit-pushSkill
- depsSkill
- design-researchSkill
- designSkill
- doc-driftSkill
- doc-syncSkill
- doc-tidySkill
- executeSkill
- explainSkill
- full-briefSkill
- goSkill
- grandmaSkill
- planSkill
- post-design-reviewSkill
- self-reviewSkill
- tech-researchSkill
- testSkill
- timelineSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. 0 are common, 14 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
14
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
No arguments: review uncommitted changes (default)
- Very specific: line 17
Default: uncommitted changes: Run git diff --name-only HEAD -- '*.cs' to get the list of changed files.
- Distinctive: line 30
Loop automatically — do not ask the user between rounds: Stop when any of the following is true:
- Very specific: line 38
Before sending the diff to Claude, if qq-policy-check.sh is available, run it on the same changed .cs files first.
- Very specific: line 40
Use the Bash tool with run_in_background: true to run in the background:
- Very specific: line 48
From round 2 onward: If the previous round had findings deemed over-engineered, append --prompt to the original arguments:
- Distinctive: line 55
After the subagent returns, categorize findings by severity:
- Distinctive: line 77
After dispatching all verification subagents, write the expected count to the gate file so the gate knows when all verifications are …
- Distinctive: line 87
Aggregate: After all subagents return, consolidate the results and present each finding's verdict and supporting evidence to the user.
- Distinctive: line 93
After each fix, run a build and tests to verify
- Distinctive: line 94
After all fixes, present a summary of changes to the user
- Distinctive: line 96
Handling test failures: If build/test runs reveal pre-existing failures unrelated to this change, ask the user how to proceed:
- Distinctive: line 99
Do not unilaterally decide "unrelated, skip it" — let the user decide.
- Very specific: line 102
If this round had [Critical] issues confirmed and fixed → automatically start the next round (back to a)
- Very specific: line 103
If this round had no [Critical] issues → output "Review passed" and end the loop
- Distinctive: line 104
If 5 rounds are complete → output final status and end the loop
- Distinctive: line 105
If two consecutive rounds had no new critical issues → suggest ending the loop
- Distinctive: line 110
After the review loop ends (for any reason), clean up the gate marker:
- Distinctive: line 118
After the review loop ends, recommend the next step:
- Very specific: line 124
--automode: run qq-execute-checkpoint.py pipeline-advance --project . - Distinctive: line 130
When fixing, only address the actual issues the review identified — do not opportunistically refactor surrounding code
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Invoke scripts via
${CLAUDE_PLUGIN_ROOT}/bin/<name>. That env var is set by Claude Code for every plugin context and gives the absolute path to the marketplace clone — no PATH or cwd assumptions. Bare-command invocation (e.g.claude-review.sh) is NOT reliable: the plugin never puts its scripts on PATH, so bare calls exit 127.
Respond in the user's preferred language (detect from their recent messages, or fall back to the language setting in CLAUDE.md).
Arguments: $ARGUMENTS
- No arguments: review uncommitted changes (default)
--base <branch>: full branch diff against a base--commits: review only the most recent commit--files "a.cs b.cs": explicit file list
Review Scope Selection (no arguments)
Default: uncommitted changes. Run git diff --name-only HEAD -- '*.cs' to get the list of changed files. This is the most common case — code has been written but not yet committed.
Override order:
- User specified a scope (e.g. "review Phase 8") → follow user intent
- No uncommitted changes but branch has commits →
git diff --name-only develop...HEAD -- '*.cs' - User says "review the whole branch" →
--base develop
Pass the file list to the review script as --files.
Execution Flow
2–5. Automated Review Loop
Loop automatically — do not ask the user between rounds. Stop when any of the following is true:
- No
[Critical]issues in the review result - 5 rounds have been completed
- Two consecutive rounds with no new critical issues
Each round:
a. Send to Claude for Review
Before sending the diff to Claude, if qq-policy-check.sh is available, run it on the same changed .cs files first. Treat those deterministic findings as already-established local policy results. Claude should focus on bugs, behavior, architecture, and anything not trivially captured by deterministic checks.
Use the Bash tool with run_in_background: true to run in the background:
${CLAUDE_PLUGIN_ROOT}/bin/claude-review.sh $ARGUMENTSThe script calls claude -p, with results output to stdout and Docs/qq/<branch-name>/claude-code-review_<timestamp>.md.
Claude CLI review typically takes 2-5 minutes. Using background execution, the system will automatically notify when the command completes — no need to sleep or poll.
Notify the user that the background task has been submitted and will continue processing automatically when complete.
From round 2 onward: If the previous round had findings deemed over-engineered, append --prompt to the original arguments:
${CLAUDE_PLUGIN_ROOT}/bin/claude-review.sh $ARGUMENTS --prompt "Review these code changes using the same criteria as round 1 (bugs, architecture, performance, security, style). Additional context: the following suggestions from the previous round were deemed over-engineered and replaced with simpler solutions: <list items and rationale>. Do not re-suggest more complex approaches unless the simpler version introduces a real defect. Classify by severity: [Critical] [Moderate] [Suggestion]."b. Summarize Review Results
After the subagent returns, categorize findings by severity:
- Critical issues: Bugs, architectural violations, anti-patterns that must be fixed
- Moderate issues: Worth improving but not blocking
- Suggestions: Nice-to-have optimizations
Present the summary to the user. Do not fix code yet — proceed to the verification step first.
c. Independent Verification (required, parallel subagents, gate-enforced)
Review Gate: After the review script runs, a PreToolUse hook blocks Edit/Write on
.csandDocs/*.mdfiles until at least 1 verification subagent completes. This is a mechanical constraint — you cannot edit code until findings are verified.
For each critical and moderate issue, dispatch a subagent to verify it in depth — do not draw conclusions from a quick scan in the main session.
Verify against runtime state, not just source. When a finding is about current behavior (wrong values, missed call sites, broken state), the verifying subagent should query the live Unity Editor through the project's actual channel — not just read source. Work out the channel once (
shared/unity-live-state.md; exact check:qq-unity-cli.py channel --project "$PWD") and put it in each subagent's prompt:
- Official Unity CLI (
Library/Pipeline/.unity-pipeline-portexists):unity command --project-path "$PWD" --json --no-banner <find_gameobjects|get_serialized_fields|get_component_properties|get_console_logs> -- <params>; look up parameters withunity command --project-path "$PWD" --query <keyword> --detail full --json(shared/unity-cli-reference.md).- tykit (
Temp/tykit.json):unity_query/get-field/consolepershared/tykit-reference.md.- Neither: verify from source and say so in the verdict.
Verification is read-only: no
set_*,menu,editor_play, mutatingeval/call-method, orrun_tests(tests go through/qq:test). Never open or printLibrary/Pipeline/.unity-pipeline-port— it holds an eval token.
How to execute: Group all findings that need verification, and for each one (or a cluster of related ones) dispatch a subagent using the Agent tool (subagent_type: "general-purpose", model: "opus"), running in parallel. Each subagent's prompt must include the original finding (verbatim), relevant file paths, and the instructions from ../../shared/verification-prompt.md.
After dispatching all verification subagents, write the expected count to the gate file so the gate knows when all verifications are complete:
source "${CLAUDE_PLUGIN_ROOT}/scripts/platform/detect.sh"
if qq_session_id && [[ -f "$QQ_TEMP_DIR/review-gate-$QQ_SESSION_ID" ]]; then
IFS=: read -r ts count _ < "$QQ_TEMP_DIR/review-gate-$QQ_SESSION_ID"
echo "${ts}:${count}:N" > "$QQ_TEMP_DIR/review-gate-$QQ_SESSION_ID"
fi(Replace N with the actual number of verification subagents dispatched. The gate file is keyed by this session's id — qq_session_id reads CLAUDE_CODE_SESSION_ID — so concurrent sessions never share a gate; if this session has no gate file, there is nothing to update.)
Aggregate: After all subagents return, consolidate the results and present each finding's verdict and supporting evidence to the user.
d. Fix the Code
- For each confirmed critical issue, locate and fix the code
- For findings flagged as Confirmed but over-engineered, apply a simpler alternative fix
- For confirmed moderate issues, apply fixes at your discretion
- After each fix, run a build and tests to verify
- After all fixes, present a summary of changes to the user
Handling test failures: If build/test runs reveal pre-existing failures unrelated to this change, ask the user how to proceed:
- Investigate and fix — dig into these failures and attempt to fix them
- Skip and continue — log the failures and continue the current review cycle Do not unilaterally decide "unrelated, skip it" — let the user decide.
e. Decide Whether to Continue
- If this round had
[Critical]issues confirmed and fixed → automatically start the next round (back to a) - If this round had no
[Critical]issues → output "Review passed" and end the loop - If 5 rounds are complete → output final status and end the loop
- If two consecutive rounds had no new critical issues → suggest ending the loop
Print === Round N/5 === at the start of each round.
6. Clean Up Gate
After the review loop ends (for any reason), clean up the gate marker:
source "${CLAUDE_PLUGIN_ROOT}/scripts/platform/detect.sh"
if qq_session_id; then rm -f "$QQ_TEMP_DIR/review-gate-$QQ_SESSION_ID"; fiHandoff
After the review loop ends, recommend the next step:
- Review passed, no issues → "Code looks good. Want to run
/qq:testto verify?" - Issues were found and fixed → "Fixed N issues. Want to run
/qq:testto make sure nothing broke?" - 5 rounds exhausted with remaining issues → "Some issues remain after 5 rounds. Run
/qq:testto check impact, or continue fixing manually?"
--auto mode: run qq-execute-checkpoint.py pipeline-advance --project . --completed-skill "/qq:claude-code-review" --next-skill "/qq:test", then invoke /qq:test --auto.
Notes
- The review script is at
claude-review.shand requires Claude CLI (claude) to be available - Never blindly trust Claude review results — subagents may misread code or reference wrong line numbers. Every finding must go through the verification step
- Watch for over-engineering — always ask: "Is the proposed fix proportionate to the problem?"
- When fixing, only address the actual issues the review identified — do not opportunistically refactor surrounding code
- Output path for any generated artifacts uses
Docs/qq/<branch-name>/where branch name is obtained viagit branch --show-current | tr '/' '_'
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

