review-fix
Skill56 starsChanged 6 months agoMITView on GitHub
Automated review-fix loop that spawns 8 reviewers in parallel, fixes quick-fix items automatically, and accumulates strategic items for user decision. Iterates until no issues remain or max iterations reached.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- davidvornholt/mailboxtheir own version, first seen Oct 4, 2026
- 200iqlabs/shared-skillstheir own version, first seen Aug 22, 2026
- EternallLight/tgc-skillstheir own version, first seen Jul 13, 2026
- nwiizo/ccswarmtheir own version, first seen Apr 17, 2026
- DasDigitaleMomentum/opencode-processing-skillstheir own version, first seen Feb 21, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- nwiizo/ccswarm★ 153same name
- DasDigitaleMomentum/opencode-processing-skills★ 59same name
- EternallLight/tgc-skills★ 9same name
- 200iqlabs/shared-skills★ 4same name
- davidvornholt/mailbox★ 2same 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 repository8 other files it gives its agents.
- develop-teamSkill
- fix-sentrySkill
- fix-ticketSkill
- playwright-qa-cliSkill
- review-teamSkill
- scoopSkill
- set-kpiSkill
- telegram-formattingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. 0 are common, 17 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
17
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
After major refactoring: - Ensure quality across multiple review cycles
- Distinctive: line 15
For iterative polish: - Run until no quick-fix items remain
- Very specific: line 54
Create/update the state file at .review-fix/state.json:
- Very specific: line 102
Use the Task tool to spawn all 8 reviewers simultaneously with run_in_background: true.
- Distinctive: line 111
All reviewers must return findings in this format:
- Distinctive: line 126
blocking: - Must fix before merge
- Distinctive: line 127
important: - Should fix, discuss if disagree
- Distinctive: line 329
After all agents complete:
- Distinctive: line 333
Handle errors: - If an agent fails, log it and continue with others
- Distinctive: line 334
Deduplicate: - Remove similar findings across personas
- Distinctive: line 342
No quick-fix items found in this iteration
- Distinctive: line 360
Create a comprehensive fix prompt for quick-fix items only:
- Very specific: line 430
If auto-commit: true and fixes were made:
- Very specific: line 439
Update state.json with commit hash:
- Distinctive: line 460
After all iterations complete, present accumulated strategic items to the user.
- Distinctive: line 581
When this skill is invoked:
- Very specific: line 595
Create .review-fix/ directory if needed
- Distinctive: line 597
Check if resuming a previous run
- Distinctive: line 616
Create backlog files as needed
- Distinctive: line 656
After 2 consecutive failures, exit and report to user
- Distinctive: line 662
If build keeps failing, exit loop and report
- Distinctive: line 691
Use skip-strategic for quick runs: - If you just want automated fixes
“Common” is measured: kept by at least 6 in 10 of the 5 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-Fix Loop
Orchestrate an automated review-fix cycle that iterates until your code is clean. Each iteration spawns fresh sub-agents with full 200k context windows, fixes quick-fix items automatically, and accumulates strategic items for user decision at the end.
When to Use This Skill
- Before creating a PR - Get comprehensive feedback AND automatic fixes
- After major refactoring - Ensure quality across multiple review cycles
- When you want hands-off improvement - Let the loop fix issues automatically
- For iterative polish - Run until no quick-fix items remain
Parameters
| Parameter | Default | Description |
max-iterations | 3 | Maximum review-fix cycles before stopping |
auto-commit | true | Create a commit after each fix cycle |
skip-strategic | false | Skip strategic item questions at the end |
base-commit | main | Commit/branch to compare against (e.g., abc123, HEAD~5, develop) |
Architecture
ORCHESTRATOR (main session - manages state only)
|
+-- REVIEW PHASE (8 parallel sub-agents, each with fresh 200k context)
| +-- premium-ux-designer
| +-- product-strategy-advisor
| +-- general-purpose
| +-- system-architect
| +-- code-refactorer
| +-- code-refactorer
| +-- Explore (reusable components)
| +-- Explore (dead code)
|
+-- FIX PHASE (single sub-agent, fresh 200k context)
| +-- General agent with fix prompt + file context
|
+-- STATE FILE (.review-fix/state.json)
+-- Tracks iterations, strategic items, fixed items, commitsWorkflow
Step 0: Initialize State
Create/update the state file at .review-fix/state.json:
{
"iteration": 1,
"maxIterations": 3,
"baseCommit": "main",
"strategicItems": [],
"fixedItems": [],
"commits": [],
"status": "in_progress",
"startedAt": "2025-01-18T10:00:00Z",
"branchName": "feature/example"
}Step 1: Extract Branch Context
# Get current branch name
BRANCH=$(git branch --show-current)
# Get base commit (from parameter or default to main)
BASE_COMMIT="${base_commit:-main}"
# Validate base commit exists
if ! git rev-parse "$BASE_COMMIT" >/dev/null 2>&1; then
# Fallback to master if main doesn't exist and no custom base provided
if [ "$BASE_COMMIT" = "main" ]; then
BASE_COMMIT="master"
fi
fi
# Get diff stats against base commit
git diff --stat "$BASE_COMMIT"..HEAD
# Get list of changed files
git diff --name-only "$BASE_COMMIT"..HEAD
# Get commit messages since base
git log --oneline "$BASE_COMMIT"..HEAD
# Get detailed diff for context
git diff "$BASE_COMMIT"..HEAD --no-colorStep 2: Spawn 8 Reviewer Sub-Agents IN PARALLEL
Use the Task tool to spawn all 8 reviewers simultaneously with run_in_background: true.
Each reviewer receives:
- The branch context (diff, changed files, commits)
- Their specific review focus
- Instructions to return JSON findings
Reviewer Prompts
All reviewers must return findings in this format:
[{
"severity": "critical|important|suggestion",
"label": "blocking|important|nit|suggestion",
"category": "designer|pm|qa|architect|developer|maintainability|reusable",
"file": "path/to/file.tsx",
"line": 123,
"issue": "Brief description of the problem",
"suggestion": "Specific fix or improvement",
"type": "quick-fix|strategic"
}]Severity Labels
- blocking - Must fix before merge
- important - Should fix, discuss if disagree
- nit - Nice to have, not blocking
- suggestion - Alternative approach to consider
MAX 10 findings per reviewer. Focus on high-impact issues only.
Persona 1: Frontend Designer
Sub-agent: premium-ux-designer
Review the following changed files for UI/UX quality:
{list of component/page files}
Look for:
- Missing hover/focus states
- Inconsistent spacing or typography
- Poor loading states
- Accessibility issues (ARIA, keyboard nav)
- Animation opportunities
- Visual hierarchy issues
Review against project CLAUDE.md conventions for UI patterns and components.
Mark items as "quick-fix" if they're CSS/styling changes.
Mark items as "strategic" if they require design decisions or major restructuring.
Return findings as JSON array. MAX 10 findings.Persona 2: Product Manager
Sub-agent: product-strategy-advisor
Review the overall feature changes for product fit:
{summary of changes and commit messages}
Look for:
- Is this solving the right problem?
- Feature creep or over-engineering
- Missing user-facing documentation
- Edge cases that affect UX
- Should this be built differently?
Most PM feedback should be marked "strategic" as it involves direction.
Return findings as JSON array. MAX 10 findings.Persona 3: QA Engineer
Sub-agent: general-purpose
Review test coverage for new functionality:
{list of changed files}
Look for:
- Missing unit/integration tests
- Untested edge cases
- Error handling gaps
- Regression risks
Testing Checklist:
- [ ] Happy path tested
- [ ] Edge cases covered (empty arrays, null values, boundaries)
- [ ] Error cases tested (network failures, invalid input)
- [ ] Test names are descriptive
- [ ] Tests are deterministic (no flaky tests)
- [ ] Tests are independent (no shared mutable state)
Mark missing tests as "quick-fix" with specific test case suggestions.
Mark architectural test changes as "strategic".
Return findings as JSON array. MAX 10 findings.Persona 4: System Architect
Sub-agent: system-architect
Review the architectural impact of changes:
{list of changed files with focus on services, utils, migrations}
Look for:
- Wrong abstraction level
- Scalability concerns
- Pattern violations (review against project CLAUDE.md conventions)
- Database design issues
- Performance bottlenecks
Security Checklist (mark violations as blocking):
- [ ] User input validated and sanitized
- [ ] SQL queries use parameterization
- [ ] Authentication/authorization checked on protected routes
- [ ] Secrets not hardcoded (check for API keys, passwords)
- [ ] Error messages don't leak sensitive info
- [ ] File uploads restricted (size, type)
- [ ] CSRF protection for state-changing operations
Most architecture feedback should be "strategic".
Simple pattern fixes can be "quick-fix".
Security violations should be "quick-fix" with label "blocking".
Return findings as JSON array. MAX 10 findings.Persona 5: Senior Developer
Sub-agent: code-refactorer
Review code for quality and correctness:
{list of all changed files}
Look for:
- Bugs and logic errors
- React hook issues (deps, memory leaks)
- TypeScript type safety
- Naming conventions per project CLAUDE.md
- Error handling patterns
Performance Checklist:
- [ ] No N+1 queries in database operations
- [ ] Database queries use proper indexes
- [ ] Large lists are paginated
- [ ] Expensive operations are cached or memoized
- [ ] No blocking I/O in hot paths
- [ ] No unnecessary re-renders in React components
Most code fixes should be "quick-fix".
Return findings as JSON array. MAX 10 findings.Persona 6: Code Maintainability
Sub-agent: code-refactorer
Review code for maintainability:
{list of changed files}
Look for:
- Overly complex code
- Code duplication
- Inconsistent patterns
- Missing comments on complex logic
- Dead code
Mark simplifications as "quick-fix".
Mark major refactors as "strategic".
Return findings as JSON array. MAX 10 findings.Persona 7: Reusable Components
Sub-agent: Explore
Research the codebase for reuse opportunities:
{list of new components/utilities}
Look for:
- Existing components that could be reused
- New components that should be extracted
- Duplicate logic across files
- Missing shared utilities
Mark simple extractions as "quick-fix".
Mark architectural component changes as "strategic".
Return findings as JSON array. MAX 10 findings.Persona 8: Dead Code Hunter
Sub-agent: Explore
Scan the codebase for dead code patterns:
{list of new/modified files}
Look for:
- Exported functions never imported elsewhere
- Unused imports at top of files
- Variables declared but never read
- Orphan files (never imported)
- Commented-out code blocks
- Unreachable code paths
- Unused dependencies
Mark as "quick-fix" for:
- Unused imports
- Unused variables
- Small unused functions
Mark as "strategic" for:
- Large unused modules
- Potentially unused dependencies
- Architectural dead code
Return findings as JSON array. MAX 10 findings.Step 3: Collect and Aggregate Results
After all agents complete:
- Use TaskOutput to retrieve results from each agent
- Parse JSON findings from each response
- Handle errors - If an agent fails, log it and continue with others
- Deduplicate - Remove similar findings across personas
- Separate by type:
quick-fixitems -> Generate fix prompt for this iterationstrategicitems -> Append tostate.strategicItems
Step 4: Check Exit Conditions
Exit the loop if ANY of these are true:
- No quick-fix items found in this iteration
iteration >= maxIterations- Critical build/test failure that blocks progress
Update state.json:
{
"iteration": 2,
"status": "in_progress|completed|blocked",
"lastIterationFindings": {
"quickFix": 12,
"strategic": 3
}
}Step 5: Generate Fix Prompt
Create a comprehensive fix prompt for quick-fix items only:
# Code Review Fixes - Iteration {N}
You are fixing issues identified by automated code review. Work through each section systematically.
## Instructions
1. Read each issue carefully before making changes
2. Make the changes specified - do not expand scope
3. After all fixes, run the project's build and lint commands
4. Do NOT modify or implement strategic items
## Changed Files Context
{List files that will need changes}
---
## Section 1: Critical Issues
### Issue 1.1: {issue title}
**File:** {file}:{line}
**Problem:** {description}
**Fix:**{specific code change}
{... more critical issues}
---
## Section 2: Important Issues
{... important issues with same format}
---
## Section 3: Suggestions
{... suggestion issues with same format}
---
## Verification
After completing all fixes, run the project's build and lint commands to verify.
Report any errors encountered.Step 6: Fix Phase (Fresh Sub-Agent)
Spawn a single fix agent with:
- The fix prompt from Step 5
run_in_background: false(wait for completion)- Fresh 200k context window
Sub-agent: general-purpose (or appropriate fixer type)
{The fix prompt generated in Step 5}
After fixing all issues:
1. Run the project's build and lint commands
2. Report any failures
3. If successful, report completionStep 7: Commit Changes (if auto-commit enabled)
If auto-commit: true and fixes were made:
git add -A
git commit -m "fix: address code review findings (iteration {N})
Co-Authored-By: Claude Code <noreply@anthropic.com>"Update state.json with commit hash:
{
"commits": ["abc1234", "def5678"]
}Step 8: Loop or Complete
If more iterations needed:
- Increment
state.iteration - Go back to Step 1
If complete:
- Update
state.status: "completed" - Proceed to Strategic Items Review
Step 9: Strategic Items Review
After all iterations complete, present accumulated strategic items to the user.
Grouping Strategy
- Group related items (max 4 per AskUserQuestion)
- Present one question at a time if many items
Question Format
AskUserQuestion with options:
- "Add to backlog" - Creates a backlog item
- "Implement now" - Queues for immediate implementation
- "Ignore" - Mark as dismissedBacklog File Template
For items marked "Add to backlog", create:
# {Issue Title}
**Status**: Backlog
**Priority**: {Medium|High based on severity}
**Added**: {today's date}
**Source**: Code review (review-fix iteration {N})
## Overview
{Brief description of the issue}
## Context
{File and line references}
## Suggested Approach
{The suggestion from the review}
## Future Considerations
{Any related strategic items}State File Reference
Location: .review-fix/state.json
{
"iteration": 1,
"maxIterations": 3,
"baseCommit": "main",
"status": "in_progress",
"startedAt": "2025-01-18T10:00:00Z",
"branchName": "feature/example",
"strategicItems": [
{
"severity": "important",
"category": "architect",
"file": "lib/services/auth.ts",
"line": 45,
"issue": "Authentication should use middleware pattern",
"suggestion": "Refactor to use middleware for auth checks",
"iteration": 1
}
],
"fixedItems": [
{
"issue": "Missing error boundary",
"file": "components/Dashboard.tsx",
"iteration": 1
}
],
"commits": [
"abc1234"
],
"iterationHistory": [
{
"iteration": 1,
"quickFixCount": 8,
"strategicCount": 2,
"commitHash": "abc1234"
}
]
}Iteration Logs
Each iteration creates a log file:
Location: .review-fix/iteration-{N}.json
{
"iteration": 1,
"timestamp": "2025-01-18T10:05:00Z",
"reviewers": {
"designer": { "findings": 3, "quickFix": 2, "strategic": 1 },
"pm": { "findings": 2, "quickFix": 0, "strategic": 2 },
"qa": { "findings": 4, "quickFix": 4, "strategic": 0 },
"architect": { "findings": 2, "quickFix": 0, "strategic": 2 },
"developer": { "findings": 5, "quickFix": 5, "strategic": 0 },
"maintainability": { "findings": 3, "quickFix": 2, "strategic": 1 },
"reusable": { "findings": 1, "quickFix": 1, "strategic": 0 },
"deadcode": { "findings": 2, "quickFix": 2, "strategic": 0 }
},
"totalFindings": 20,
"quickFixItems": [],
"strategicItems": [],
"fixPrompt": "...",
"fixResult": "success|failure",
"buildResult": "pass|fail",
"commitHash": "abc1234"
}Execution Instructions
When this skill is invoked:
1. Parse Parameters
/review-fix # defaults: max-iterations=3, auto-commit=true, base-commit=main
/review-fix max-iterations=5 # 5 iterations max
/review-fix auto-commit=false # don't auto-commit
/review-fix skip-strategic=true # skip strategic questions
/review-fix base-commit=abc123 # compare against specific commit
/review-fix base-commit=HEAD~3 # compare last 3 commits
/review-fix base-commit=develop # compare against develop branch2. Initialize
- Create
.review-fix/directory if needed - Initialize or load
state.json - Check if resuming a previous run
3. Run Loop
for iteration in 1..maxIterations:
1. Extract branch context
2. Spawn 8 reviewers IN PARALLEL (run_in_background: true)
3. Wait for all reviewers (TaskOutput)
4. Aggregate findings
5. If no quick-fix items -> exit loop
6. Generate fix prompt
7. Spawn fix agent (run_in_background: false)
8. Run build/lint
9. Commit if auto-commit enabled
10. Update state4. Strategic Review
- Present accumulated strategic items
- Create backlog files as needed
5. Final Report
# Review-Fix Complete
## Summary
| Metric | Value |
|--------|-------|
| Iterations | 2 |
| Quick-fix items resolved | 15 |
| Strategic items accumulated | 4 |
| Commits created | 2 |
## Commits
- `abc1234` - fix: address code review findings (iteration 1)
- `def5678` - fix: address code review findings (iteration 2)
## Strategic Items Handled
- Added to backlog: 2
- Implemented now: 1
- Ignored: 1
## Files Modified
{list of files touched during fix phases}Error Handling
Reviewer Agent Failure
- Log the failure
- Continue with results from other reviewers
- Note in iteration log
Fix Agent Failure
- Save fix prompt to
.review-fix/failed-fix-prompt-{N}.md - Increment iteration
- Try again with fresh context
- After 2 consecutive failures, exit and report to user
Build/Lint Failure
- Do NOT commit
- Spawn debug sub-agent to analyze failure
- Include failure context in next fix prompt
- If build keeps failing, exit loop and report
Max Iterations Reached
- Normal exit condition
- Report remaining quick-fix items (if any) to user
- Suggest manual review
Persona-to-SubAgent Mapping
| Persona | Sub-Agent Type | Focus |
| Frontend Designer | premium-ux-designer | Visual polish, UX |
| Product Manager | product-strategy-advisor | Feature direction |
| QA Engineer | general-purpose | Test coverage |
| System Architect | system-architect | Architecture |
| Senior Developer | code-refactorer | Code quality |
| Code Maintainability | code-refactorer | Simplification |
| Reusable Components | Explore | Reuse opportunities |
| Dead Code Hunter | Explore | Unused code detection |
Tips
- Start with default settings - 3 iterations is usually enough
- Review strategic items thoughtfully - They represent real decisions, not just code fixes
- Check the iteration logs - Useful for understanding what was found and fixed
- Use skip-strategic for quick runs - If you just want automated fixes
- Run after major features - Gets your code clean before PR review
- Add
.review-fix/to.gitignore- State files are temporary and should not be committed
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.

