Use when completing tasks, implementing major features, or before merging to verify work meets requirements - dispatches code-review subagent to review implementation against plan or requirements before proceeding
Dispatches a subagent to review code changes against requirements before marking tasks complete or merging. Used after every code change to catch issues early and prevent technical debt.
/plugin marketplace add samjhecht/wrangler/plugin install wrangler@samjhecht-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
code-reviewer.mdMANDATORY: When using this skill, announce it at the start with:
š§ Using Skill: requesting-code-review | [brief purpose based on context]
Example:
š§ Using Skill: requesting-code-review | [Provide context-specific example of what you're doing]
This creates an audit trail showing which skills were applied during the session.
Dispatch a subagent using the code-review skill to catch issues before they cascade.
Core principle: Review early, review often.
Review Framework: See code-review skill for comprehensive review process (6 phases: plan alignment, code quality, architecture, testing, security/performance, documentation).
Code review MUST always be obtained (without exception) for ALL code changes.
Mandatory (code review IS REQUIRED):
Exceptions (ONLY these, code review NOT required):
Pure documentation: *.md files in docs/ directory only
Configuration-only: Dependency updates in package.json, tsconfig.json
Emergency hotfix: Production down, security breach
When in doubt: Request code review. There are ONLY 3 exceptions above, no others.
If you skip review without valid exception 1, 2, or 3: You violate verification-before-completion and cannot claim work complete.
IMPORTANT: Code review is not optional for substantive work.
You CANNOT:
BEFORE proceeding to next step:
IF code changes made:
Has code review been requested?
NO ā STOP - Request review now
YES ā Continue
Has review been completed?
NO ā STOP - Wait for review completion
YES ā Continue
Are there Critical issues?
YES ā STOP - Fix before proceeding
NO ā Continue
Are there Important issues?
YES ā STOP - Fix OR convert to tracked issue with ID
NO ā Continue
Review status: [Approved / Approved with minor items]
Other ā STOP - Address issues before proceeding
ONLY THEN: Proceed to next step
If you skip code review without explicit exception:
BEFORE requesting review:
If ANY unchecked: Fix before requesting review. Don't waste reviewer's time.
When requesting review, include:
I need code review for [feature/bugfix/refactor name].
**Context:**
- Completed tasks: [list]
- Requirements met: [reference to plan/spec]
- Tests added: [count] tests, all passing
- TDD followed: [Yes/No with attestation]
**Files for review:**
- src/[file].ts (modified - [what changed])
- src/[file].ts (new - [what it does])
- tests/[file].test.ts (modified - [tests added])
**Testing evidence:**
[paste test output showing all passing]
**Ready for review.**
BASE_SHA=$(git rev-parse HEAD~1) # or origin/main
HEAD_SHA=$(git rev-parse HEAD)
Use Task tool with general-purpose subagent type, instructing it to use the code-review skill.
Provide to subagent:
Status: Approved
All issues resolved or no issues found.
Action: You may proceed to next step (merge, next batch, etc.)
Status: Approved with minor items
No Critical or Important issues.
Minor suggestions noted for future work.
Action: You may proceed, but address minor items when practical.
Status: Needs revision
Critical or Important issues found.
Action:
1. STOP - Do not proceed
2. Fix all Critical issues (MUST be 0)
3. Fix all Important issues OR convert to tracked issue with ID (cannot be "acknowledged" without issue)
4. Re-run tests
5. Provide evidence of fixes
6. Request follow-up review if needed
7. Only proceed after approval
Status: Blocked
Fundamental issues requiring rework.
Action:
1. STOP - Do not proceed
2. Discuss issues with reviewer or human partner
3. May require significant rework or redesign
4. Do NOT attempt to "work around" blocking issues
Important: You cannot claim work complete or proceed to next phase until review status is "Approved" or "Approved with minor items".
Attempting to proceed with "Needs revision" or "Blocked" status violates verification-before-completion skill.
Agent: "I've completed the user authentication feature."
[Check: Is code review required?]
Code changes made: Yes
Lines changed: 350
Feature complete: Yes
ā Code review IS REQUIRED
Agent: "I need code review before marking this complete."
[Requests review]
Review outcome: Needs revision (2 Important issues)
Agent: [Thinks: "These are minor, I'll just merge"]
RED FLAG: Cannot proceed with "Needs revision" status
Agent: "I need to fix the Important issues before proceeding."
[Fixes issues, re-runs tests]
Agent: "Issues fixed. Ready for follow-up review."
[Requests follow-up review]
Review outcome: Approved
Agent: "Code review approved. Feature complete."
[Can now proceed to merge/PR]
[Just completed Task 2: Add verification function]
You: Let me request code review before proceeding.
BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | awk '{print $1}')
HEAD_SHA=$(git rev-parse HEAD)
[Use Task tool with general-purpose subagent:]
"Use the code-review skill to review my implementation of Task 2 from
.wrangler/plans/deployment-plan.md. Review changes from a7981ec..3df7661.
I implemented verification and repair functions for conversation index
(verifyIndex() and repairIndex() with 4 issue types). Please check if
implementation meets plan requirements and identify any quality issues."
[Subagent returns structured review]:
Overall Assessment: Ready to merge with minor fixes
Strengths:
- Clean architecture with proper separation
- Real integration tests, not just mocks
- Comprehensive issue type detection
Critical Issues: 0
Important Issues: 1
- Missing progress indicators for long-running operations
Minor Issues: 1
- Magic number (100) for reporting interval should be constant
Recommendation: Fix Important issue, Minor can be deferred
You: [Fix progress indicators]
You: [Continue to Task 3]
Subagent-Driven Development:
Executing Plans:
Ad-Hoc Development:
| Rationalization | Why It's Wrong | Correct Action |
|---|---|---|
| "This is too trivial to review" | Trivial changes cause production incidents | Request review anyway (takes 2 minutes) |
| "I'm the expert, no one else can review" | Experts have blind spots review catches | Request review from anyone on team |
| "We're too busy for review" | Busy doesn't exempt safety | If too busy to review, too busy to merge safely |
| "I'll get review after merging" | Post-merge review never happens | Review BEFORE merge, always |
| "The tests pass, that's enough" | Tests necessary but not sufficient | Tests + human review both required |
| "It's only N lines changed" | Size doesn't determine bug potential | ALL code changes require review |
| "No one else is available" | If not P0, it can wait | Wait for reviewer or escalate |
| "This is blocking me" | Being blocked doesn't exempt review | Work on different task while waiting |
| "I'll skip review just this once" | "Just once" becomes habit | Follow process every time without exception |
If you catch yourself:
THEN:
If reviewer wrong:
See code-review skill for detailed review framework and output format.
Master defensive Bash programming techniques for production-grade scripts. Use when writing robust shell scripts, CI/CD pipelines, or system utilities requiring fault tolerance and safety.