c/agents › command
0votes

Claude Code custom slash command: /review

TemplateLow risk Tested
submitted by CommandVault editors to c/agents

Save as .claude/commands/review.md to get a one-word, consistent code review in Claude Code.

Template · 1 variable
---
description: Review the current changes like a senior engineer
argument-hint: [optional focus, e.g. security or performance]
allowed-tools: Bash(git diff:*), Bash(git status:*)
---

Review the uncommitted changes in this repository: run `git status --short` (new files only show there; read them in full), `git diff` and `git diff --staged`.

Focus: $ARGUMENTS (if empty, review everything).

Report only what's worth changing, grouped as:
1. **Bugs**: wrong behavior, crashes, races, security problems. Give file:line and a concrete failing scenario.
2. **Risky**: missing tests, unclear error handling, performance traps.
3. **Simplify**: code that can be removed or merged.

Skip style nitpicks unless they hide a bug. End with: ship / ship after fixes / don't ship.
Project-specific checks: {{project_checks}}
0 commentsreport

Guide

What you get: Typing /review gives you a structured review of your uncommitted changes (Bugs, Risky, Simplify) with file:line references and a ship / don't ship verdict, without touching your files. Best for Developers using Claude Code (or Codex via a skill) who want a quick, consistent self-review before committing..

Before you start

  • A git repository with uncommitted changes
  • Claude Code: save the file as .claude/commands/review.md
  • Claude Code must be allowed to run git diff (we allowed Bash(git diff:*) and Bash(git status:*))
  • Codex: save the body as .agents/skills/review/SKILL.md with name and description front matter

Worked example (Oct 17, 2026, Claude Code 2.1.296; Codex 0.151.0 (gpt-5.6-sol))

Input

A Next.js 16 page edited (unstaged) to render the ?q= query parameter with dangerouslySetInnerHTML. Ran /review in Claude Code and $review in Codex.

Result

Claude Code: "src/app/page.tsx:23 — cross-site scripting (XSS) through the q query parameter ... Verdict: don't ship." Codex: "Stored/reflected XSS — src/app/page.tsx:23 ... don't ship"

Both tools found the planted XSS, plus a 'Welcome back, undefined' bug and a loose searchParams type. git diff and git status were identical before and after both runs (no edits). Codex also ran npm run build on its own and correctly reported the change breaks the build under cacheComponents; Claude Code did not find that build failure. {{project_checks}} was filled with 'Next.js App Router conventions (server vs client components); keep TypeScript types strict.' After this test it also checks git status so new, untracked files get reviewed, and it may run git diff/status without asking.

How to check it worked

  • Run git diff before and after /review; it should be unchanged
  • Check that each finding points at a real file:line in your diff
  • The reply ends with ship / ship after fixes / don't ship

Common problems

  • git diff does not show brand-new untracked files, so new files are not reviewed unless you stage them (not tested here, follows from the git commands the template uses)
  • In headless or locked-down permission modes the review cannot run unless git diff is allowed
  • The agent may go beyond the template, e.g. Codex ran npm run build and tried npm run dev

Install this command in your AI tool

Converted for each tool's format. Fill in the blanks above first; your answers are included.

One command
npx commandvault add claude-code-custom-slash-command-review-db7a5205 --tool claude
Save as .claude/commands/review.md
---
description: Review the current changes like a senior engineer
argument-hint: [optional focus, e.g. security or performance]
allowed-tools: Bash(git diff:*), Bash(git status:*)
---

Review the uncommitted changes in this repository: run `git status --short` (new files only show there; read them in full), `git diff` and `git diff --staged`.

Focus: $ARGUMENTS (if empty, review everything).

Report only what's worth changing, grouped as:
1. **Bugs**: wrong behavior, crashes, races, security problems. Give file:line and a concrete failing scenario.
2. **Risky**: missing tests, unclear error handling, performance traps.
3. **Simplify**: code that can be removed or merged.

Skip style nitpicks unless they hide a bug. End with: ship / ship after fixes / don't ship.
Project-specific checks: {{project_checks}}

Use it: Type /review and what you want, e.g. /review add password reset. Your text replaces $ARGUMENTS.

The same file also works as a skill at .claude/skills/review/SKILL.md.

From Claude Code's docs , checked Oct 17, 2026.

More from c/agents

See all of c/agents →
0 comments

Log in to join the discussion.