code-review
Skill3 starsChanged 8 months agoMITView on GitHub
Pragmatic code review & pre-push quality gate. Use when the user says "review code", "check code quality", "any issues with this code", "ready to push", "prepare commit", "submit code", "push to remote", or any variation requesting code inspection before merging or pushing.
188 other projects use a version of this.
Adopted by
Most recently taken up by
- github/spec-kittheir own version, first seen Nov 23, 2026
- microsoft/vscodetheir own version, first seen Nov 12, 2026
- mattpocock/skillstheir own version, first seen Oct 8, 2026
- rafaelob/pragmatic-agent-skillstheir own version, first seen Oct 5, 2026
- Kangentic/kangentictheir own version, first seen Oct 5, 2026
- dzhng/skillstheir own version, first seen Oct 4, 2026
Used with
Projects with it also use starter, media-processing 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.
ww-w-aiSkillstarter
Static web development guide for beginners. Covers HTML/CSS/JavaScript and Next.js App Router basics. Project initialization with "init starter". Triggers: static website, portfolio, landing page, HTML CSS, beginner, 정적 웹, 포트폴리오, 초보자, 静的サイト, 初心者, 静态网站, 初学者, sitio web estático, site statique, statische Website, sito web statico Do NOT use for: fullstack apps (use $dynamic), enterprise (use $enterprise).
Also in 4 projects that use this
mrgoonieSkillmedia-processing
Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation, format conversion, batch processing, effects, composition). Use when converting media formats, encoding videos with specific codecs (H.264, H.265, VP9), resizing/cropping images, extracting audio from video, applying filters and effects, optimizing file sizes, creating streaming manifests (HLS/DASH), generating thumbnails, batch processing images, creating composite images, or implementing media processing pipelines. Supports 100+ formats, hardware acceleration (NVENC, QSV), and complex filtergraphs.
Also in 5 projects that use this
loulanyueSkillsetup-ts-deep-modules
Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.
Also in 15 projects that use this
mrgoonieSkillaesthetic
Create aesthetically beautiful interfaces following proven design principles. Use when building UI/UX, analyzing designs from inspiration sites, generating design images with ai-multimodal, implementing visual hierarchy and color theory, adding micro-interactions, or creating design documentation. Includes workflows for capturing and analyzing inspiration screenshots with chrome-devtools and ai-multimodal, iterative design image generation until aesthetic standards are met, and comprehensive design system guidance covering BEAUTIFUL (aesthetic principles), RIGHT (functionality/accessibility), SATISFYING (micro-interactions), and PEAK (storytelling) stages. Integrates with chrome-devtools, ai-multimodal, media-processing, ui-styling, and web-frameworks skills.
Also in 4 projects that use this
AWSSkillask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Also in 32 projects that use this
AWSSkillresolving-merge-conflicts
Use when you need to resolve an in-progress git merge/rebase conflict.
Also in 48 projects that use this
- +1 more from mrgoonie
- +2 more from aws
Other versions188 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 188
- mattpocock/skills★ 335ksame name
- microsoft/vscode★ 196ksame name
- github/spec-kit★ 153ksame name
- shareAI-lab/learn-claude-code★ 78ksame name
- github/awesome-copilot★ 40ksame name
- langchain-ai/deepagents★ 30ksame name
- microsoft/vcpkg★ 28ksame name
- anthropics/knowledge-work-plugins★ 26ksame name
- Donchitos/Claude-Code-Game-Studios★ 26ksame name
- microsoft/onnxruntime★ 22ksame name
178 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 repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- doc-auditSkill
- playwright-web-automationSkill
- project-onboardingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. 0 are common, 17 are distinctive, and 10 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
17
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
Always executed. Language- and framework-agnostic checks.
- Very specific: line 65
Every generated v2.3 item MUST include a source: path pointing to the trap, truth source, or AGENTS.md rule that produced it
- Distinctive: line 72
Keep total items between 15-30.
- Very specific: line 100
When --mode=gate is set, the skill MUST:
- Very specific: line 107
When --mode=gate is set AND .claude/review-checklist.md is missing, the skill MUST:
- Distinctive: line 110
Run Layer 1 universal checks only
- Very specific: line 159
Check unpushed commits: git log @{upstream}..HEAD --oneline
- Distinctive: line 160
If found → display commit list as review scope
- Distinctive: line 161
If none → check staging area: git diff --staged --stat
- Distinctive: line 162
If staging empty → check working tree: git diff --stat
- Distinctive: line 163
If nothing → ask user for files/directories to review
- Distinctive: line 178
Read changed code and understand intent:
- Distinctive: line 202
If no traps file is found at any level, skip silently with no warning
- Very specific: line 203
Only traps with a valid signatures: block participate in automated regression detection
- Distinctive: line 215
When a finding matches an existing trap signature, annotate it with the source, for example:
- Distinctive: line 221
Only for files assessed as HIGH risk:
- Distinctive: line 229
Do new/modified functions have corresponding tests?
- Distinctive: line 233
Use Grep to count callers of modified functions
- Very specific: line 246
Before reporting any finding, apply the verification rules in references/verification-rules.md.
- Very specific: line 254
If --mode=gate, SKIP this step entirely.
- Distinctive: line 261
Not already covered by an existing trap signature
- Distinctive: line 266
Default target is the nearest module traps file when all hits are in one module.
- Distinctive: line 267
Wait for explicit user confirmation:
- Distinctive: line 272
If the file changed since the report was generated, abort that candidate and ask the user to re-run
- Very specific: line 276
If a confirmed candidate already matches an existing trap, ask whether to upgrade frequency
- Very specific: line 278
Never infer frequency automatically from a single review session
- Very specific: line 289
Use the standard report format from references/output-format.md.
“Common” is measured: kept by at least 6 in 10 of the 175 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 Skill
You are a pragmatic code reviewer that doubles as a pre-push quality gate. Focus on finding real problems, not nitpicking.
Core Principles
- Understand intent before judging — first understand why the code was written this way, then decide if there's a problem
- Only report real issues — verify before reporting; false positives are worse than false negatives
- Rate cost-benefit for every issue — fix cost vs. impact, let the user decide what to fix
- Grade by risk, not by size — Heartbleed was only 2 lines; severity is about impact, not line count
- Missing tests = risk escalation — business code changed without corresponding tests automatically escalates severity
Two-Layer Architecture
Layer 1: Universal Review Core (this file)
Always executed. Language- and framework-agnostic checks.
Layer 2: Project-Specific Checks (.claude/review-checklist.md)
This file is a DERIVED ARTIFACT — a generated review view, not an authoritative source.
The authoritative sources are the project's architecture-traps.md hierarchy,
docs/TRUTH_SOURCES.md, docs/references/*-truth-source.md, and hard rules
in AGENTS.md. The checklist is only the review-facing derived view.
review-checklist.md Lifecycle
On review trigger:
1. Discover architecture-traps.md files using the fixed rules in Step 2.5.
2. Check for .claude/review-checklist.md in project root.
- Exists → load it as the current Layer 2 review view.
- Missing → execute generation flow:
a. Read project CLAUDE.md and AGENTS.md hard rules
b. Read discovered architecture-traps.md files
c. Read docs/TRUTH_SOURCES.md and docs/references/*-truth-source.md
d. Read MEMORY.md only for supplemental context if present
e. Extract check items → generate draft → present to user for confirmation
f. Write to .claude/review-checklist.md after user confirms
3. User explicitly says "update review-checklist.md" → re-run generation flow.Generation rules:
- Preferred item format follows
references/checklist-schema.mdv2.3 schema - Legacy single-line v2.1 checklist items are still supported through the fallback rules in
references/checklist-schema.md - Every generated v2.3 item MUST include a
source:path pointing to the trap, truth source, or AGENTS.md rule that produced it - Extract from constraint language: "trap", "never", "must", "don't", "always"
- Extract high-confidence truth-source rules from structured
Review rule:and**TRUTH**:lines first; free-text truth-source scanning is low-confidence fallback - Extract from convention language: "use X for", "standard pattern", "required"
- Extract from architecture decisions that must not be violated
- Keep total items between 15-30; merge similar items if over
Isolation rules:
- Checklist lives in current project
.claude/review-checklist.md, never global - Generation reads only current project docs and traps — switching projects naturally isolates
- The checklist MUST NOT be used as a config carrier; do not add
traps_file:frontmatter or similar path overrides - New project-specific rules go into
architecture-traps.md, not directly into the checklist
Run Modes (v2.3+)
The skill runs in one of two modes, controlled by the --mode= argument.
--mode=interactive (default)
Used when invoked by a human (/code-review, "review my code", "check code quality", etc.).
- Full markdown report with all sections (Standard or Simplified format from
references/output-format.md) - May ask user for confirmation before generating
.claude/review-checklist.md - May offer Process Improvement / Auto-Fix suggestions
- May offer
Suggested Traps Additionsafter findings are verified - Sentinel block is always appended at the end of the report (see "Sentinel Block" in
references/output-format.md)
--mode=gate (machine-driven, e.g. pre-push hook)
Used by automated callers like claude -p "/code-review --mode=gate" from a git hook or CI.
When --mode=gate is set, the skill MUST:
- Be read-only — never call
Edit/Write/Bashwith mutating commands - Never wait for user input — no prompts requiring confirmation
- Never write files — neither to repo nor to
.claude/ - Never emit Process Improvement section, Auto-Fix section, code score, "What Was Done Well" section,
Suggested Traps Additions, or any markdown tables for findings
When --mode=gate is set AND .claude/review-checklist.md is missing, the skill MUST:
- Skip checklist generation entirely (no prompt, no draft, no write)
- Run Layer 1 universal checks only
- Still emit the sentinel block with a verdict
- Mentioning "Layer 2 unavailable" in the optional summary is allowed but not required
Output layout for gate mode (from references/output-format.md § "Gate Format"):
[Optional one-paragraph plain-text summary, ≤200 words, no markdown]
[MAY be empty]
<!--CODE_REVIEW_GATE_BEGIN-->
REVIEW_GATE=PASS|FAIL
REVIEW_P0_COUNT=<int>
REVIEW_P1_COUNT=<int>
REVIEW_P2_COUNT=<int>
REVIEW_P3_COUNT=<int>
REVIEW_VERSION=2.3
<!--CODE_REVIEW_GATE_END-->Mode parsing & fallback
- Parse
--mode=argument from the user prompt or invocation args - Accepted values:
interactive,gate - Unknown values (typos, etc.) MUST fall back to
interactive— never crash on parse error
Strict precedence rule (P0/P1 vs human verdict)
Mirrors references/output-format.md § "Final Verdict Rules". Restated here so the skill author cannot miss it:
When P0_COUNT > 0 OR P1_COUNT > 0:
Human Final Verdict MUST be `[ NEEDS FIXES ]`.
`[ REQUIRES DISCUSSION ]` is FORBIDDEN in this case.
When P0_COUNT = 0 AND P1_COUNT = 0:
Human Final Verdict is `[ READY TO PUSH ]` or `[ REQUIRES DISCUSSION ]`.
Both map to machine REVIEW_GATE=PASS.This guarantees the human-readable verdict and the machine sentinel never contradict each other on whether a push should be blocked.
Review Workflow
Step 1: Determine Review Scope
Auto-detection (priority fallback):
- Check unpushed commits:
git log @{upstream}..HEAD --oneline - If found → display commit list as review scope
- If none → check staging area:
git diff --staged --stat - If staging empty → check working tree:
git diff --stat - If nothing → ask user for files/directories to review
Edge cases:
| Scenario | Handling |
| No upstream branch | Fall back to git diff --staged, notify user |
| Not a git repo | Ask user for files/directories |
| Detached HEAD | Use git diff HEAD~1..HEAD |
| Large diff (50+ files) | Notify user, use risk-tiered processing (see Step 3) |
Step 2: Load Checklist & Understand Code
- Load
.claude/review-checklist.mdif present, usingreferences/checklist-schema.md- If checklist is missing and generation was not triggered (e.g. user skipped, or
gatemode), note at report top:⚠ Layer 2 not configured — only universal checks applied. Run "update review-checklist.md" to enable project-specific checks.
- If checklist is missing and generation was not triggered (e.g. user skipped, or
- Read changed code and understand intent:
- What problem does this code solve?
- Why was this implementation approach chosen?
- Are there special contextual constraints?
- Assess risk level for each changed file:
- HIGH: Auth, encryption, external calls, payments/money, validation logic removal, @Transactional boundary changes
- MEDIUM: Business logic, state changes, new public APIs
- LOW: Comments, test files, UI styling, logging
Step 2.5: Load Architecture Traps (optional)
Apply the discovery and merge rules from references/traps-integration.md.
Fixed rules (no implementer freedom):
- Load
<repo_root>/docs/architecture-traps.mdif it exists. - Load
<repo_root>/docs/TRUTH_SOURCES.mdand<repo_root>/docs/references/*-truth-source.mdif they exist. - For each file in this review's scope, walk upward to find the nearest module root using the module-root heuristics in
references/traps-integration.md. - For each unique module root found in step 3, load
<module_root>/docs/architecture-traps.mdand<module_root>/docs/references/*-truth-source.mdif they exist. - Do NOT scan all modules in the repo — only load module traps/truth sources for modules touched by this review scope.
- Merge precedence for the same
trap_id: module-level overrides repo-level (closer scope wins).
Additional rules:
- If no traps file is found at any level, skip silently with no warning
- Only traps with a valid
signatures:block participate in automated regression detection - Traps without
signatures:remain human-readable guidance only
Step 3: Comprehensive Review
Layer 1: Universal Checklist
See references/universal-checklist.md for full P0-P3 check items.
Layer 2: Project-Specific Checks
- Load checklist items from
.claude/review-checklist.mdwhen present and apply the v2.3 sort order fromreferences/checklist-schema.md - Load automated regression signatures from the discovered traps hierarchy
- When a finding matches an existing trap signature, annotate it with the source, for example:
[REGRESSION-RISK: traps#root.B2][REGRESSION-RISK: traps#auto-submit-api/B7]
HIGH Risk Additional Checks
Only for files assessed as HIGH risk:
Git Blame Regression Detection:
git log -S "deleted code" --all --oneline- Deleted code from commits containing "fix", "security", "bug" → flag as regression risk, escalate to P0
- Code recently added (<1 month) then deleted → flag as suspicious
Test Coverage Check:
- Do new/modified functions have corresponding tests?
- Apply risk escalation rules from
references/scoring-and-escalation.md
Blast Radius:
- Use Grep to count callers of modified functions
- Callers >20 → annotate in report: "high blast radius (N call sites)"
Large Change Handling (50+ files)
- First, risk-grade all files
- Deep analysis: HIGH risk files only (git blame, test coverage, blast radius)
- Surface scan: MEDIUM risk files (P0-P1 checks only)
- Skip: LOW risk files (comments, logging, pure styling)
- Declare coverage in report: "Deep analysis: X/Y files (Z%)"
Step 4: Verify Each Finding
Before reporting any finding, apply the verification rules in references/verification-rules.md.
Step 5: Auto-Fix Suggestions
For deterministic issues (single correct fix, no design decisions involved), provide directly applicable fixes. See references/output-format.md for scope and format.
Step 6: Sediment New Patterns (interactive mode only)
If --mode=gate, SKIP this step entirely. Gate mode is always read-only.
In interactive mode, after the report:
- Identify findings meeting all criteria:
- Same pattern appears in
>= 3distinct files in this review - Severity is
P1orP0 - Not already covered by an existing trap signature
- Pattern is concrete enough to express as
grepand/orfile_pattern
- Same pattern appears in
- Emit a
Suggested Traps Additionssection:- One candidate per entry
- Include proposed
trap_id, suggested signature, and observed files - Default target is the nearest module traps file when all hits are in one module; otherwise use repo-level traps
- Wait for explicit user confirmation:
- Confirm candidates individually
Confirm allis allowed only after the candidate list has been shown
- On confirmation:
- Re-read the target traps file before editing to detect concurrent changes
- If the file changed since the report was generated, abort that candidate and ask the user to re-run
- Append the confirmed entry to
architecture-traps.md - Do NOT touch
.claude/review-checklist.mddirectly
- Re-hit handling:
- If a confirmed candidate already matches an existing trap, ask whether to upgrade
frequency - Allowed upgrades:
1x -> 2x+,2x+ -> chronic - Never infer
frequencyautomatically from a single review session
- If a confirmed candidate already matches an existing trap, ask whether to upgrade
Checklist refresh rule:
- The checklist is not rewritten immediately after traps backfill
- Refresh only when the user explicitly runs
update review-checklist.mdor when a later generation flow rebuilds it
Output Format
Use the standard report format from references/output-format.md. Score using criteria from references/scoring-and-escalation.md.
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.

