Skills

Review

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

Install

npx skills add SethGammon/Citadel --skill review -g -a claude-code -y
Repository
SethGammon/Citadel927
Category
Security
Updated
5d ago
License
MIT
Context cost
Mediumabout 2,008 tokens
Runs scripts
No, instructions only

What it does

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

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

Read the whole SKILL.md on GitHub

More in Security