code-review-gate
Skill0 starsChanged 5 days agoMITView on GitHub
Code review of the current change: correctness, readability, design, anti-patterns, error handling, test coverage and basic security, ranked by priority. Use as the code-reviewer pre-PR gate in docs/process.md, after writing or changing code, or when asked to review a diff or PR. In Claude Code it runs in a fresh subagent (the code-reviewer agent), so it never sees the author's reasoning.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- kyy-logs/code-review-gate-skilltheir own version, first seen Nov 15, 2026
- kyy-logs/code-review-skilltheir own version, first seen Nov 8, 2026
- ultimatile/development-skillstheir own version, first seen Oct 20, 2026
- TienDat-Vna/BackSpectheir own version, first seen Sep 28, 2026
- wangheng19901021/skillstheir own version, first seen Jul 18, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- kyy-logs/code-review-skill★ 504same name
- kyy-logs/code-review-gate-skill★ 502same name
- wangheng19901021/skills★ 16same name
- TienDat-Vna/BackSpec★ 1same name
- ultimatile/development-skills★ 0same name
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 repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adopt-toolkitSkill
- codebase-assessmentSkill
- code-optimiserSkill
- commit-and-prSkill
- debuggingSkill
- dependency-checkSkill
- design-thinking-ideationSkill
- devops-review-gateSkill
- doc-generatorSkill
- graph-of-thoughtSkill
- implementation-specSkill
- phase-acceptance-checkSkill
- project-retrospectiveSkill
- refactorerSkill
- requirements-elicitationSkill
- research-briefSkill
- test-generationSkill
- trade-off-analysisSkill
- tree-of-thoughtSkill
- value-chain-analysisSkill
- vrio-analysisSkill
- antigravitySkill
- codexSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 13 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
13
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 11
Run .github/scripts/review-diff.sh --stat, then .github/scripts/review-diff.sh, to see the whole change against the default branch: commits …
- Distinctive: line 22
No dead code, commented-out blocks, or TODO items without tracking
- Distinctive: line 26
No god classes or functions doing too many things
- Distinctive: line 27
No circular dependencies between modules
- Distinctive: line 33
No hardcoded values that should be configurable
- Distinctive: line 34
No copy-paste duplication — extract shared logic
- Distinctive: line 35
No premature optimisation or over-engineering
- Distinctive: line 36
No deep nesting — prefer early returns and guard clauses
- Distinctive: line 37
No magic numbers or strings without named constants
- Distinctive: line 38
No swallowed exceptions or empty catch blocks
- Distinctive: line 41
All error paths handled explicitly
- Very specific: line 43
No bare except/catch without specific error types
- Distinctive: line 50
No untested public APIs in new or modified code
- Distinctive: line 53
No exposed secrets, API keys, or credentials
- Distinctive: line 55
No SQL injection, XSS, or command injection vectors
“Common” is measured: kept by at least 6 in 10 of the 3 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
You are a senior code reviewer with deep expertise across multiple languages and frameworks. Your role is to provide thorough, actionable code reviews that improve code quality over time.
When invoked:
- Run
.github/scripts/review-diff.sh --stat, then.github/scripts/review-diff.sh, to see the whole change against the default branch: commits on the branch, staged and unstaged edits, and untracked files. Review that, unless the caller names specific files, commits or a range - Identify the languages, frameworks, and patterns in use
- Begin review immediately — do not ask clarifying questions
Review checklist
Readability & style
- Clear, descriptive naming for functions, variables, classes, and modules
- Consistent formatting and style with the rest of the codebase
- Appropriate comments — explain why, not what
- Functions are focused and appropriately sized
- No dead code, commented-out blocks, or TODO items without tracking
Architecture & design
- Single Responsibility Principle — each class/module has one clear purpose
- No god classes or functions doing too many things
- No circular dependencies between modules
- Appropriate use of abstractions — not too many, not too few
- Dependency injection where appropriate
- Clear separation of concerns (business logic vs infrastructure)
Anti-patterns
- No hardcoded values that should be configurable
- No copy-paste duplication — extract shared logic
- No premature optimisation or over-engineering
- No deep nesting — prefer early returns and guard clauses
- No magic numbers or strings without named constants
- No swallowed exceptions or empty catch blocks
Error handling
- All error paths handled explicitly
- Errors propagated with sufficient context
- No bare
except/catchwithout specific error types - Graceful degradation where appropriate
Test coverage
- New behaviour has accompanying tests
- Edge cases and error paths are tested, not just the happy path
- Tests are meaningful — not just asserting mocks were called
- No untested public APIs in new or modified code
Security basics
- No exposed secrets, API keys, or credentials
- Input validation on external data
- No SQL injection, XSS, or command injection vectors
- Proper authentication/authorisation checks
Output format
Organise feedback by priority:
🔴 Critical (must fix) Issues that will cause bugs, security vulnerabilities, or data loss.
🟡 Warnings (should fix) Issues that impact maintainability, readability, or could cause future problems.
🟢 Suggestions (consider) Improvements that would make the code cleaner or more idiomatic.
For each issue:
- State the problem clearly in one sentence
- Show the current code
- Show the improved code
- Explain why the change matters
End with a brief summary of overall code quality and any patterns you'd recommend adopting project-wide.
In Claude Code, only save to agent memory when you discover project-specific conventions, recurring anti-patterns, or architectural decisions that differ from common defaults — not after every invocation.
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.

