agentleFS
0x2E0x2E/dev-skills/skills/reviewing-code/SKILL.md

reviewing-code

Skill1 starsChanged 5 months agoMITView on GitHub

Use before merging or after milestones — two-stage review: spec compliance first, then code quality. Also handles receiving review feedback.

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use auditing-security and incident-response.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • witi-projectsSkill

    auditing-security

    Perform a systematic security audit of a codebase, checking for OWASP Top 10 vulnerabilities, secrets exposure, and insecure patterns. Use when the user says "/auditing-security", "auditing security", or asks about auditing security.

    Also in 4 projects that use this

  • AnthropicSkill

    incident-response

    Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always determine the review target explicitly before dispatching reviewers:

    line 18
  2. Distinctive:

    If the target is unclear, ask the user: "What should I review — uncommitted changes, a specific branch, or a PR?"

    line 28
  3. Distinctive:

    When dispatching either reviewer subagent, the prompt may contain only facts: the review scope, the spec/plan, and the diff (or SHAs).

    line 32
  4. Very specific:

    Only after Stage 1 passes, dispatch a code quality reviewer using the prompt in templates/stage2-code-quality.md.

    line 58
  5. Distinctive:

    If either stage finds issues:

    line 64
  6. Distinctive:

    When receiving review feedback — whether from the reviewer subagent or from an external reviewer (PR review, user, teammate):

    line 72
  7. Distinctive:

    Verify: Check against the actual codebase.

    line 75
  8. Distinctive:

    If an external reviewer's feedback conflicts with the user's prior architectural decisions, discuss with the user before implementing.

    line 84
  9. Distinctive:

    Large diffs get shallow reviews: If the milestone diff is too large for one pass, review per-task or split the scope explicitly rather than …

    line 99

“Common” is measured: kept by at least 6 in 10 of the 12 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Reviewing Code

Two-stage review after each task or milestone: first verify the code matches the spec, then evaluate code quality. Fixing is delegated back to executing-plans.

Triggers

  1. Checkpoint Review — after each milestone completes (invoked by executing-plans)
  2. Final Global Review — after all milestones complete (invoked by executing-plans)
  3. Manual trigger — user invokes directly via /review or instruction

Review Target

Always determine the review target explicitly before dispatching reviewers:

TriggerReview Target
Checkpoint ReviewDiff between the Milestone's first and last commit
Final Global ReviewDiff between feature branch HEAD and base branch (e.g., main)
Manual: PR reviewgit diff base...HEAD (the PR's changes)
Manual: uncommitted workgit diff + untracked files
Manual: specific file/dirUser specifies; scope is only those files

If the target is unclear, ask the user: "What should I review — uncommitted changes, a specific branch, or a PR?"

Dispatch Discipline

When dispatching either reviewer subagent, the prompt may contain only facts: the review scope, the spec/plan, and the diff (or SHAs). It must never carry the dispatcher's opinion about the work.

Banned in the dispatch prompt:

  • Pre-rating severity ("this is minor", "at most Important")
  • Telling the reviewer to skip or ignore anything ("don't worry about X")
  • Answering for the reviewer ("this is fine because…", "I left this unabstracted on purpose")
  • Framing the spec loosely so something slips through

A reviewer handed the dispatcher's verdict has no reason to check the work. Keep it adversarial by feeding evidence, never conclusions.

The reviewer is strictly read-only: it must not edit files or run git checkout/commit — a reviewer that runs git checkout can orphan later commits.

Two-Stage Review

Execute reviews in strict order. Do NOT start Stage 2 before Stage 1 passes.

Stage 1: Spec Compliance

Dispatch a spec compliance reviewer. Only question: does the implementation match the specification? Use the prompt in templates/stage1-spec-compliance.md.

Important: Spec compliance is binary. If the reviewer finds missing, extra, or wrong behavior, it fails. Do NOT proceed to Stage 2.

Each issue must include: file:line reference, what's wrong, what the spec requires, and how to fix.

Stage 2: Code Quality

Only after Stage 1 passes, dispatch a code quality reviewer using the prompt in templates/stage2-code-quality.md.

Stage 2 requires file:line references for every concrete issue. Calibrate severity — not everything is Critical. Acknowledge strengths before listing issues; accurate praise helps the implementer trust the rest of the feedback.

Review Loop

If either stage finds issues:

  1. The implementer fixes all issues from that stage
  2. Re-run the same stage's review
  3. Repeat until that stage passes, then proceed to the next stage
  4. Max one re-review round per stage — if issues persist after re-review, fix what can be fixed, note remaining issues, and proceed

Feedback Handling

When receiving review feedback — whether from the reviewer subagent or from an external reviewer (PR review, user, teammate):

  1. Understand: Restate the feedback in your own words. If anything is unclear, ask before implementing.
  2. Verify: Check against the actual codebase. Is it technically correct? Does it break existing functionality?
  3. Evaluate: Does it violate architectural decisions? Is it YAGNI?
  4. Act:
    • Correct and important → implement (one item at a time, test each)
    • Uncertain → ask the user
    • Wrong or inapplicable → push back with technical reasoning

No performative agreement. State what you're fixing, or state why you disagree. Actions over words.

If an external reviewer's feedback conflicts with the user's prior architectural decisions, discuss with the user before implementing.

Feedback Decision Table

Feedback patternDon'tDo
Reviewer flags a real bug with file:lineArgue defensivelyFix it — one item, tested
Reviewer says "this is wrong" without evidenceAgree reflexively to seem responsiveVerify against the code first; implement only if correct
Suggestion that adds scope beyond the specImplement to please the reviewerPush back: out of scope / YAGNI; ask the user if unsure
External feedback conflicts with a prior decisionSilently override the decisionSurface the conflict to the user before acting
Feedback you don't understandGuess at the intent and change somethingRestate it in your own words and ask before acting

Gotchas

  • Resist "Critical" inflation. Tagging style nits as Critical drowns out the real must-fix issues. Reserve Critical for bugs, security holes, data loss, and broken functionality.
  • Large diffs get shallow reviews. If the milestone diff is too large for one pass, review per-task or split the scope explicitly rather than letting the reviewer skim.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.