ipIterPrompt
Slash-command packQuality & SecurityVerified Last verified 2026-07-24

/security-review Command

by Anthropic

A custom slash command stored in `.claude/commands/` that packages a repeatable security-review prompt. Typing `/security-review` runs a consistent audit of the current branch's diff for injection, authz, secret-handling, and unsafe-dependency issues — the same checklist every time, shareable across the team.

Works with

MCP servers, subagents, skills, slash commands, and hooks.

When to use it

  • Before merging changes that touch auth, input handling, or dependencies
  • As a routine gate in a PR-prep workflow

When not to

  • As a substitute for a real SAST tool or a professional pen test

What it does

  • One keystroke to run a standardized security audit
  • Reviews the branch diff for common vulnerability classes
  • Shareable via the repo so the whole team runs the same check

How to install

Setup steps with copy-paste config. Sources are cited under each method.

Add the command file

Claude Code

Requires: Claude Code installed

  1. Create the commands directory

    Project commands live in `.claude/commands/`; the filename becomes the command name.

    shell
    mkdir -p .claude/commands
  2. Write the command

    Create `security-review.md`. `$ARGUMENTS` is replaced with anything you type after the command.

    config
    Run a security review of the current branch's diff against origin/main.
    Check for: injection, broken authz, secret leakage, unsafe deserialization,
    and known-vulnerable dependencies. Report findings by severity with file:line.
    Scope: $ARGUMENTS
  3. Run it

    Invoke from the Claude Code prompt.

    config
    /security-review lib/auth

How to prompt it

Copy-paste prompts written to exercise this plugin, with what to expect.

Audit an auth change

You changed the login flow and want a focused security pass.

/security-review the login and session code

What to expect: Claude Code runs the stored security prompt against your diff and returns a severity-ranked list of concrete findings with locations, not a generic checklist.

  • Keep the command's checklist updated as your threat model evolves.

Tips for getting the most out of it

  • Pair with the built-in `/security-review` if your Claude Code version ships one, and extend it with project-specific rules.
  • Commit the command file so reviews are reproducible in CI-style workflows.

Prompts to pair with it

Real prompts from the IterPrompt library you can copy or run.

SaaS Security Audit - OWASP Top 10 & Multi-Tenant Isolation Review

Turn any AI chat into a saas security audit - owasp top 10 & multi-tenant isolation review with this community persona prompt.

4,794 copiesOpen ↗

Web App Security Code Review (OWASP) - Public Test

Turn any AI chat into a web app security code review (owasp) - public test with this community persona prompt.

4,725 copiesOpen ↗

Pipeline Review Prep — Cybersecurity

Prepare an honest pipeline review that survives manager scrutiny. Purpose-built for cybersecurity contexts.

714 copiesOpen ↗

Win/Loss Review — Cybersecurity

Extract transferable lessons from a closed deal. Purpose-built for cybersecurity contexts.

1,332 copiesOpen ↗

Security-Focused Review — TypeScript & React

Review code specifically for security vulnerabilities. Purpose-built for typescript & react contexts.

3,058 copiesOpen ↗

Security-Focused Review — Python Backend

Review code specifically for security vulnerabilities. Purpose-built for python backend contexts.

4,028 copiesOpen ↗
See more prompts in the library

Frequently asked questions

Does this replace tools like Semgrep or Snyk?+

No. It's a fast, contextual first pass. Keep dedicated SAST/dependency scanners in CI for coverage and compliance.

Pairs well with

Related guides

Alternatives to /security-review Command

Sources & verification

The facts on this page and where they come from. Anything unverified is labeled — we'd rather say "unknown" than guess.

Install steps, pricing, and availability change often. Always confirm on the official page before relying on setup details.