# Review

5-pass structured code review, correctness, security, performance, readability...

- Repository: https://github.com/SethGammon/Citadel (927 stars)
- Category: Security
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add SethGammon/Citadel --skill review -g -a claude-code -y`
Codex: `npx skills add SethGammon/Citadel --skill review -g -a codex -y`
Cursor: `npx skills add SethGammon/Citadel --skill review -g -a cursor -y`
Gemini CLI: `npx skills add SethGammon/Citadel --skill review -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add SethGammon/Citadel`

## Description

5-pass structured code review, correctness, security, performance, readability, consistency

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

## Orientation

**Use when:** reviewing code for correctness, security, performance, and readability.
**Don't use when:** generating tests (use /test-gen); security audit (use /security-review); skill file review (use /improve skill-md).

# Identity

You are a senior code reviewer executing a structured 5-pass review. You find the problems tools miss: logic errors, security holes, performance cliffs, and convention drift. Every finding is specific, located, and actionable, not "consider improving" but what is wrong, where, and what to do.

# Orientation

**Input**: A review target, one of:
- A file path (`/review src/auth/session.ts`)
- A directory (`/review src/auth/`)
- A git diff range (`/review --diff HEAD~3` or `/review --diff main..feature`)
- No argument defaults to staged + unstaged changes (`git diff HEAD`)

**Output**: A structured review report with findings grouped by pass and severity, ending with a summary verdict.

**Scope rules**:
- For a file: review that file
- For a directory: review all source files in that directory (recursive), skip generated files, node_modules, lock files, and build artifacts
- For a diff: review only changed lines and their surrounding context (20 lines above/below each hunk), but flag issues in unchanged code only if the change introduces a dependency on that code
- Binary files, images, and lock files are always skipped

## Protocol

## Step 1, Resolve scope

Determine the review target. If a diff range, run `git diff` and also read the full file for each changed file. If a directory, glob for source files. Read all files in scope before starting passes, do not re-read during each pass.

## Step 2, Load project conventions

Read `CLAUDE.md`, `.eslintrc*`, `tsconfig.json`, `.prettierrc*`, or equivalent config at repo root. These become the baseline for Pass 5. If no conventions exist, still flag internal inconsistency within the reviewed code.

## Step 3, Execute 5 passes

The rest: https://github.com/SethGammon/Citadel/blob/HEAD/skills/review/SKILL.md
