review

review is a command for Claude Code from alvis-HaoH/gkd. It costs 44 tokens per session (1,181 once invoked), scanned A, original, MIT.

A command that delegates a read-only review of local Git changes to another model. Git is the version-control system used to track code changes.

In plain words
What is it for?
Use it to inspect uncommitted changes or a whole branch for bugs, logic problems, boundary cases, security issues, or design weaknesses.
Why use it?
It keeps the review separate from the main conversation and ensures the reviewer does not modify files or provide patches.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the gkd plugin — 7 commands shipped together

Good fit Use it to inspect uncommitted changes or a whole branch for bugs, logic problems, boundary cases, security issues, or design weaknesses.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add alvis-HaoH/gkd
Claude Code
/plugin install gkd

Made for: Claude Code.

Or install gkd, the plugin that ships this one along with the rest of its 7 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for review

README.md
[![agentmods](https://agentmods.dev/badge/commands/alvis-haoh/gkd/review.svg)](https://agentmods.dev/commands/alvis-haoh/gkd/review)
Your own site
<a href="https://agentmods.dev/commands/alvis-haoh/gkd/review"><img src="https://agentmods.dev/badge/commands/alvis-haoh/gkd/review.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,181 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.01181
Opus 5 $0.00022 $0.00590
Sonnet 5 $0.00009 $0.00236
Haiku 4.5 $0.00004 $0.00118

Measured 8d ago against content hash 209ba49d481a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/review.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

让委派模型审查本地 git 改动。review-only:绝不修改文件、不给 patch、不暗示要改。 你只负责调度:定范围 → 选模式 → 委派 → 把子进程的审查输出逐字返回用户。审查指令本身在 prompt 模板里,由 runtime 注入子进程——你不用拼审查步骤。

这个命令是把审查工作委派出去:你做调度(定范围、选模式、回传),读 diff 和审代码是子进程的活——别让整个 diff 占满主上下文。

原始参数:$ARGUMENTS

1. 选 prompt 模板

  • 默认 ${CLAUDE_PLUGIN_ROOT}/prompts/review-defects.md(常规缺陷审查:bug/逻辑/边界/安全)
  • 用户传 --adversarial、或自然语言要求"挑战设计/质疑实现方式/对抗审" → ${CLAUDE_PLUGIN_ROOT}/prompts/review-adversarial.md(对抗式设计审查)
  • 拿不准用户想要哪种就用 AskUserQuestion 问用户**(选项:常规缺陷审查 / 对抗式设计审查)

2. 定范围(scope)

  • --scope working-tree:审未提交改动(已跟踪 + untracked)
  • --scope branch:审 <base>...HEAD 整支(默认 base=origin/main,无远程则 main,--base <ref> 可指定)
  • 不传时 auto:git status --short --untracked-files=all 非空 → working-tree,否则 → branch

3. 选执行模式

  • 参数含 --wait → 前台(必须 timeout: 600000);含 --background → 后台;极小改动(1-2 文件、<50 行)推荐前台,其余(含估不清)推荐后台——审查易超 2 分钟,前台被杀代价大。拿捏不准时则估范围(git diff --shortstat 等)后用 AskUserQuestion 问一次(Wait for results / Run in background,推荐项放首位)

4. 委派给 runtime

node "${CLAUDE_PLUGIN_ROOT}/scripts/gkd-runtime.mjs" \
  <用户的 --<modelKey>(若有,否则不传走默认)> \
  <用户给了 --effort <档> 就带上(none/low/medium/high/xhigh/max);审查是想深想的典型场景,用户说"仔细审/对抗审用 max"之类就补 --effort max> \
  --allowed-tools "Read Grep Glob Bash(git:*)" \
  --prompt-file "<上面选定的模板路径>" \
  --render review \
  "$(cat <<'__GKD_TASK_EOF__'
审查范围 <scope,如 working-tree 或 branch(base=origin/main)>。
<若用户给了额外关注点,粘在这里:重点关注 ...>
用 git 看改动(git status、git diff / git diff --cached、或 git diff <base>...HEAD,untracked 文件逐个读),然后按你的审查准则给意见。
__GKD_TASK_EOF__
)"

审查的立场/关注面/发现标准已在 --prompt-file 注入的模板里,任务文本只交代范围和额外关注点。--render review 让 runtime 把子进程返回的结构化 JSON 渲染成干净报告(模板已要求子进程只吐 JSON,过程独白被挡在输出之外)。前台传 timeout: 600000;后台用 run_in_background: true,报 task_id 给用户,收到 <task-notification> 后 Read .output

输出处理

stdout 契约:runtime 的 stdout 就是给用户的最终产物,你是纯管道——逐字返回,不概括、不重写、不清洗、不根据它自行重建一份审查报告。 无论 stdout 是渲染好的干净报告(## 审查报告 + 分条发现 + 总判定),还是 [gkd] ⚠ 开头的降级提示(模型没吐合法 JSON 时的原文兜底),都照此逐字回传模型的最终判断,中间过程无需逐字返回。

Read the full file on GitHub · 55 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 55 lines · 44 tokens per session scan A 209ba49d481a

Subscribe to this mod's changes

review is a command published in the GitHub repository alvis-HaoH/gkd (10 stars, last pushed 1mo ago), licensed MIT. It adds 44 tokens to every session and 1,181 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.