code-review
Skill172 starsChanged 4 months agoMITView on GitHub
Review a code change for correctness, security, maintainability, and test adequacy, and reach a defensible verdict. Use when reviewing a pull request, diff, patch, or AI-generated change; when scoping an oversized review into reviewable units; when writing or triaging review comments; when assigning reviewers or setting review policy; or when investigating why a defect escaped review. Covers change sizing and attention budgets, risk-tiered checklists, severity-labeled comments, verdict and residual-risk records, review metrics that resist gaming, and the measured limits of checklists and AI reviewers. Do not use for implementing the requested change, root-cause debugging of a failing test or incident (use systematic-debugging), security assessment of a whole system (use security-audit-methodology), designing new code securely (use secure-software-engineering), architecture review across systems (use software-architecture), or reverse-engineering an unfamiliar codebase (use software-architecture-analysis).
194 other projects use a version of this.
Adopted by
Most recently taken up by
- doggy8088/spec-kittheir own version, first seen Nov 9, 2026
- strelov1/freehiretheir own version, first seen Nov 9, 2026
- storybookjs/storybooktheir own version, first seen Nov 8, 2026
- codewithmukesh/dotnet-claude-kittheir own version, first seen Nov 8, 2026
- supabase/supabasetheir own version, first seen Nov 8, 2026
- The-Vibe-Company/quivrtheir own version, first seen Nov 8, 2026
Used with
Projects with it also use close-spec, design-with-images and 10 more.
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.
dzhngSkillclose-spec
When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).
Also in 5 projects that use this
dzhngSkilldesign-with-images
Explore UI and visual design with image generation, then iterate the real implementation against the user-selected concept. Use when brainstorming visual directions, offering mockup variants, or implementing an approved generated design; do not stop at the mockups or the first code approximation.
Also in 5 projects that use this
PydanticSkilladd-new-model
Add support for a newly-released language or image generation model in pydantic-ai (e.g. openai:gpt-5.6, anthropic:claude-sonnet-5, openai:gpt-image-2). Use when a provider ships a new model id and you need to wire literals, profile flags, adapters, and tests to recognize it. Handles SDK-lag, gateway list conventions, capability probing, and direct image-model geometry.
Also in 9 projects that use this
transitive-bullshitSkillcompare-screenshots
Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.
Also in 5 projects that use this
Microsoft AzureSkillazsdk-common-apiview-feedback-resolution
Analyze and resolve APIView review feedback on Azure SDK PRs. **UTILITY SKILL**. USE FOR: APIView comments, API review feedback, SDK API surface changes. DO NOT USE FOR: general code review, non-APIView feedback. INVOKES: azure-sdk-mcp:azsdk_apiview_get_comments, azure-sdk-mcp:azsdk_customized_code_update, azure-sdk-mcp:azsdk_typespec_delegate_apiview_feedback, azure-sdk-mcp:azsdk_run_typespec_validation, azure-sdk-mcp:azsdk_package_generate_code.
Also in 6 projects that use this
Microsoft AzureSkillazsdk-common-generate-sdk-locally
Generate and finalize Azure SDKs locally from TypeSpec, including build, checks, tests, changelog, metadata, and version updates by default. WHEN: "generate SDK locally", "build SDK", "run SDK tests", "run CI checks", "validate package", "run checks", "update changelog", "fix SDK build errors", "resolve SDK generation errors", "customize TypeSpec", "rename SDK client", "rename SDK model", "hide operation from SDK", "fix analyzer errors", "resolve customization drift", "create subclient", "update metadata", "update version". INVOKES: azsdk_verify_setup, azsdk_package_generate_code, azsdk_package_build_code, azsdk_package_run_check, azsdk_package_run_tests, azsdk_customized_code_update, azsdk_package_update_changelog_content, azsdk_package_update_metadata, azsdk_package_update_version.
Also in 6 projects that use this
- +4 more from dzhng
- +2 more from Azure
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 194
- mattpocock/skills★ 309ksame name
- TheAlgorithms/Python★ 226ksame name
- microsoft/vscode★ 195ksame name
- github/spec-kit★ 149ksame name
- ggml-org/llama.cpp★ 134ksame name
- supabase/supabase★ 115ksame name
- storybookjs/storybook★ 91ksame name
- shareAI-lab/analysis_claude_code★ 80ksame name
- shareAI-lab/learn-claude-code★ 80ksame name
- vectorize-io/hindsight★ 60ksame name
184 more not listed
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 repository192 other files it gives its agents.
- agent-production-operations/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- forward-deployed-engineering/AGENTS.mdAGENTS.md
- production-excellence/AGENTS.mdAGENTS.md
- product-lifecycle/AGENTS.mdAGENTS.md
- tailscale/AGENTS.mdAGENTS.md
- workflow-architect/AGENTS.mdAGENTS.md
- llms.txtllms.txt
- actuarial-risk-modelingSkill
- adr-authoringSkill
- agent-councilSkill
- agent-evals-and-observabilitySkill
- agent-production-operationsSkill
- agent-skillsSkill
- ai-governanceSkill
- ai-operating-economicsSkill
- amazon-memoSkill
- analog-occultismSkill
- anydocSkill
- api-design-and-evolutionSkill
- artifact-pyramidsSkill
- ascii-city-engineSkill
- autogenSkill
- backend-engineeringSkill
- binary-analysisSkill
- bmadSkill
- brand-designerSkill
- c4-diagrammingSkill
- camera-hackingSkill
- capacity-and-cost-engineeringSkill
- chief-of-staff-methodologySkill
- cli-builderSkill
- cncf-landscapeSkill
- color-managementSkill
- community-guidesSkill
- conditional-customer-successSkill
- confluence-cliSkill
- constrained-optimizationSkill
- crewaiSkill
- crmSkill
- crowdsecSkill
- cryptpadSkill
- cyberpunkSkill
- daily-life-discoverySkill
- data-architectSkill
- data-cleaningSkill
- data-engineeringSkill
- data-scientistSkill
- de-spinSkill
- digital-twinSkill
- docker-composeSkill
- documentsSkill
- dsm5Skill
- dspySkill
- electronicsSkill
- emailSkill
- enterprise-architectureSkill
- epubSkill
- esp32-developmentSkill
- ffmpegSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 14 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 184 edited versions we read keep these.
14
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
- Distinctive: line 68
Before reading the diff, establish four things.
- Distinctive: line 84
Read what the change claims to do, then read the diff.
- Very specific: line 88
If the description is a restatement of the code ("adds parseHeader"), it is not intent.
- Distinctive: line 93
Run the scope tool. It reports size, file classes, risk-bearing paths by convention, whether source files moved with tests, and an …
- Distinctive: line 107
Use its output for three decisions:
- Distinctive: line 119
If the change is oversized, write a review plan and ask for it to be split or stacked.
- Distinctive: line 144
Do not review formatting a linter already enforces.
- Distinctive: line 152
Run the test that is supposed to prove the behavior, and confirm it fails without the change when that is cheap to do.
- Distinctive: line 156
Read the code the change calls, not just the code it modifies.
- Distinctive: line 157
Check the rollback path actually exists.
- Distinctive: line 164
Every finding carries a severity label, and blocking findings carry both evidence and a verification method:
- Distinctive: line 202
If the change grows materially after approval, the approval lapses.
- Distinctive: line 203
When a defect escapes, treat the escape as evidence about the review process, not about the reviewer's character: see the review metrics …
- Distinctive: line 219
Do not credit a model's review of its own output as independent verification.
- Distinctive: line 244
Read the routing table as ownership, not as prerequisites: review judgment stays here, and the specialist skill supplies the depth for its …
“Common” is measured: kept by at least 6 in 10 of the 184 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
Code Review
Review is a decision about a change, supported by evidence a second person gathered independently. Everything else — the comment count, the approval ritual, the review template — is scaffolding around that decision.
Two facts shape the method in this skill:
- Review catches what a reviewer can hold in working memory. Effectiveness falls as changes grow and sessions run long, so scope and attention are the first decisions, not the last.
- Most review comments are about evolvability, not defects. That is a fine use of review, but it means "approved" is a statement about the evidence examined, never proof that the change is correct.
The reviewer's job is to say precisely what was examined, what was found, what was decided, and what remains unknown.
When to use this skill
- A pull request, patch, or diff needs a verdict.
- A change is too large to review in one pass and needs scoping or splitting.
- Review comments need triage, severity labels, or rewriting so they are actionable.
- A team needs reviewer assignment, review policy, or review-latency norms.
- A defect reached production and the question is what review missed.
- A model produced candidate review comments that a human must accept or discard.
When not to use this skill
- The task is to fix the defect the review found — that is implementation work in the owning engineering skill.
- The task is to find the cause of a failure: route to
systematic-debugging. - The task is a whole-system security assessment: route to
security-audit-methodology. - The task is to design a new system or subsystem securely: route to
secure-software-engineeringandsoftware-architecture. - The task is architecture review across systems rather than a change: route to
software-architecture. - The task is to understand an unfamiliar codebase: route to
software-architecture-analysis.
The review contract
Before reading the diff, establish four things. If any is missing, ask for it — this is the cheapest possible review comment.
| Element | Question | Failure if missing |
| Decision | What will this review authorise — merge, promote, release, incident closure? | The review optimizes for the wrong risk |
| Authority | Comment-only, approve, or approve-and-merge? | Reviewer implies authority they lack |
| Intent artifact | Issue, spec, ADR, or PR description stating the intended behavior | Reviewer reviews the code against their imagination |
| Evidence | Test output, runnable command, or artifact the author supplied | "Tests pass" is taken on faith |
Record the contract in the review record. See the review record template.
The review loop
1. Read the intent before the diff
Read what the change claims to do, then read the diff. The gap between them is a finding class of its own: behavior described but not implemented, implementation that does more than described, and scope that drifted into unrelated files.
If the description is a restatement of the code ("adds parseHeader"), it is not
intent. Ask what problem the change solves and who is affected.
2. Scope the change with evidence, not impressions
Run the scope tool. It reports size, file classes, risk-bearing paths by convention, whether source files moved with tests, and an attention budget:
python3 scripts/review_scope.py --base origin/main --head HEAD --markdown
python3 scripts/review_scope.py --base origin/main --head HEAD --json
# Reviewing an already-merged squash commit (or any single commit)
python3 scripts/review_scope.py --base <merge-sha>^ --head <merge-sha>
# Project-specific build output that the default markers do not know
python3 scripts/review_scope.py --base origin/main --head HEAD --exclude 'reports/*.json'Use its output for three decisions:
- Tier the risk. A 40-line authorization change outranks a 900-line test refactor. Risk-bearing paths and change type set the tier, not line count. Use the risk-tiered checklist.
- Set the budget. Roughly 300 effective lines per hour is the conservative planning rate; sessions past about an hour stop paying. If the estimate exceeds one session, split the review or ask for a split change.
- Order attention. Risk-bearing and behavioral code first. Generated files, lockfiles, and vendored code are inspected for provenance, not read line by line. Exclusion is a claim about provenance: if a path is generated, say what generates it.
If the change is oversized, write a review plan and ask for it to be split or stacked. Reviewing an oversized diff in one pass produces an approval that covers less than it appears to.
3. Orient in one pass
Skim the whole diff once, without commenting, to learn its shape: entry points, changed interfaces, new dependencies, data changes, test changes. Note file names as you go. This pass exists so the second pass has a map.
4. Review in depth by attention order
Work through units in the order the scope tool suggests. For each unit, ask the questions in the defect taxonomy rather than reading line by line:
- Correctness — does it do the stated thing for valid input, and what happens at the boundaries?
- Failure paths — errors, timeouts, partial writes, retries, cancellation.
- Trust boundaries — untrusted input reaching a privileged sink; identity and authorization checked on the object being touched.
- Compatibility — callers, stored data, wire contracts, configuration defaults.
- Test adequacy — do the tests assert the behavior, including the denial and failure cases?
- Operability — can an operator distinguish success from failure later?
Do not review formatting a linter already enforces. Do not restate the diff as comments. If a unit is too large to hold, stop and ask for a split.
5. Gather independent evidence
Review is weaker than it looks when the reviewer only reads. Add at least one piece of evidence the author did not supply when the change is T2 or above:
- Run the test that is supposed to prove the behavior, and confirm it fails without the change when that is cheap to do.
- Exercise the boundary the change claims to guard — empty input, wrong tenant, missing header.
- Read the code the change calls, not just the code it modifies.
- Check the rollback path actually exists.
State what you could not verify. "Not exercised in this environment" is an honest and useful line in a review record; silence implies coverage you did not have.
6. Write findings the author can act on
Every finding carries a severity label, and blocking findings carry both evidence and a verification method:
- [blocking] <claim> — evidence: <path:line or observation> — verify: <test or check>
- [should-fix] <claim> — evidence: <...>
- [question] <what the diff cannot tell you>
- [nit] <optional polish>
- [praise] <what to keep>One claim per comment. Name the requirement, not a rewrite. A comment that says "this is confusing" transfers the analysis back to the author; a comment that names the missing case does not.
Comment discipline, tone, and disagreement handling: see the comment quality reference. Reusable sheet: comment set template.
7. Decide the verdict
| Verdict | Asserts | Requires |
APPROVE | Examined scope is correct and complete enough for the decision | No open blocking findings; residual risk recorded |
APPROVE WITH COMMENTS | Mergeable now; the comments do not need to block | No open blocking findings; non-blocking items have owners |
REQUEST CHANGES | At least one finding must be fixed before merge | Every blocking finding has evidence and a verification method |
NEEDS MORE EVIDENCE | You cannot decide yet, and here is what is missing | The specific evidence gap, and who can supply it |
A verdict is a claim about the evidence you examined. It is not a claim about the
whole system, and it does not transfer to changes you did not see. Record residual
risk and explicitly unreviewed scope with the verdict; run
python3 scripts/review_record_check.py <record.md> to confirm the record does not
contradict itself.
8. Close the loop
- Re-review increments, not the whole change again. Confirm each blocking finding is fixed and verified, rather than merely edited.
- Resolve or explicitly defer every non-blocking finding with an owner.
- If the change grows materially after approval, the approval lapses. Say so.
- When a defect escapes, treat the escape as evidence about the review process, not about the reviewer's character: see the review metrics reference.
Reviewing AI-generated and AI-reviewed changes
Two distinct problems, often confused:
- AI wrote the change. The risks are plausible-but-wrong code, tests overfitted to the implementation, invented APIs, and unexamined dependencies. Require the tests to be derived from the requirement, not from the patch, and review provenance and new dependencies explicitly.
- AI reviewed the change. Model output is a candidate finding list, not a verdict. Findings without a locator and evidence are dropped, not softened. Automation bias — accepting a machine suggestion because it is fluent — is the failure mode to guard against.
Do not credit a model's review of its own output as independent verification. See the AI-assisted review reference and the AI pre-review brief template.
Routing to the skills that own adjacent work
| When the review needs… | Route to |
| Judgment about design, naming, coupling, or refactoring quality | programming-principles |
| Independence model, test adequacy, mutation evidence, AI code quality gates | qa-methodology |
| A pass/fail verdict against explicit acceptance criteria | verification-methodology |
| Threat modeling or secure design for new code | secure-software-engineering |
| Whole-system security assessment or vulnerability classification | security-audit-methodology |
| Root cause of a failure found during review | systematic-debugging |
| Architecture-level tradeoffs or cross-system review | software-architecture |
| API or event contract compatibility and deprecation | api-design-and-evolution |
| Schema, migration, or pipeline correctness | data-engineering, data-architect |
| Performance evidence and regression benchmarks | performance-optimization |
| Release gates, rollout, rollback, and change-failure metrics | release-engineering |
| Documentation quality in the change | technical-documentation |
| Accessibility review of UI changes | web-accessibility |
| Privacy impact of data-handling changes | privacy-engineering |
| Durable decision record for a consequential choice | adr-authoring |
| Adversarial multi-perspective judgment on a contested change | agent-council |
| End-to-end delivery discipline for the change itself | neckbeard |
Read the routing table as ownership, not as prerequisites: review judgment stays here, and the specialist skill supplies the depth for its own domain.
Honest limits
- Review is not a defect filter with a known recall. It catches some classes well and misses others; treat a clean review as evidence of examination, not of correctness.
- Checklist coverage is not defect coverage. A ticked box records that a question was asked.
- Comment volume, approval rate, and review count are not quality measures. They are activity measures that improve when the process gets worse.
- The scope tool classifies paths by convention. It cannot see semantics, and a risky change in an innocuously named file will not be flagged.
Completion criteria
The review is complete when the record states scope, evidence, labeled findings with
evidence and verification, a verdict consistent with those findings, an explicit
coverage level, residual risk, and explicitly unreviewed scope — and the record passes
scripts/review_record_check.py. Stop when the budget is spent rather than skimming
the remainder; reschedule or split instead of pretending coverage.
Files in this skill
| File | Use |
| references/evidence-base.md | What the research actually shows about review effectiveness, size, latency, and AI review |
| references/review-scoping-and-depth.md | Change sizing, tiers, attention allocation, incremental and stacked review |
| references/defect-taxonomy.md | What to look for by defect class, with detection and false-positive traps |
| references/comment-quality-and-communication.md | Severity taxonomy, actionable comment structure, disagreement and tone |
| references/verdicts-and-evidence.md | Verdict semantics, approval authority, residual risk, evidence boundaries |
| references/ai-assisted-review.md | Model-written and model-reviewed changes, automation bias, provenance |
| references/review-metrics.md | Review latency, size, defect escape, and which metrics are gameable |
| references/source-index.md | Dated sources behind the claims in this skill |
| templates/review-record.md | Durable record of scope, evidence, findings, verdict, residual risk |
| templates/review-plan.md | Split and schedule an oversized review |
| templates/comment-set.md | Severity-labeled comment sheet with worked examples |
| templates/risk-tier-checklist.md | Risk-tiered questions, each naming the evidence that answers it |
| templates/ai-review-brief.md | Brief for a model doing candidate-finding pre-review |
| scripts/review_scope.py | Deterministic diff scope, risk flags, test mapping, attention budget |
| scripts/review_record_check.py | Validate a review record for completeness and verdict consistency |
| scripts/test_review_scope.py | Tests for the scope tool against real temporary repositories |
| scripts/test_review_record_check.py | Tests for the record checker, including the shipped template |
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.

