review
Review implementation code for issues and produce a written report
What this skill does
# Review Code
Review all code changes for a user story and produce an actionable report. Be thorough but pragmatic — only flag genuine issues, not style preferences already within the project's conventions.
## Input
`$ARGUMENTS` is the path to a story file.
## Steps
### 1. Read the Story
Read the file at `$ARGUMENTS`. Understand the acceptance criteria — the review must verify the implementation satisfies them.
### 2. Learn the Project
Before reviewing, understand what "correct" looks like:
- Look at a few existing source files similar to the changed ones to calibrate your expectations
### 3. Identify Changed Files
Run `git diff --name-only HEAD` and `git status --short` to find all changed, staged, and untracked files. Include everything — implementation files, test files, schema changes, configuration.
### 4. Read Every Changed File
Use the Read tool on each file. Read the full file, not just the diff — context matters for architectural correctness.
### 5. Review Against Checklist
Evaluate the code against each of these categories:
**Correctness**
- Does the implementation match every acceptance criterion?
- Are edge cases handled?
**Security**
- No injection vulnerabilities
- Authentication and authorisation enforced on all endpoints
- No data leakage across users or tenants
- Sensitive data not exposed in responses
**Architecture**
- Proper layer separation maintained
- Dependencies flow in the correct direction
- No business logic in the wrong layer
**Test Quality**
- Tests actually test behaviour, not just call code
- Edge cases covered
- Mocking follows project conventions
- Each acceptance criterion has at least one test
**Code Style**
- Follows the project's established conventions (learned from existing code)
- Consistent with patterns in similar existing files
**Naming**
- Follows the project's naming conventions exactly
**Performance**
- No obvious performance issues (N+1 queries, unbounded fetches, missing pagination)
**Consistency**
- New code follows patterns established in similar existing files
- Uses existing utilities and helpers rather than reinventing
### 6. Write Report
Derive `story-slug` from the story filename. Write to `docs/reviews/{story-slug}/02-review.md`:
```markdown
# Code Review
**Story:** {story file path}
**Date:** {ISO date}
**Status:** {PASS | ISSUES_FOUND}
## Summary
{One paragraph overall assessment}
## Critical
{Must fix. Each finding with file path and description.}
- `path/to/file:line` — {description of issue and what to fix}
## Warnings
{Should fix. Lower severity but still worth addressing.}
- `path/to/file:line` — {description}
## Suggestions
{Optional improvements. Not blocking.}
- {suggestion}
## Acceptance Criteria Check
| Criterion | Status | Evidence |
| ----------- | --------- | ------------------------ |
| {criterion} | PASS/FAIL | {test or code reference} |
## Files Reviewed
- `path/to/file` — {brief description}
```
If there are no Critical or Warning findings, set Status to `PASS`. Otherwise `ISSUES_FOUND`.
### 7. Output Summary
After writing the report, output a brief summary: total findings by severity and the report file path.
## Rules
- Every finding MUST reference a specific file and ideally a line number.
- Every finding MUST describe what to fix, not just what's wrong.
- Do NOT flag style choices that are consistent with the project's existing patterns.
- Be pragmatic — minor issues that don't affect correctness or security are Suggestions, not Warnings.
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.