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.
/plugin marketplace add alvis-HaoH/gkd/plugin install gkdWrote 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.
[](https://agentmods.dev/commands/alvis-haoh/gkd/review)<a href="https://agentmods.dev/commands/alvis-haoh/gkd/review"><img src="https://agentmods.dev/badge/commands/alvis-haoh/gkd/review/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/alvis-haoh/gkd/review"><img src="https://agentmods.dev/badge/commands/alvis-haoh/gkd/review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00044 | $0.01181 |
| Opus 5.5 | $0.00018 | $0.00472 |
| Sonnet 5.5 | $0.00009 | $0.00236 |
| Haiku 4.5 | $0.00004 | $0.00118 |
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 1mo 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.
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 时的原文兜底),都照此逐字回传模型的最终判断,中间过程无需逐字返回。
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.
- 1mo ago First seen · 55 lines · 44 tokens per session scan A 209ba49d481a
review is a command published in the GitHub repository alvis-HaoH/gkd (11 stars, last pushed 3mo ago), licensed MIT. It adds 44 tokens to every session and 1,181 once invoked, about $0.0002 per session on Opus 5.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.
Other commands, from other repositories
review
Structured code review with severity categorization (distinct from Claude Code's PR review).
init
Install the formatters this repository needs, with every command visible before it runs.
git
The pre-finish status: branch, hygiene findings, message checks, workflow lint, template state.
extend
Capture a mid-PR sub-idea and implement it onto the current open PR's branch — no new branch, no new PR. Preserves Verify → Review → Deliver.
security-review
Depth-first security audit of the current git diff — OWASP Top 10, secret leakage, insecure-by-default APIs, and language-specific foot-guns. Pass a PR number to audit a specific PR's diff.
quality-review
Maintainability and code-quality review via the quality-reviewer agent.