AI agents

Real-world examples

Example: Review changed code

Prompt examples are illustrative; commands are verified against official docs.

Scenario: a branch (yours or a colleague’s) is ready for review before merge. Each tool has a different review surface — use what’s verified, fall back to prompts where no command exists.

Workflow

  1. Look at the diff first.
  2. Run the tool’s review feature with an explicit target.
  3. Triage findings by severity.
  4. Optionally apply fixes and re-review.

Claude Code

Two distinct built-ins plus a security pass:

/diff

/code-review — multi-agent diff review with severity/effort levels and optional auto-fix:

/code-review high
/code-review medium --fix

Levels run low | medium | high | xhigh | max | ultra (ultra runs in the cloud); --comment adds review comments.

/review [PR] — fast, single-pass, read-only review of a GitHub PR:

/review 142

/security-review — check the diff specifically for vulnerabilities:

/security-review

Codex

In the TUI, /review reviews the working tree (uses the session model unless review_model is set in config):

/diff
/review

Non-interactive with explicit targets — exactly one target per run:

codex review --uncommitted          # staged + unstaged + untracked changes
codex review --base main            # changes vs. a base branch
codex review --commit a1b2c3d --title "Login fix review"
codex review "Review the error handling in src/auth/ for edge cases"

Review does not modify the working tree. For team conventions, add a ## Code Review Rules section to the AGENTS.md closest to the code — Codex review picks it up.

Kimi Code

No dedicated code-review slash command is verified for Kimi Code (nothing like /review appears in the official slash-commands reference). The verified alternatives:

Inspect the diff via shell mode (! in the empty input box):

!git diff main...HEAD

Review via prompt:

Review this diff as a senior engineer. Report findings ordered by severity
(blocker / major / minor) with file and line references: correctness bugs,
security issues, missing tests, and style deviations from the rest of the
repo.

Or run it non-interactively:

git diff main...HEAD | kimi -p "Review this diff; list findings ordered by severity with file/line references."

Last verified: 2026-09-07

AI coding tools evolve quickly. If you find outdated information, please open an issue or pull request.