code-review
Skill11 starsChanged 3 months agoMITView on GitHub
Use when the user EXPLICITLY asks for a lightweight pass, or for feedback/audit modes. Triggers: 'quick review', 'light review', 'look over this', '--quick', 'check my work', 'self-review before PR', 'review my code', 'audit this code', 'PR comments to address', 'reviewer said', 'address feedback', 'review PR #X comments'. NOT for: unspecified-scope branch review such as 'review this branch' or 'code review' (that DEFAULTS to advanced-code-review), or PR triage and summarization (use distilling-prs). This skill is the explicit opt-in to a lighter pass; if the user did not ask for lightweight by name, do not use it. Never bypass the review skills for a raw Explore dispatch, even when the user's concerns seem narrow or specific.
We split this skill into the rules it gives an agent
9 rules. 0 are common, 3 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 183 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 21
Evidence Over Assertion: - Every finding needs file:line reference
- Very specific: line 65
Use gh CLI for PR operations (fetching, reviewing, replying).
- Very specific: line 72
Never hand-roll the merge base.
- Very specific: line 76
No base literal appears in this skill: Never write a default-branch name (the usual two) into a ref, a --base default, or a git merge-base …
- Very specific: line 96
Every review MUST report the base it used AND how that base was resolved.
- Very specific: line 108
If resolved_via is fallback-literal, or fetch is not ok, say so prominently — the base may be wrong or stale.
- Distinctive: line 150
When the user names a narrower scope — a single file, a specific function, one subsystem, a numbered pull request, staged changes only — …
- Distinctive: line 207
Use "branch diff" without saying which endpoint (committed-only vs.
- Very specific: line 228
Every finding without file:line is noise.
“Common” is measured: kept by at least 6 in 10 of the 183 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
<ROLE>
Code Review Specialist. Catch real issues. Respect developer time.
</ROLE><analysis>
Unified skill routes to specialized handlers via mode flags.
Self-review catches issues early. Feedback mode processes received comments. Give mode provides helpful reviews. Audit mode does deep security/quality passes.
</analysis>Invariant Principles
- Evidence Over Assertion - Every finding needs file:line reference
- Severity Honesty - Critical=security/data loss; Important=correctness; Minor=style
- Context Awareness - Same code may warrant different severity in different contexts
- Respect Time - False positives erode trust; prioritize signal
Inputs
| Input | Required | Description |
args | Yes | Mode flags and targets |
git diff | Auto | Changed files |
PR data | If --pr | PR metadata via GitHub |
Outputs
| Output | Type | Description |
findings | List | Issues with severity, file:line |
status | Enum | PASS/WARN/FAIL or APPROVE/REQUEST_CHANGES |
Mode Router
| Flag | Mode | Command File |
--self, -s, (default: no flag given) | Pre-PR self-review | (inline, "Self Mode") |
--feedback, -f | Process received feedback | code-review-feedback |
--give <target> | Review someone else's code | code-review-give |
--audit [scope] | Multi-pass deep-dive | code-review-audit |
Modifiers: --tarot (roundtable dialogue via code-review-tarot), --pr <num> (PR source)
<CRITICAL>
**With `--pr <num>`, load the `reviewing-prs` skill BEFORE dispatching any
review subagent.** It owns `review_source` (`LOCAL_FILES` vs `DIFF_ONLY`) and
the mandatory PR-review context block every dispatched subagent must receive.
A `REFUTED` verdict produced by reading a local file in `DIFF_ONLY` mode is a
wrong verdict — the local tree is on a different branch, so a real bug the PR
introduced reads as absent.
</CRITICAL>Tool Integration
Use gh CLI for PR operations (fetching, reviewing, replying). For diffs, use native git diff / git show. Fallback: gh unavailable -> local git diff -> manual paste.
Diff Acquisition
<CRITICAL>
Never hand-roll the merge base. `scripts/branch-context.sh` (POSIX) and
`scripts/branch-context.py` (cross-platform) own base detection, the pre-base
`git fetch`, and provenance reporting. Shell out to one of them.No base literal appears in this skill. Never write a default-branch name
(the usual two) into a ref, a --base default, or a git merge-base argument.
A literal base errors outright on repos whose default branch differs, and models
paste what they are given.
</CRITICAL>
Two independent axes — BASE and ENDPOINT — and each is decided explicitly. The
branch-context skill owns both: the detection ladder that resolves the merge
target (pr-base-ref, then upstream-tracking, then remote-head, then a
fallback-literal that is a guess and is reported as one), and the subcommand
pair for each endpoint. A --base override skips detection entirely and is
reported as explicit-override. Load it rather than restating it here.
The endpoint choice for this skill: diff-committed when reviewing what will
merge, diff for a pre-commit self-review or a changelog/PR-body description.
"Branch diff" is not a name for both. Say which endpoint you used.
Reporting requirement
<CRITICAL>
Every review MUST report the base it used AND how that base was resolved. The
script prints this provenance to stderr for `diff`, `diff-committed`, `log`,
`stat`, `stat-committed`, `files`, `files-committed`, `base`, and `target`;
`resolution` and `json` put it on stdout. (`diff-uncommitted` is the one
endpoint with no base to report — it diffs against HEAD.)
Capture it and surface it in your output:Base: <merge_target> @ <merge_base[:12]> (resolved via <resolved_via>, fetch <fetch>)
Endpoint: <committed-only | includes working tree>If resolved_via is fallback-literal, or fetch is not ok, say so
prominently — the base may be wrong or stale. Silent fallback is the exact
failure this procedure exists to prevent.
</CRITICAL>
Phase 0 — Load and Catalogue the Standards FIRST
A review cannot catch violations of rules it has not read. Before computing the diff or reading a single changed line:
- Discover and read the repository's own standards documents. They vary per
repository, so find them rather than assuming a fixed set. Typical locations
include a coding-standards document, testing instructions, code-review
instructions, the root
AGENTS.md, and every subdirectoryAGENTS.mdcovering a changed path. Also read whatever those documents reference: contributing guides, style guides, and lint configuration. If a document you expected is absent, note that and adapt; if the repository carries standards documents you did not expect, load those too. - Read the operator's standing rules and any project memory the environment provides.
- Extract a concrete, NAMED rule catalogue — the enforceable rules with whatever identifiers or names the documents give them. That catalogue is the checklist the review runs against.
- Every finding names the rule it violates — the document plus the rule's identifier or name — or it is a named correctness or logic bug. No vague "this seems off": cite the standard.
Finding no standards document is not a failure — record it, proceed, and raise no style or convention findings. Skipping the load is: a review that never cites a loaded rule by name is not a review.
Scope Obligation
Consume every changed hunk in every changed file and hold each against the catalogue from Phase 0. No grep-sampling. No skimming. No "I read the hot files." Grep is fine to LOCATE things; it is never a substitute for reading the whole diff. For a large diff, chunk it across subagents so that 100% of the diff is assigned and read line by line; track file and hunk coverage and be able to prove no file went unread.
When the user names a narrower scope — a single file, a specific function, one subsystem, a numbered pull request, staged changes only — honor that scope instead. The full-read obligation is the default for an unspecified scope, not an override of an explicit one.
Self Mode (--self)
<reflection>
Self-review finds what you missed. Assume bugs exist. Hunt them.
</reflection>Workflow:
Get the diff via
branch-context.sh(see the "Diff Acquisition" section). Pre-commit self-review includes the working tree, so use thefiles/diffendpoint pair:"$SPELLBOOK_DIR/scripts/branch-context.sh" files "$SPELLBOOK_DIR/scripts/branch-context.sh" diff- Multi-pass: Logic > Integration > Security > Style
- Generate findings with severity, file:line, description
Example finding: src/auth/login.py:42 [Critical] Token written to log — data exposure risk
- Gate: Critical=FAIL, Important=WARN, Minor only=PASS
Audit Mode (--audit [scope])
Execute: /code-review-audit
An audit is a GATE, not a courtesy pass, and it is the one mode of this skill that is not a lighter pass. The command owns the scopes, the pass order, the zero-tolerance posture and its accepted noise cost, the API-hallucination checklist, and the output shape. Read it before running an audit; do not improvise the posture from this summary.
<FORBIDDEN>
- Skip self-review for "small" changes
- Ignore Critical findings
- Dismiss feedback without evidence
- Give vague feedback without file:line
- Generate any finding before Phase 0 has loaded and catalogued the standards
- Report a style or convention finding when the standards load found nothing
- Substitute grep for reading a hunk (grep LOCATES; it never COVERS)
- Sample the diff and treat the remainder as covered
- Approve to avoid conflict
- Rate severity by effort instead of impact
- Hardcode a base ref or a default-branch name instead of shelling out to `branch-context.sh`
- Report findings without stating the base used and how it was resolved
- Use "branch diff" without saying which endpoint (committed-only vs. working tree)
- Assess whether a test is a green mirage with an inline/ad hoc mutation
table. Test-quality verdicts MUST come from a dispatch that invokes the
auditing-green-mirage skill. An inline mutation check in this project
class has already produced a false "robust" verdict that a dedicated
audit reversed.
</FORBIDDEN>Self-Check
- Correct mode identified
- Phase 0 completed: standards discovered, read, catalogued by name (or absence recorded)
- Every changed hunk read; no grep-sampling; coverage provable
- Base obtained via
branch-context.sh— no hardcoded base literal - Base,
resolved_via, and fetch status reported in output - Endpoint (committed-only vs. working tree) chosen deliberately and stated
- All findings have file:line
- Severity based on impact, not effort
- Output matches mode spec
<FINAL_EMPHASIS> Every finding without file:line is noise. Every severity inflated by effort is a lie. Your credibility as a reviewer depends on signal quality — accurate severity, concrete evidence, zero false positives that waste developer time. </FINAL_EMPHASIS>
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 193
- mattpocock/skills★ 309ksame name
- TheAlgorithms/Python★ 226ksame name
- microsoft/vscode★ 194ksame name
- github/spec-kit★ 145ksame name
- ggml-org/llama.cpp★ 133ksame name
- shareAI-lab/analysis_claude_code★ 80ksame name
- shareAI-lab/learn-claude-code★ 80ksame name
- vectorize-io/hindsight★ 57ksame name
- dbeaver/dbeaver★ 52ksame name
- roboflow/supervision★ 51ksame name
183 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.
Used alongsideProjects 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
- +3 more from dzhng
- +2 more from Azure
In this repository65 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- documentation-updatesSkill
- spellbook-auditingSkill
- advanced-code-reviewSkill
- adversarial-reviewSkill
- agent2agentSkill
- analyzing-domainsSkill
- analyzing-skill-usageSkill
- assembling-contextSkill
- async-await-patternsSkill
- auditing-green-mirageSkill
- autonomous-modeSkill
- branch-contextSkill
- creating-issues-and-pull-requestsSkill
- debuggingSkill
- dedupeSkill
- deep-researchSkill
- dehallucinationSkill
- design-explorationSkill
- designing-workflowsSkill
- developSkill
- devils-advocateSkill
- dispatching-parallel-agentsSkill
- distilling-prsSkill
- documenting-projectsSkill
- documenting-toolsSkill
- emotional-stakesSkill
- enforcing-code-qualitySkill
- estimating-ticketsSkill
- executing-plansSkill
- fact-checkingSkill
- finding-dead-codeSkill
- finishing-a-development-branchSkill
- fixing-testsSkill
- fractal-thinkingSkill
- gathering-requirementsSkill
- generating-diagramsSkill
- instruction-engineeringSkill
- isolated-testingSkill
- managing-artifactsSkill
- merging-worktreesSkill
- opportunity-awarenessSkill
- optimizing-instructionsSkill
- polish-repoSkill
- reflexionSkill
- requesting-code-reviewSkill
- resolving-merge-conflictsSkill
- reviewing-design-docsSkill
- reviewing-impl-plansSkill
- reviewing-prsSkill
- rounding-up-worktree-sessionsSkill
- sharpening-promptsSkill
- smart-readingSkill
- test-driven-developmentSkill
- testing-strategySkill
- tooling-discoverySkill
- using-git-worktreesSkill
- using-lsp-toolsSkill
- using-skillsSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

