review-code
Skill1 starsChanged 6 days agoMITView on GitHub
Self-review your own code changes on the current branch vs the base branch. Use when the user wants a quality check on their own work before sharing - whether they say "review my code", "check my changes", "is this ready to ship", "self-review", or just ask you to look over what they just built. Runs STRICT-mode review across all P0-P4 tiers, shows findings, and offers to auto-fix. Invoke with /kaizen:review-code [repo-name] (or /review-code on a clone install).
69 other projects use a version of this.
Adopted by
Most recently taken up by
- serionist/claude-session-restoretheir own version, first seen Nov 8, 2026
- GeiserX/sstacktheir own version, first seen Nov 8, 2026
- GeiserX/agent-skillstheir own version, first seen Nov 6, 2026
- GeiserX/claude-skillstheir own version, first seen Nov 6, 2026
- 0xdeafcafe/skillstheir own version, first seen Nov 6, 2026
- ayushgoel/skillstheir own version, first seen Nov 5, 2026
Used with
Projects with it also use audit-test-suite, change-data-safely 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.
yaohuangguanSkillaudit-test-suite
Find where an existing test suite is weak and decide what to test next, ranked by risk. Use this when asked to add missing tests, find gaps, raise coverage, assess test quality or see which areas are thin, even if the request only mentions a coverage percentage.
Also in 3 projects that use this
yaohuangguanSkillchange-data-safely
Change a database schema or stored data without breaking running code or losing data. Use this for any migration, new or changed column, backfill, bulk update, delete, index, or change to a stored format, including in small projects. Data mistakes are often impossible to undo.
Also in 3 projects that use this
mrdulasolutionsSkillclear-caches
Clear extension caches, analysis data, and drafts from the database. Use when testing sender lookups, analysis, or draft generation from a clean state.
Also in 3 projects that use this
GeiserXSkilldocs-loop
Use when the user asks to audit docs, check documentation for stale claims, or verify docs against the code.
Also in 3 projects that use this
mrdulasolutionsSkillelectron-devtools-testing
Test the Electron app interactively using Chrome DevTools Protocol. Use when the user asks to test, verify, or interact with the running app via browser automation.
Also in 3 projects that use this
GeiserXSkillfull-loop
Drive a repository to done with sergio-loop, then keep improving it with refine-loop at a descending theta. Use only when the user explicitly invokes full-loop.
Also in 3 projects that use this
- +1 more from mrdulasolutions
- +4 more from GeiserX
- +1 more from yaohuangguan
Other versions69 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 69
- penpot/penpot★ 62ksame name
- pnpm/pnpm★ 37ksame name
- verdaccio/verdaccio★ 18ksame name
- NVIDIA-NeMo/DataDesigner★ 2.4ksame name
- OpenAEV-Platform/openaev★ 1.8ksame name
- bazel-contrib/rules_python★ 692same name
- wataru-maeda/react-native-boilerplate★ 521same name
- ankitvgupta/exo★ 494same name
- ankitvgupta/mail-app★ 494same name
- ninehills/skills★ 280same name
59 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 repository8 other files it gives its agents.
- commitSkill
- fix-pr-commentsSkill
- githubSkill
- hoply-daySkill
- loop-auditSkill
- model-balanceSkill
- self-learnSkill
- setupSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 13 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 58 edited versions we read keep these.
13
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
- Very specific: line 16
If argument provided (e.g., /review-code api), resolve {arg} against project config: .claude/dev.config.json (searched from cwd upward) -> …
- Distinctive: line 17
If no argument, detect from current working directory
- Distinctive: line 19
Verify it's a git repo:
- Distinctive: line 38
If the diff is empty, also try:
- Distinctive: line 50
If everything is empty, inform the user there are no changes to review.
- Very specific: line 59
Read the shared review rules in rules.md, the file next to this SKILL.md in the same skill directory.
- Distinctive: line 65
Read the project-specific CLAUDE.md for additional standards:
- Distinctive: line 75
Read the full current version of the file (not just the diff)
- Distinctive: line 76
Read related files - imports, base classes, interfaces, shared utilities
- Distinctive: line 142
If no issues found, report that the code looks clean.
- Distinctive: line 146
If there are auto-fixable issues, ask the user:
- Distinctive: line 150
Use AskUserQuestion with options:
- Very specific: line 160
Run the resolved linter after each file, against the repo path rather than by changing directory (e.g.
- Distinctive: line 179
Always read full source files for context - never review diff in isolation
- Distinctive: line 180
Run linter after every file modification
- Distinctive: line 181
Do NOT auto-fix without user confirmation
“Common” is measured: kept by at least 6 in 10 of the 58 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
Review Code (Self-Review)
Shipped with JB Kaizen. Review your own changes on the current branch against the base branch (from dev.config.json -> baseBranch, default develop). Uses STRICT mode - all priority tiers P0-P4.
Instructions
Step 1: Detect Repository
Determine the target repo:
- If argument provided (e.g.,
/review-code api), resolve{arg}against project config:.claude/dev.config.json(searched from cwd upward) ->workspaceRoot/{arg}. If no config, treat{arg}as a path relative to cwd. - If no argument, detect from current working directory
Verify it's a git repo:
git -C {repo-path} rev-parse --is-inside-work-treeShow the current branch:
git -C {repo-path} branch --show-currentStep 2: Get Diff
Resolve {base} per github §0 (read dev.config.json -> baseBranch; if unset, derive from origin/HEAD, fallback develop) - do not hardcode develop (some repos use main). All git commands use git -C {repo-path}, never cd (github §1).
Get all changes on this branch vs the base:
git -C {repo-path} diff {base}...HEADIf the diff is empty, also try:
git -C {repo-path} diff {base}Also capture uncommitted working-tree edits, so a branch that already has commits does not pass review while just-written changes are silently skipped:
git -C {repo-path} status --short
git -C {repo-path} diff HEADInclude any uncommitted changes in the review set alongside the committed diff.
If everything is empty, inform the user there are no changes to review.
Also get the list of changed files:
git -C {repo-path} diff {base}...HEAD --name-onlyStep 3: Read Review Rules
Read the shared review rules in rules.md, the file next to this SKILL.md in the same skill directory.
Apply these rules in STRICT mode - all priority tiers P0-P4, including items marked [STRICT].
Step 4: Read Project Standards
Read the project-specific CLAUDE.md for additional standards:
{repo-path}/CLAUDE.mdAlso check for CLAUDE.md files in directories containing changed files.
Step 5: Read Source Files for Context
For each changed file:
- Read the full current version of the file (not just the diff)
- Read related files - imports, base classes, interfaces, shared utilities
- Understanding surrounding context is critical for accurate review
Step 5.5: Map the Existing Architecture (MANDATORY, before any analysis)
Build the Architecture Map of every concern the diff touches, from the merge-base with {base} - procedure in rules.md P0.8 ("Building the map"). Place every entry point, rule and config the diff adds or changes: through the layer (its entry point or extension point) or beside it. Everything beside it is a P0.8 candidate for Step 7. Self-review is the cheapest place to catch a parallel path - before a reviewer has to.
Step 6: DRY Detection - Parallel Codebase Search
While reading the diff, collect any functions, helpers, mappers, utilities, or components that look generic rather than feature-specific. Signs of potentially duplicated implementation:
- Utility functions (date formatting, string normalization, error wrapping)
- Mapper/transformer methods
- Validation helpers not tied to this specific feature
- DTOs or interfaces that overlap with existing ones
For each suspicious item, launch an Explore agent in parallel (Agent tool with subagent_type=Explore) to search the codebase for existing implementations.
Launch these searches in parallel with Step 7 - do not wait before starting analysis.
Step 7: Analyze Changes
Apply ALL priority tiers from rules.md in STRICT mode:
- P0 - Bugs & Correctness
- P0.5 - Security
- P0.8 - Architecture Conformance (judged against the Step 5.5 map: extend, never duplicate)
- P1 - Architecture & SOLID
- P1.5 - DRY (incorporate results from Step 6)
- P1.6 - File Structure & Conventions
- P1.7 - Verbose Comments
- P2 - Type Safety (zero tolerance for
any) - P2.5 - React Performance
- P3 - Test Coverage
- P3.5 - Framework Patterns (project-specific, e.g. NestJS, Next.js)
- P4 - Domain-Specific (project-defined: e.g. compliance, multi-tenancy, accessibility)
Step 8: Output Findings
Present a structured markdown report to the user:
## Self-Review: {branch-name}
### Summary
- Files reviewed: N
- Architecture: {layer} - FOLLOWS / PARTIAL / BYPASSES (or "no owning layer")
- Issues found: N (X auto-fixable, Y manual)
### P0 - Bugs & Correctness
- [ ] {file}:{line} - {description}
### P0.5 - Security
...
(continue for each tier that has findings)
### Auto-Fixable Issues
| # | File | Line | Issue | Fix |
|---|------|------|-------|-----|
| 1 | ... | ... | ... | ... |
### Manual Attention Required
| # | File | Line | Issue | Reason |
|---|------|------|-------|--------|
| 1 | ... | ... | ... | ... |If no issues found, report that the code looks clean.
Step 9: Ask Permission to Fix
If there are auto-fixable issues, ask the user:
Found {N} auto-fixable issues. Fix them automatically?
Use AskUserQuestion with options:
- "Fix all" - implement all auto-fixable changes
- "Let me choose" - show each fix and let user approve individually
- "Skip" - just keep the report, don't change anything
Step 10: Implement Fixes (if approved)
For each approved fix:
- Apply the fix using Edit tool
- Resolve the lint command from config:
commands[repo].lintFix(fromdev.config.json). If undefined, detect from the repo'spackage.jsonscripts (lint:fix,lint) or CLAUDE.md; ask the user only if none resolve. - Run the resolved linter after each file, against the repo path rather than by changing directory (e.g.
yarn --cwd {repo-path} lint:fix,npm --prefix {repo-path} run lint:fix)
Step 11: Final Report
## Fixes Applied
| # | File | Issue | Status |
|---|------|-------|--------|
| 1 | ... | ... | Fixed / Skipped |
### Still Needs Manual Attention
- {file}:{line} - {description} - {why it can't be auto-fixed}Important Notes
- This is a LOCAL self-review - nothing is posted to GitHub
- Uses STRICT mode - stricter than PR review, catches more issues
- Always read full source files for context - never review diff in isolation
- Run linter after every file modification
- Do NOT auto-fix without user confirmation
- Focus on changes in the diff - do not review pre-existing code unless directly related
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.

