Review

From huzaifa525/claude-code-optimizer · View interactive version

Review is an AI agent skill from the GitHub repository huzaifa525/claude-code-optimizer. Use when the user wants a code review, quality check, or asks to review their changes.

How to use this skill

Skill file

Review all current code changes using two-stage review.

Iron Law

Two stages. In order. No shortcuts.

Stage 1 (Spec Compliance) MUST pass before Stage 2 (Code Quality) begins.

These are different questions: "Did you build the right thing?" vs "Did you build it well?"

Stage 1: Spec Compliance

Question: Does the code do what was intended?

  1. Get the diff

```

git diff

git diff --cached

```

  1. Identify the intent — What was the goal of these changes? Check:
  1. Verify spec compliance:
  1. Stage 1 Verdict:

Stage 2: Code Quality

Question: Is the code well-written? (Only after Stage 1 PASSES)

Read each changed file in full to understand context, then check:

Security

Performance

Code Quality

Convention Compliance

Output Format

## Code Review — Two-Stage

### Stage 1: Spec Compliance — PASS/FAIL
- Intent: [what the changes aim to do]
- Verdict: [pass/fail with reasoning]
- [If FAIL: what's missing or wrong]

### Stage 2: Code Quality — PASS/FAIL

#### Critical (must fix before merge)
- [file:line] [issue] — [why it matters]

#### Warning (should fix)
- [file:line] [issue] — [why it matters]

#### Suggestion (nice to have)
- [file:line] [suggestion]

#### Good Practices Observed
- [what was done well — reinforce good patterns]

Pre-Delivery Checklist

Before presenting the review, verify:

Anti-Rationalization

| Excuse | Rebuttal |

|--------|----------|

| "The spec is unclear so I'll skip Stage 1" | Then ASK for clarification. Unclear spec = ask, not skip. |

| "This is just a small change, doesn't need full review" | Small changes cause big bugs. Review everything. |

| "The code works, so the quality doesn't matter" | Working code that's unreadable is a liability. Quality always matters. |

| "I wrote this code so I know it's correct" | You have blind spots on your own code. Review it as if someone else wrote it. |

| "The security check is overkill for internal code" | Internal code gets exposed. Check it anyway. |

| "Tests are passing so it must be fine" | Tests check behavior. Review checks maintainability, security, and conventions. |

Pre-Delivery Checklist

Before presenting the review, verify:

<!-- Skill by Huzefa Nalkheda Wala | github.com/huzaifa525 | claude-code-optimizer -->

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.