No. 031 Review the diff

Use a subagent to review {path} for security issues and…

Use when a diff needs a second pass that stops at findings

  • Claude Code
  • Codex
  • Cursor
  • Review the diff

Prompt

use a subagent to review {path} for security issues and report what it finds

When to use

“Use a subagent to review {path} for security issues and…” fits when a diff needs a second pass that stops at findings, because it says “use a subagent to review {path} for security issues and report what it finds”, after you replace {path} with names from the repo.

One filled message for “Use a subagent to review {path} for security issues and…” is: use a subagent to review src/cart.js for security issues and report what it finds

When not to use

Leave “Use a subagent to review {path} for security issues and…” unused when you wanted the fix applied in the same turn, because “use a subagent to review {path} for security issues and report what it finds” points the other way

How to run it

Claude Code

Claude Code takes “Use a subagent to review {path} for security issues and…” as one paste at the repo root. Do not also save .claude/commands, or “use a subagent to review {path} for security issues and report what it finds” replays on the next task.

Codex

Codex takes “Use a subagent to review {path} for security issues and…” as a paste above the task. Leave AGENTS.md unchanged so the next thread does not inherit “use a subagent to review {path} for security issues and report what it finds”.

Cursor

Cursor should see “Use a subagent to review {path} for security issues and…” only as a chat paste of “use a subagent to review {path} for security issues and report what it finds” for this turn. A file at .cursor/rules would keep applying after the turn ends.

Comparison

对比待补

This before-and-after was not run on this machine.

Related

来源:Anthropic · https://code.claude.com/docs/en/prompt-library · 2026-12-01