code-review
Skill93 starsChanged 10 months agoMITView on GitHub
Pre-commit code review using code-reviewer agent for bug detection, security analysis, and quality assurance. Manual invocation only. Use before git commits to catch issues early. Blocks commits on REQUEST_CHANGES verdict.
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 repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- crewSkill
- debugSkill
- deep-contextSkill
- task-routerSkill
- workflowSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. 0 are common, 17 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 174 edited versions we read keep these.
17
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
After completing feature implementation
- Distinctive: line 26
Before creating pull request
- Distinctive: line 27
When user asks "review my changes"
- Distinctive: line 60
Deleted files: Check dependencies (use impact-analysis)
- Distinctive: line 61
Renamed files: Verify refactoring correctness
- Distinctive: line 129
No critical issues found
- Distinctive: line 130
No warnings that block commit
- Distinctive: line 155
Read file with issue
- Distinctive: line 158
Verify fix doesn't break tests
- Distinctive: line 164
Create TODO if complex (defer to separate commit)
- Distinctive: line 186
Deliverable: All critical issues fixed, warnings addressed
- Distinctive: line 192
Goal: Verify fixes and get final approval
- Distinctive: line 240
Goal: Commit reviewed, approved code
- Distinctive: line 284
After /refactor-safely: Verify refactoring didn't break anything
- Distinctive: line 466
Zero Bugs in Review: No logic errors found
- Distinctive: line 467
Security Checked: No vulnerabilities introduced
- Distinctive: line 468
Performance OK: No obvious scalability issues
“Common” is measured: kept by at least 6 in 10 of the 174 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 Gate
You are a Code Review Gate responsible for ensuring code quality, security, and correctness BEFORE commits reach version control.
Purpose
Problem: Bugs, security issues, and quality problems slip into commits because reviews happen after code is already committed.
Solution: Mandatory pre-commit review using code-reviewer agent with structured feedback and approval workflow.
When to Use This Skill
Manual invocation ONLY: /code-review
When to invoke:
- Before running
git commit - After completing feature implementation
- Before creating pull request
- When user asks "review my changes"
NOT auto-triggered (disable-model-invocation: true)
The 5-Phase Review Workflow
Phase 1: IDENTIFY CHANGES
Goal: Determine what needs review
Git commands:
# See all changes
git status
# Staged changes (will be committed)
git diff --cached --stat
git diff --cached
# Unstaged changes (might want to stage first)
git diff --stat
git diff
# Recent commits (if reviewing after commit)
git log -1 --stat
git show HEADCategorize changes:
- New files: Complete review needed
- Modified files: Focus on changes only
- Deleted files: Check dependencies (use impact-analysis)
- Renamed files: Verify refactoring correctness
Deliverable: List of files to review with change types
Phase 2: LAUNCH REVIEWER
Goal: Get structured code review from code-reviewer agent
Prepare review prompt:
Task(
subagent_type="code-reviewer",
description="Pre-commit code review",
prompt="""
Review these changes for bugs, security issues, performance problems, and code quality:
**Files Changed**:
[List files with brief description of changes]
**Context**:
- Purpose: [what this code does]
- Related: [related files or systems]
**Focus Areas**:
- [BUG]: Logic errors, edge cases
- [SECURITY]: Vulnerabilities, input validation
- [PERF]: Performance issues, N+1 queries
- [QUALITY]: Code smells, maintainability
- [STYLE]: Formatting, naming (low priority)
Provide structured feedback with:
1. Issues categorized by severity
2. Specific line references
3. Suggested fixes
4. Verdict: APPROVE or REQUEST_CHANGES
"""
)Wait for review results
Deliverable: Structured code review with categorized issues
Phase 3: ANALYZE FEEDBACK
Goal: Prioritize issues and plan fixes
Issue Categories (from code-reviewer):
CRITICAL (Must fix before commit):
- [BUG] - Logic errors, crashes, data corruption
- [SECURITY] - Vulnerabilities, injection risks, auth bypasses
WARNINGS (Should fix before commit):
- [PERF] - Performance issues, scalability problems
- [QUALITY] - Code smells, maintainability issues
SUGGESTIONS (Optional, can defer):
- [STYLE] - Formatting, naming conventions
- [DOCS] - Missing or unclear comments
Verdict Analysis:
APPROVE:
- No critical issues found
- No warnings that block commit
- Code meets quality standards
- → Proceed to commit (Phase 5)
REQUEST_CHANGES:
- Critical issues present (MUST fix)
- Warnings that should be addressed
- → Fix issues (Phase 4)
NEEDS_DISCUSSION:
- Unclear requirements
- Architectural concerns
- → Consult user or brainstorm-coordinator
Deliverable: Prioritized issue list with fix plan
Phase 4: FIX ISSUES
Goal: Address critical and warning issues
Fixing Strategy:
For each CRITICAL issue:
- Read file with issue
- Understand the problem
- Apply minimal fix
- Verify fix doesn't break tests
- Mark as resolved
For each WARNING:
- Assess impact (breaking change? refactor needed?)
- Apply fix if straightforward
- Create TODO if complex (defer to separate commit)
- Mark as resolved or deferred
Example fix workflow:
# Read file
Read(file_path="src/auth/login.ts")
# Apply fix
Edit(
file_path="src/auth/login.ts",
old_string="if (user.password == password)", # BUG: == instead of proper comparison
new_string="if (await bcrypt.compare(password, user.password))"
)
# Run tests
npm test src/auth/login.test.ts
# Verify fix
Read(file_path="src/auth/login.ts", offset=40, limit=10)Deliverable: All critical issues fixed, warnings addressed
Phase 5: RE-REVIEW & APPROVE
Goal: Verify fixes and get final approval
Re-review process:
If fixes were applied:
Task(
subagent_type="code-reviewer",
description="Re-review after fixes",
prompt="""
Re-review changes after addressing previous feedback:
**Previous Issues**:
[List issues that were fixed]
**Files Changed** (after fixes):
[Updated file list]
Focus on:
- Verify previous issues resolved
- No new issues introduced by fixes
- Overall code quality
Provide verdict: APPROVE or REQUEST_CHANGES (if still issues)
"""
)Wait for verdict
Verdict Handling:
APPROVE:
- ✅ All issues resolved
- ✅ No new issues from fixes
- → Proceed to commit
REQUEST_CHANGES (still issues):
- ❌ Return to Phase 4 (fix remaining issues)
- ❌ Maximum 2 iterations (prevent infinite loop)
- ❌ After 2 iterations, ask user for guidance
Deliverable: Final APPROVE verdict
Phase 6: COMMIT (After Approval)
Goal: Commit reviewed, approved code
Pre-commit checklist:
# Ensure all changes staged
git add <fixed-files>
# Final status check
git status
# Run tests one more time
npm test
# Commit with descriptive message
git commit -m "$(cat <<'EOF'
feat: Add user authentication
- Implement JWT-based auth
- Add login/logout endpoints
- Secure password hashing with bcrypt
Fixes: #123
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
EOF
)"Post-commit:
# Verify commit
git show HEADDeliverable: Clean commit with reviewed, approved code
Integration Points
With Other Skills
- After /workflow: Review work before committing
- After /debug: Review bug fixes for correctness
- After /refactor-safely: Verify refactoring didn't break anything
- Before push: Final quality gate
With Pre-Tool-Use Hook
Suggested integration:
# In hooks/pre-tool-use.sh
if [[ "$TOOL" == "Bash" && "$COMMAND" =~ "git commit" ]]; then
echo "💡 Suggestion: Run /code-review before committing"
fiWith Capsule Context
File operations and sub-agent results are captured automatically by Capsule hooks. No manual logging needed.
Examples
Example 1: New Feature Review (Issues Found)
Phase 1: Identify Changes
git status
# Modified: src/auth/login.ts, src/auth/register.ts
# New: src/middleware/auth.middleware.tsPhase 2: Launch Reviewer
Reviewing 3 files for authentication feature...Phase 3: Analyze Feedback
CRITICAL ISSUES:
[BUG] src/auth/login.ts:42 - Password comparison uses == instead of bcrypt.compare()
[SECURITY] src/auth/register.ts:28 - No password strength validation
WARNINGS:
[QUALITY] src/middleware/auth.middleware.ts:15 - Error handling missing for invalid tokens
Verdict: REQUEST_CHANGESPhase 4: Fix Issues
// Fix 1: Password comparison
- if (user.password == password)
+ if (await bcrypt.compare(password, user.password))
// Fix 2: Password validation
+ if (password.length < 8) {
+ throw new Error('Password must be at least 8 characters')
+ }
// Fix 3: Error handling
+ try {
const decoded = jwt.verify(token, SECRET)
+ } catch (error) {
+ throw new UnauthorizedException('Invalid token')
+ }Phase 5: Re-review
All issues resolved ✓
Fixes look good ✓
No new issues introduced ✓
Verdict: APPROVEPhase 6: Commit
git add src/auth/*
git commit -m "feat: Add user authentication with security fixes"Example 2: Bug Fix Review (Clean)
Phase 1: Identify Changes
git diff --cached
# Modified: src/services/order.service.ts (1 file, 3 lines changed)Phase 2: Launch Reviewer
Reviewing bug fix in order service...Phase 3: Analyze Feedback
No issues found ✓
The fix correctly:
- Adds null check before property access
- Matches the root cause (TypeError prevention)
- Minimal change (good)
- Test coverage exists
Verdict: APPROVEPhase 4: Fix Issues Skipped (no issues)
Phase 5: Re-review Skipped (already approved)
Phase 6: Commit
git commit -m "fix: Add null check in order service (fixes TypeError)"Example 3: Large Refactor Review
Phase 1: Identify Changes
git diff --cached --stat
# 12 files changed, 450 insertions(+), 320 deletions(-)Phase 2: Launch Reviewer
Reviewing large refactoring across 12 files...Phase 3: Analyze Feedback
WARNINGS:
[QUALITY] Inconsistent error handling in 3 files
[DOCS] Missing JSDoc for new public methods
[STYLE] Some files use var instead of const/let
No CRITICAL issues ✓
Refactoring is structurally sound ✓
Verdict: APPROVE (with suggestions for future cleanup)Phase 4: Fix Issues
Warnings are minor, can be addressed in follow-up PR.
Creating TODO issue for cleanup.Phase 5: Re-review Skipped (approved with minor suggestions)
Phase 6: Commit
git commit -m "refactor: Modernize authentication module
- Extract auth logic to separate services
- Improve testability with dependency injection
- Update imports across 12 files
TODO: Follow-up cleanup for error handling consistency"Success Criteria
Review Execution
✅ Code-reviewer agent consulted (not manual review) ✅ All CRITICAL issues fixed before commit ✅ WARNINGS addressed or acknowledged ✅ APPROVE verdict received before committing ✅ Tests pass after fixes
Quality Signals
- Zero Bugs in Review: No logic errors found
- Security Checked: No vulnerabilities introduced
- Performance OK: No obvious scalability issues
- Clean Commit: Reviewed code only (no debug logs, TODOs)
Anti-Patterns
❌ Committing without review: Always review first ❌ Ignoring REQUEST_CHANGES: Fix issues before committing ❌ Fixing only some issues: Address all CRITICAL, acknowledge WARNINGS ❌ Infinite fix loop: Max 2 re-reviews, then ask user ❌ Skipping tests: Always test after fixes
Advanced Patterns
Selective Review (Large Changes)
For commits with 20+ files changed:
# Review critical files only
Task(subagent_type="code-reviewer", prompt="Review these 5 critical files: ...")
# Defer non-critical files to PR review
# Focus on: security-sensitive, complex logic, core functionalitySecurity-Focused Review
For auth, payments, data handling:
Task(subagent_type="security-engineer", prompt="Security review of authentication changes")
Task(subagent_type="code-reviewer", prompt="General code review")
# Both must APPROVE before commitPerformance Review
For database, API, algorithm changes:
Task(subagent_type="code-reviewer", prompt="Review with focus on performance and scalability")
# Look for: N+1 queries, inefficient algorithms, missing indexesRemember: Code review BEFORE commit is 10x cheaper than fixing bugs in production. Use this skill religiously.
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.

