review-diff
Skill1 starsChanged 36 days agoMITView on GitHub
Use when reviewing a diff (staged, branch or PR). A code-review checklist across stack-agnostic dimensions — types, data layer, errors, security, hardcode, naming, dead code, quality gate — with CRITICAL/HIGH/MEDIUM severities. Repo-specific rules go in the user-section.
- Reads credentials
25 other projects use a version of this.
Adopted by
Most recently taken up by
- bInference-Lab/bInferencetheir own version, first seen Nov 29, 2026
- AmirAzy/HoNspottheir own version, first seen Nov 29, 2026
- kaiitunnz/claude-skillstheir own version, first seen Nov 26, 2026
- felipebarraza6/opencode-configtheir own version, first seen Nov 22, 2026
- DmitryTokyo/agent-kittheir own version, first seen Nov 22, 2026
- kishormorol/promptaliastheir own version, first seen Nov 16, 2026
Used with
Projects with it also use walkthrough, ship-pr and 1 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.
MSILycanthropySkillwalkthrough
Explore and visualize codebase architecture. Use when asked to "walk me through", "show how X works", "explain the flow", "diagram the architecture", or understand how components interact.
Also in 3 projects that use this
sevenschulteSkillship-pr
Ship the current branch as a pull request. Runs tests, formats code, commits any uncommitted work, pushes the branch, and opens a PR against the base branch with a generated body following the team's PR template. Use when the user says "ship it", "open a PR", "send this for review", or finishes a feature and wants it reviewed.
Also in 3 projects that use this
GoogleSkillgrilling
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
Also in 3 projects that use this
Other versions25 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 25
- faizkhairi/claude-code-blueprint★ 74same name
- bbvch-ai/aihub-core★ 19same name
- huytd/skills★ 19same name
- jisuzzzz/haechi★ 17same name
- nesnilnehc/ai-cortex★ 8same name
- tardigrde/agent-skill-eval★ 4same name
- AmirAzy/HoNspot★ 2same name
- anorth/agent-skills★ 2same name
- bInference-Lab/bInference★ 2same name
- Hy0sh/claude-skills★ 2same name
15 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 repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- patient/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- patient/CLAUDE.mdCLAUDE.md
- author-skillSkill
- context-intakeSkill
- debug-failureSkill
- dominioSkill
- follow-up-prsSkill
- locate-codeSkill
- master-planSkill
- plan-advancedSkill
- plan-simpleSkill
- pytestSkill
- quality-attributesSkill
- resolve-ticketSkill
- scoped-gateSkill
- secure-by-designSkill
- security-invariantsSkill
- solution-designSkill
- spec-bootstrapSkill
- verify-before-doneSkill
- author-skillSkill
- context-intakeSkill
- debug-failureSkill
- dominioSkill
- follow-up-prsSkill
- locate-codeSkill
- master-planSkill
- plan-advancedSkill
- plan-simpleSkill
- pytestSkill
- quality-attributesSkill
- resolve-ticketSkill
- review-diffSkill
- scoped-gateSkill
- secure-by-designSkill
- security-invariantsSkill
- solution-designSkill
- spec-bootstrapSkill
- verify-before-doneSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 25 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
If it doesn't reach MEDIUM, don't report it.
- Very specific: line 121
If there are no findings: No findings.
- Distinctive: line 122
No summary, praise, or off-checklist suggestions.
- Distinctive: line 123
If you find a new bug pattern that isn't here, save it (memory / note) for future reviews.
“Common” is measured: kept by at least 6 in 10 of the 25 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
<!-- navori:managed id="review-diff-base" hash="284bc2ec" version="0.12.3" source="@navori/core" fmkeys="name,description,metadata" -->Code review — checklist for a diff
Apply this checklist to a diff (staged, branch vs main, or a PR). The skeleton is stack-agnostic; repo-specific rules live in the user-section below.
How to report
One line per finding, ordered CRITICAL → HIGH → MEDIUM:
[CRITICAL] <file>:<line> — <concrete, verifiable description>
[HIGH] <file>:<line> — <description>
[MEDIUM] <file>:<line> — <description>- CRITICAL — breaks the build, corrupts data, security hole, a contract that won't compile. Blocks the merge.
- HIGH — likely functional bug, regression, unhandled error visible to the user, hard violation of a repo convention. Blocks the merge.
- MEDIUM — readability, naming, missing doc, minor hardcode, dead code. Doesn't block; it's listed.
If it doesn't reach MEDIUM, don't report it. No "nitpick" or "consider also". (Maps to the reviewer: CRITICAL/HIGH = confidence ≥80, blocking; MEDIUM = informational observation 50-79.)
Three-part proof for HIGH or CRITICAL. Every HIGH or CRITICAL finding names its file:line, the concrete failure scenario, and why no existing guard/check catches it. Missing any of the three downgrades it to MEDIUM, or drops it if it doesn't reach MEDIUM either. Zero findings is a valid verdict — it needs no excuse to look thorough.
0. Pre-pass (before reading line by line)
- Does the diff touch infra/config (
tsconfig*, lint/build config,.env*, CI,settings.json)? Flag → validate the change is intentional. - Does it delete files? Verify no residual imports remain via textual discovery.
- Does it mix unrelated changes (feature + refactor + format-only)? → MEDIUM, ask to split.
1. Types and contracts
- Explicit
anyin new code without justification (// any justified: <reason>) → HIGH. - Cast (
as Foo) without a documented reason → MEDIUM; a cast that hides a type that actually doesn't fit → CRITICAL. - Stale type/interface vs what the code consumes (accesses a field the type doesn't declare) → CRITICAL.
- External data (network response, user input, env) consumed without validating or normalizing → HIGH.
2. Data layer / logic
- Explicit defaults for nullables the consumer uses directly (
?? …) → HIGH if missing. - Functions that should be pure (transformers/adapters) with side-effects (I/O, global state) → CRITICAL.
- Value from an external source (unknown status/enum) assigned raw to a closed type → HIGH.
- New or modified state transition A→B that doesn't state whether B→A exists, and which event triggers it → HIGH. If there's no way back by design, the report says so.
3. Error handling
catchthat swallows the error without propagating or reporting → HIGH.- Operation that can fail (network, parse, IO) without handling, with the failure visible to the user → HIGH.
- Loading/spinner that never turns off on the error path → HIGH.
- Resource opened without cleanup on the error path (connection, lock, stream, listener, subscription, timer): the happy path releases it but a
catch/early-return leaks it → HIGH. - Scheduled job, queue consumer or event listener whose entry point doesn't catch and report → HIGH: one unhandled throw kills the worker or silently stops the cycle.
4. Security and authorization
security-invariants is the single owner of this checklist — business invariants (server-side authorization, guard coverage across every entry point that mutates a resource, IDOR, secrets, trust boundaries, PII) plus its no-scanner fallback patterns. Apply it here and report with its severities; don't restate its items in this skill.
5. No hardcode
- API URLs / literal endpoints instead of the repo's config channel → CRITICAL.
- Status/role strings or option lists duplicated instead of deriving them from a single source → MEDIUM.
- Dates/formats assembled by hand instead of the repo's util → MEDIUM.
6. Naming and structure
- File in the wrong folder per the repo's convention (shared component in
pages/, etc.) → HIGH. - Casing/suffixes that break the repo's convention → MEDIUM.
- Broken migration convention (when new and legacy code coexist and there's an expected suffix/folder) → HIGH.
7. Over-engineering / speculative abstraction
Mirror of the implementer's YAGNI ladder: hunt for the code of excess.
- Abstraction (interface, layer, generic helper, hook) with a single caller and no second consumer in sight → MEDIUM (HIGH if it couples or complicates a critical area).
- A new dependency for what the stdlib, a native platform feature or an already-installed lib solves in a few lines → HIGH.
- Parametrization, config flags or options nobody uses yet ("just in case") → MEDIUM.
- Indirection or pattern (factory, wrapper, event layer) that doesn't eliminate real duplication nor cover a present requirement → MEDIUM.
- A deliberate shortcut without its mark (ceiling + upgrade trigger) → MEDIUM: silent debt is worse than declared debt.
- A function whose cognitive complexity exceeds the repo's threshold (piled-up nesting, branches, flags) → HIGH. Extract before it lands, not after the scanner complains.
Rule: if removing the abstraction leaves the code as correct and shorter, removing it is the finding.
Don't confuse it with incompleteness. Removing the handling of a real edge case, a validation or an error path is NOT simplifying — it's a bug, and it goes to §1-§4 (not here). This dimension attacks excess structure, never missing coverage. What the YAGNI ladder protects (trust boundaries, errors that prevent data loss, security, accessibility) is never over-engineering.
Don't confuse it with complexity. High cognitive complexity is missing structure, not excess: branches and nesting piled into one body that was never split. Extracting to lower it removes nothing correct, so the rule above still holds. A complex function wrapped by a single-caller helper yields two findings, not a conflict: drop the wrapper, split the body.
8. Dead code and debug
console.log/ debug print without a guard in code that gets merged → MEDIUM (in new code: HIGH).- Unused imports or variables → MEDIUM.
- Whole commented-out code /
if (false)/// TODO: removewithout an issue → MEDIUM.
9. Quality gate (run this turn, not assumed)
ruff check . && uv run pytest -m 'not docker'passes → CRITICAL if it fails; this is the same gate thereviewerowns in Pass 2, never re-defined here.- Failure attribution (per
verify-before-done): a failure classified introduced (demonstrated) → HIGH; never classify one by diff location alone.
10. Commit and PR
- Commits follow the repo's convention → MEDIUM if broken.
- Changes to the manifest/lockfile without a clear reason in the description → HIGH.
- New or edited skill → apply
author-skill.
Critical areas
Pay extra attention if the diff touches auth, permissions, payments, data integrity. A finding in those zones goes up one severity level.
Output
- Flat list with severities, ordered CRITICAL → HIGH → MEDIUM. Each line with
file:line. - If there are no findings:
No findings. - No summary, praise, or off-checklist suggestions.
- If you find a new bug pattern that isn't here, save it (memory / note) for future reviews.
Connection with the harness
reviewer: applies this skill in Pass 2 (code quality). CRITICAL/HIGH map to issues with confidence ≥80 (they block APPROVED); MEDIUM to informational observations (50-79).verify-before-done: the §9 quality gate is run this turn, not assumed from the implementer's report.
<!-- /navori:managed id="review-diff-base" -->Repo-specific rules
<!-- user: add here the bespoke rules of your stack/domain (the ones that are NOT generalizable). Suggestions:
- Patterns of your UI lib / framework (forbidden components, required props, mixing libs).
- Conventions of your data layer (mandatory headers, specific clients, mixing legacy/new backends).
- Forms/validation rules of your stack.
- Repo anti-patterns that are auto-CRITICAL.
- Critical areas with their own rules: auth, permissions, payments, data integrity.
-->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.

