code-reviewer
Skill22 starsChanged 2 months agoMITView on GitHub
Reviews a code diff or pull request for correctness bugs, security vulnerabilities, and quality/maintainability problems, producing severity-ranked findings with file/line references and concrete fix suggestions. Use this skill when the user asks to "review this PR", "review my diff", "code review", "look over these changes", "check this code before merge", "find bugs in this change", or pastes a diff/patch and wants feedback. Applies to git diffs, GitHub/GitLab PRs, staged changes, or a set of changed files in any language.
We split this skill into the rules it gives an agent
10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 148 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Before a merge, when the user wants a gate check.
- Distinctive: line 22
After implementing a feature, to self-review prior to opening a PR.
- Distinctive: line 26
Follow these steps in order.
- Distinctive: line 35
If only file paths are given, read those files and, where needed, the symbols they call.
- Very specific: line 49
Do not read the entire repo.
- Very specific: line 62
Use templates/review-report.md.
- Very specific: line 66
If asked, post inline comments via gh pr review / gh pr comment.
- Distinctive: line 78
When unsure between two levels, pick the higher one and say why.
- Distinctive: line 82
Only flag what you can justify: Every finding needs a concrete failure scenario or rule.
- Distinctive: line 88
Confidence labeling: If you are not certain, prefix with "Possible:" and state what would confirm it.
“Common” is measured: kept by at least 6 in 10 of the 148 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 Reviewer
Overview
This skill performs a thorough, structured code review of a change set (a diff, a pull request, staged changes, or a list of modified files). It surfaces correctness bugs, security vulnerabilities, and quality/maintainability issues, ranks every finding by severity, and gives an actionable fix for each one.
Keywords: code review, PR review, diff review, bug hunting, security review, pull request, merge readiness, static review, defect detection.
The review is diff-scoped by default: focus on what changed and what the change touches. Do not rewrite the whole codebase. The deliverable is a review report, not a refactor.
When To Use
- User says "review this PR / diff / branch / changes".
- User pastes a patch, unified diff, or set of files and asks for feedback.
- Before a merge, when the user wants a gate check.
- After implementing a feature, to self-review prior to opening a PR.
Workflow
Follow these steps in order.
1. Gather the change set
Determine exactly what to review. Prefer the narrowest accurate scope.
- GitHub PR:
gh pr diff <number>(orgh pr view <number> --json files,title,body). - Local branch vs base:
git diff <base>...HEAD(three-dot = changes on the branch since it forked). - Staged:
git diff --staged. Unstaged:git diff. - A given commit:
git show <sha>. - If only file paths are given, read those files and, where needed, the symbols they call.
Capture: changed files, hunks, the PR title/description (intent), and the target branch.
2. Understand intent before judging
Read the PR description / commit messages to learn what the change is supposed to do. A bug is a divergence between intent and behavior — you cannot find bugs without knowing intent. If intent is unclear, note it as a finding ("unclear intent / missing description") and review against the most reasonable interpretation.
3. Build minimal context
For each changed function, pull in just enough surrounding code to judge correctness:
- The function signature and its callers (does the change break callers?).
- Types/interfaces touched.
- Tests covering the changed code.
- Config/migration files referenced by the diff.
Do not read the entire repo. Use grep/search to find callers and definitions on demand.
4. Pass over the diff with three lenses
Review each hunk through three lenses, in this priority order. Use references/review-checklist.md as the master checklist and references/security-checklist.md for the security lens.
- Correctness — does it do the right thing for all inputs? (off-by-one, null/None, error handling, concurrency, edge cases, regressions, broken contracts).
- Security — can it be abused? (injection, authz/authn, secrets, unsafe deserialization, SSRF, path traversal, crypto misuse).
- Quality / maintainability — is it readable, tested, consistent, and not needlessly complex? (naming, duplication, dead code, missing tests, magic numbers, leaky abstractions).
5. Rank every finding by severity
Assign exactly one severity per finding using the rubric in "Severity Rubric" below. Sort the final report Critical → High → Medium → Low → Nit.
6. Write the report
Use templates/review-report.md. Each finding must include: severity, category, file:line, a one-line summary, why it matters, and a concrete suggested fix (ideally a diff snippet). End with a verdict: Approve, Approve with nits, Request changes, or Block.
7. Optional: post or self-check
- To estimate effort and sanity-check coverage, run
scripts/diff_stats.pyagainst the diff. - If asked, post inline comments via
gh pr review/gh pr comment.
Severity Rubric
| Severity | Meaning | Examples |
| Critical | Will cause data loss, security breach, or outage in production. Must fix before merge. | SQL injection, auth bypass, hardcoded secret, unhandled exception on the happy path, data-corrupting migration. |
| High | Correctness bug or vuln that triggers under realistic conditions. Fix before merge. | Off-by-one on a boundary, null deref on common input, race on shared state, missing input validation, broken error handling. |
| Medium | Bug under uncommon conditions, or a real maintainability problem. Fix soon. | Edge case only on empty input, N+1 query, missing test for new branch, leaky resource on error path. |
| Low | Minor issue, low blast radius. Nice to fix. | Inconsistent naming, redundant code, slightly unclear logic, missing doc. |
| Nit | Style/preference, non-blocking. | Formatting, wording, import order. |
When unsure between two levels, pick the higher one and say why. Do not inflate nits to high; that erodes trust in the review.
Decision Heuristics
- Only flag what you can justify. Every finding needs a concrete failure scenario or rule. No vague "this could be better."
- Scope discipline. Pre-existing issues outside the diff are out of scope unless the diff makes them materially worse — if so, flag as Low/Medium with "pre-existing, surfaced by this change."
- Prefer the smallest fix. Suggest the minimal change that resolves the issue, not a rewrite.
- Tests are part of correctness. New logic without a test covering its main branch is at least Medium.
- Read the error paths. Most real bugs hide in
catch/except, retries, cleanup, and early returns — not the happy path. - Assume hostile input for anything crossing a trust boundary (HTTP params, files, env, deserialization, DB rows from other tenants).
- Confidence labeling. If you are not certain, prefix with "Possible:" and state what would confirm it. Never fabricate line numbers.
Output Format
Produce the report from templates/review-report.md. Keep findings dense:
[High] Correctness — src/auth/session.py:42
Session token compared with `==`, enabling a timing attack and (on None) a TypeError.
Fix: use `hmac.compare_digest(a, b)` and guard for None before comparing.Group by severity, highest first. Give a Summary line with counts (e.g., "1 Critical, 2 High, 3 Medium") and a final Verdict.
Best Practices
- Lead with the verdict and the count summary so the reader knows the stakes immediately.
- Cite exact
file:linefrom the diff for every finding. - Give a fix, not just a complaint — a diff snippet beats prose.
- Separate blocking issues (Critical/High) from polish (Low/Nit) visually.
- Acknowledge what is good briefly; reviews that are 100% negative get ignored.
- Be specific and kind. Critique the code, not the author.
Common Pitfalls
- Reviewing the whole file instead of the diff — wastes effort and produces out-of-scope noise.
- Nit-flooding — burying one Critical under 30 style nits. Keep nits at the bottom and brief.
- Vague findings — "consider refactoring" with no rule or scenario.
- Missing the security lens on data that crosses trust boundaries.
- Hallucinated line numbers / APIs — always anchor to the actual diff; mark uncertainty as "Possible:".
- Ignoring tests — a feature change with no test is an incomplete change.
- Approving on style alone while a logic bug sits unreviewed in the error path.
Bundled Files
references/review-checklist.md— full multi-language correctness & quality checklist (the master pass).references/security-checklist.md— OWASP-aligned security review checklist with concrete patterns.templates/review-report.md— the output template for the review.examples/sample-review.md— a worked example: input diff → produced review.scripts/diff_stats.py— stdlib script that summarizes a unified diff (files, churn, risk hints) to size the review.
Other versions176 projects use a version of this.
Word for word · 2
- JayRHa/agent-skills★ 12100% same
- JayRHa/AgentSkills★ 12100% same
Edited · 0
None found.
Wrote their own version · 174
- google-gemini/gemini-cli★ 109ksame name
- NVIDIA/SkillSpector★ 24ksame name
- Jeffallan/claude-skills★ 12ksame name
- jewbetcha/openflight★ 1.2ksame name
- web-infra-dev/rsdoctor★ 1.1ksame name
- zhnnky329/MathModeling-skills★ 1.1ksame name
- MageByte-Zero/spec-superflow★ 875same name
- waybarrios/opencode-power-pack★ 547same name
- Karanjot786/TermUI★ 237same name
- elithrar/dotfiles★ 222same name
164 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 git-doc-updater, git-precommit and 9 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.
u9401066Skillgit-doc-updater
Auto-check and update key documentation before Git commits to keep docs in sync with code. Triggers: docs, 文檔, 更新文檔, sync docs, release, 發布.
Also in 4 projects that use this
u9401066Skillgit-precommit
Orchestrate pre-commit workflow including Memory Bank sync, README/CHANGELOG/ROADMAP updates. Triggers: GIT, gc, push, commit, 提交, 準備 commit, 要提交了, git commit, pre-commit, 推送.
Also in 4 projects that use this
JeffallanSkillsecure-code-guardian
Use when implementing authentication/authorization, securing user input, or preventing OWASP Top 10 vulnerabilities — including custom security implementations such as hashing passwords with bcrypt/argon2, sanitizing SQL queries with parameterized statements, configuring CORS/CSP headers, validating input with Zod, and setting up JWT tokens. Invoke for authentication, authorization, input validation, encryption, OWASP Top 10 prevention, secure session management, and security hardening. For pre-built OAuth/SSO integrations or standalone security audits, consider a more specialized skill.
Also in 7 projects that use this
JeffallanSkillspec-miner
Reverse-engineering specialist that extracts specifications from existing codebases. Use when working with legacy or undocumented systems, inherited projects, or old codebases with no documentation. Invoke to map code dependencies, generate API documentation from source, identify undocumented business logic, figure out what code does, or create architecture documentation from implementation. Trigger phrases: reverse engineer, old codebase, no docs, no documentation, figure out how this works, inherited project, legacy analysis, code archaeology, undocumented features.
Also in 4 projects that use this
JohnJBorenSkilltest-engineer
Testing strategy, test patterns, and coverage optimization for unit, integration, and E2E tests
Also in 11 projects that use this
- +4 more from u9401066
- +2 more from Jeffallan
In this repository194 other files it gives its agents.
- 0-templateSkill
- ab-test-analyzerSkill
- academy-guideSkill
- add-to-my-skillsSkill
- adr-authorSkill
- ai-tools-setupSkill
- algorithmic-artSkill
- api-and-interface-designSkill
- api-designerSkill
- api-docs-writerSkill
- apple-store-submitSkill
- aws-cost-optimizerSkill
- bash-script-hardeningSkill
- blog-post-writerSkill
- book-summarizerSkill
- branch-cleanupSkill
- brand-copy-landingSkill
- brand-copySkill
- brand-designSkill
- brand-guidelinesSkill
- browser-testing-with-devtoolsSkill
- canvas-designSkill
- changelog-generatorSkill
- changelog-keeperSkill
- chart-chooserSkill
- ci-cd-and-automationSkill
- ci-fix-loopSkill
- claude-apiSkill
- cloudflare-block-countriesSkill
- coderabbitloopSkill
- code-review-and-qualitySkill
- code-simplificationSkill
- codexloopSkill
- comms-notionSkill
- comms-slackSkill
- comms-whatsappSkill
- competitive-analysisSkill
- concept-explainerSkill
- constraint-driven-developmentSkill
- context-engineeringSkill
- context-repoSkill
- cover-letter-writerSkill
- crash-courseSkill
- cron-schedulerSkill
- data-digestSkill
- data-pipeline-architectSkill
- debug-detectiveSkill
- debugging-and-error-recoverySkill
- decision-matrixSkill
- dependabot-triageSkill
- dependency-upgraderSkill
- deprecation-and-migrationSkill
- dev-instantdbSkill
- discernment-nudgeSkill
- doc-coauthoringSkill
- dockerfile-proSkill
- docs-index-keeperSkill
- documentation-and-adrsSkill
- docxSkill
- doubt-driven-developmentSkill
- 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.
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.

