From dev
Run iterative code review with diminishing fix thresholds. Use when the user says "review my code", "iterative review", "code review", "review this iteratively", or after completing a feature implementation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev:code-review-iterativeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run up to 4 review-fix iterations with 3 parallel reviewer agents (PE, Sr SDE, QA). Each iteration raises the bar for what gets fixed, converging quickly to clean code.
Run up to 4 review-fix iterations with 3 parallel reviewer agents (PE, Sr SDE, QA). Each iteration raises the bar for what gets fixed, converging quickly to clean code.
By default, review unstaged changes from git diff. If the user specifies files, a branch, or a PR, use that scope instead.
Set iteration = 1. Determine the review scope (git diff, specific files, or user-specified).
Dispatch 3 agents simultaneously, each reviewing the same code from a different perspective. Every agent MUST categorize each finding as exactly one of: BLOCKER, HIGH, MEDIUM, LOW, NIT.
Agent 1 — Principal Engineer (PE):
Review this code as a Principal Engineer. Focus on: architecture, design patterns, abstraction quality, API contracts, performance implications, scalability concerns, and whether the approach is fundamentally sound. Categorize every finding as BLOCKER, HIGH, MEDIUM, LOW, or NIT. Include file path and line number for each.
Stay in your lane: You own architecture, AST/IR design, parser/compiler structure, and performance. Do NOT rule on whether a domain concept is semantically valid or whether a condition should accept certain inputs from a domain perspective — that is the Domain Expert's call. If you think a domain assumption in the code is wrong, flag it as a question rather than a finding.
Agent 2 — Senior SDE:
Review this code as a Senior Software Engineer. Focus on: correctness, edge cases, error handling, null/undefined safety, race conditions, resource leaks, naming, readability, DRY violations, and adherence to project conventions (check CLAUDE.md). Categorize every finding as BLOCKER, HIGH, MEDIUM, LOW, or NIT. Include file path and line number for each.
Stay in your lane: You own implementation correctness, code quality, and codebase consistency. Do NOT rule on domain semantics or override domain-driven design decisions. If a pattern seems wrong but is documented as a domain requirement, flag it as a question rather than a finding.
Agent 3 — QA Engineer:
Review this code as a QA Engineer. Focus on: test coverage gaps, untested edge cases, missing error path tests, input validation, integration risks, regression potential, and observable behavior correctness. Categorize every finding as BLOCKER, HIGH, MEDIUM, LOW, or NIT. Include file path and line number for each.
Stay in your lane: You own test coverage, test quality, and behavioral correctness. Do NOT rule on architectural decisions or domain semantics. If you see missing test cases that depend on domain knowledge (e.g., "should this condition accept lord references?"), flag it as a question for the Domain Expert rather than asserting the answer.
Merge findings from all 3 agents. Deduplicate (same issue found by multiple reviewers = single finding at highest severity). Apply the fix threshold for the current iteration:
| Iteration | Fix Threshold | What Gets Fixed |
|---|---|---|
| 1 | BLOCKER, HIGH, MEDIUM, LOW, NIT | Everything |
| 2 | BLOCKER, HIGH, MEDIUM | Skip LOW, NIT |
| 3 | BLOCKER, HIGH | Skip MEDIUM and below |
| 4 | BLOCKER only | Skip HIGH and below |
Present the consolidated findings to the user in a table:
## Review Iteration {N} — Findings
| # | Severity | Reviewer | File:Line | Finding | Fix? |
|---|----------|----------|-----------|---------|------|
| 1 | BLOCKER | PE | src/x.rs:45 | ... | Yes |
| 2 | HIGH | Sr SDE | src/y.rs:12 | ... | Yes |
| 3 | NIT | QA | src/z.rs:99 | ... | No (below threshold) |
Fixing N of M findings this iteration.
Implement all fixes at or above the threshold. For each fix:
Count how many findings were fixed this iteration.
iteration = iteration + 1, go to Step 1.When the loop exits, print:
## Review Complete
| Iteration | Findings | Fixed | Threshold |
|-----------|----------|-------|-----------|
| 1 | N | N | All |
| 2 | N | N | MEDIUM+ |
| ... | ... | ... | ... |
Total iterations: N
Total findings: N
Total fixed: N
Remaining (below final threshold): N
npx claudepluginhub mayank-io/mstack --plugin devGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.