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/resume)<a href="https://agentmods.dev/commands/alvis-haoh/gkd/resume"><img src="https://agentmods.dev/badge/commands/alvis-haoh/gkd/resume.svg" alt="Measured on agentmods" 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.00053 | $0.01883 |
| Opus 5 | $0.00026 | $0.00941 |
| Sonnet 5 | $0.00011 | $0.00377 |
| Haiku 4.5 | $0.00005 | $0.00188 |
Grade A, and why
resume 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.
How it starts
The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
续委派线程(B 档),让委派模型接着上次的上下文继续干。用户几乎不会给 sessionId——他只会说"接着刚才"或模糊描述"上次那个改配置的"。把这句话对应到哪个 session 是你(主 Claude)的活,三种情况:
- 续本目录上次(最常见):用户只说"接着刚才/上次继续" → 不带 id,
--resume让 runtime 取本目录最近一次续上。 - 模糊描述某次历史委派("上次那个改配置的"/"让 kimi review 的那次"/"别的项目里写文档那个") → 走检索 SOP(下方)把描述翻成 sessionId,再
--resume <id>续(可跨目录,runtime 自动定位归属目录并在那里运行)。 - 用户直接粘了 UUID → 直接
--resume <id>。
mode 自动继承:上次 do(写)就继续写,上次 ask(读)就继续读(从委派记录恢复)。想把读会话升级到写,用 /gkd:do --resume [<sessionId>] <补充>(显式 --write 永远胜过继承)。
原始参数:
$ARGUMENTS
怎么做
-
拣 flags:
--<modelKey>、--effort <档>、--json、--quiet。不要手动加--write(由继承决定)。--effort(none/low/medium/high/xhigh/max)调思考强度,claude/codex 通用;用户说"这次深想一点/快速点"之类就补上。 -
定位要续哪个 session(三种情况见开头):续本目录上次 → 不带 id;模糊描述 → 走检索 SOP(下一节)拿 id;用户直接粘 UUID → 直接用。注意:别因补充指令里恰好有类 UUID 串(trace id/GUID)就误拣成
--resume <id>,拿不准就当普通续——runtime 侧有 UUID 正则闸门兜底。 -
跑(补充指令第一个非 id/flag token 起,保留换行):
node "${CLAUDE_PLUGIN_ROOT}/scripts/gkd-runtime.mjs" --resume <可选 sessionId> <拣出的 flags> "$(cat <<'__GKD_TASK_EOF__'
<补充指令原文,保留换行>
__GKD_TASK_EOF__
)"
点名续时 --resume 紧跟 sessionId(如 --resume 550e8400-e29b-41d4-a716-446655440000);续上次则只写 --resume。单引号 heredoc 终止符 + 外层 "$(...)" 包成单个 argv 参数(同 ask/do)。
- 运行模式:默认
run_in_background: true(续上次线程,规模通常不小)。只有确信本次补充 < 30 秒才前台,且必须timeout: 600000。
检索 SOP:模糊描述 → sessionId
用户模糊描述某次历史委派("续上次那个改配置的")时,别自己 Read/grep delegations.jsonl(每行含大量 token 噪音,直接读会污染上下文)。用内部检索脚本 gkd-find-session.mjs——它已内建投影(剥噪音)、关键词/目录/时间过滤、追 fork 链到最新节点、限量:
node "${CLAUDE_PLUGIN_ROOT}/scripts/gkd-find-session.mjs" <关键词...> [--all-cwd] [--days N] [--limit N] [--model <key>] [--last]
- 关键词:对任务摘要做子串匹配(多个 = 任一命中)。用户说"改配置"就传
配置 config models。 - 默认只看当前目录、时间倒序(最新在前);跨目录/别的项目找加
--all-cwd;要更早的加--days N;按模型筛加--model glm(用户说"上次 kimi 看的那个");用户就说"接着刚才/上次"没别的线索时,--last直接拿当前目录最新一条。 - 输出每条已是该 fork 链的最新节点(累积了全部续接上下文),
id:那行可直接拿去--resume <id>。[续接]标记表示它是 fork 出来的节点,任务摘要取自该链发起行。
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.
- 8d ago First seen · 68 lines · 53 tokens per session scan A ae421ded5845
resume is a command published in the GitHub repository alvis-HaoH/gkd (10 stars, last pushed 1mo ago), licensed MIT. It adds 53 tokens to every session and 1,883 once invoked, about $0.0003 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.
Other commands, from other repositories
debug
Systematic debugging with hypotheses and evidence gathering.
review
Structured code review with severity categorization (distinct from Claude Code's PR review).
sparring
Adversarial brainstorming - challenge ideas, find weaknesses.
think
Apply structured thinking frameworks to a problem.
haiku
Switch to Haiku model (fast, cheap).
opus
Switch to Opus model (maximum quality).