Skip to content
Automation
Command

/ask

委派模型回答/分析/审/咨询。**只读不改文件**(Read/Grep/Glob + Bash(git:*))。主 Claude 会智能补 --with-context、选模型。

From plugin
gkd
117 skills7 commands
Install
> /plugin marketplace add alvis-HaoH/gkd
> /plugin install gkd@gkd

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/ask

Context preview

What this command does when you run it.

委派模型回答/分析/审/咨询。**只读不改文件**(Read/Grep/Glob + Bash(git:*))。主 Claude 会智能补 --with-context、选模型。

Command definition

ask.md
description: 委派模型回答/分析/审/咨询。**只读不改文件**(Read/Grep/Glob + Bash(git:*))。主 Claude 会智能补 --with-context、选模型。
argument-hint: '[--<model>] [--with-context] <任务(可多行)>'
allowed-tools: Bash(node:*), AskUserQuestion

把任务委派给指定模型,**只读模式**——子进程不能改文件、不能跑除 `git:*` 外的 Bash。 **委派的目的是把重活的 token 留在子进程,别搬回主上下文**——给方向和路径,实活交给子进程。

原始参数(可能多行,含特殊字符):

$ARGUMENTS

怎么做

1. **拣 flags**:识别 `--<modelKey>`(见 `${CLAUDE_PLUGIN_ROOT}/config/models.json`)、`--with-context`、`--resume`、`--effort <档>`、`--json`、`--quiet`。**忽略 `--write`**——ask 只读,用户若需要修改就提醒他改用 `/gkd:do`。`--effort`(none/low/medium/high/xhigh/max)调思考强度,claude/codex 模型通用;用户说"深想一点/xhigh""快速点/别想太多"之类就补上。不传则各 harness 用自己的默认档。

2. **选模型**:

  • 用户显式指定或自然语言提名("用 GPT 看看","让所有模型xxx")就用之;没说就自己判断挑一个合适的,拿不准就**不传**、让 runtime 用默认。
  • **视觉约束(须自觉遵守):任务涉及图片时,只能从这些支持视觉的模型里选**:!`node "${CLAUDE_PLUGIN_ROOT}/scripts/gkd-runtime.mjs" --list-vision`
  • 本机装了 codex CLI 时 `--codex` 可用(走 codex harness、GPT 原生工具循环,不是又一个便宜模型;要 harness 差异 / 独立第二意见 / GPT-image生成时选它)。**codex 也支持 `--with-context`**,首次会把当前对话导入成 codex thread(约 1-2s)。

3. **`--with-context` 自己判断**:任务若回指了主对话里才有、任务文本没写清的信息(指代某个之前讨论的方案/实体),就加 `--with-context` 把主对话 fork 给子进程;任务完全自洽就不加;**拿不准就用 `AskUserQuestion` 问用户**(选项:带上对话历史 / 干净委派)。

4. **跑**(任务文本第一个非 flag token 起,保留所有换行):

node "${CLAUDE_PLUGIN_ROOT}/scripts/gkd-runtime.mjs" \
  <拣出+补的 flags> \
  --allowed-tools "Read Grep Glob Bash(git:*)" \
  "$(cat <<'__GKD_TASK_EOF__'
<把任务原文逐字粘进来,保留换行,不重排/总结/翻译>
__GKD_TASK_EOF__
)"

单引号 heredoc 终止符 + 外层 `"$(...)"` 让多行任务成为**单个 argv 参数**(裸用 `$ARGUMENTS` 会被 shell 拆成多条命令,别这么写)。

5. **运行模式**:**默认 `run_in_background: true`**。Bash 前台默认 2 分钟超时会杀子进程丢进度,而读长文档/全仓审常超时。只有确信 < 30 秒(简单单点问答)才前台,且必须传 `timeout: 600000`,绝不用默认。不确定就后台。

输出处理

  • 后台:Bash 立刻返回 task_id,报给用户("已在后台启动,task: `<id>`,跑完会通知")并**立刻还控制权,不要 TaskOutput 阻塞**。收到 `<task-notification>` 后 Read 那个 `.output` 文件,把 result 汇报给用户。
  • 前台:stdout 直接就绪,直接汇报。
  • stderr 末尾 `[gkd]` 行确认实际模型;`❌ 失败` 时把 result 里的 API 错误原文如实告知用户。
  • ask 只读,**由你判断结果是否采纳、如何落盘。
Read more
Ships withgkd

GKD 是「搞快点」的拼音首字母,也是三个当下前沿开源模型的首字母 —— GLM · Kimi · Deepseek。 GKD 是一个 Claude Code plugin。它借 Claude Code 自己的工具循环(harness),起一个以你指定的任意模型为大脑的子进程去干活——子进程有完整的 Read/Edit/Bash...

Get the whole plugin
Stats
11
Stars
1
Forks
Maintained
Maintenance
JavaScript
Language
MIT
License
2mo ago
Last commit
2mo ago
Created

Repo: alvis-HaoH/gkd

Other commands on gkd.

resume
Command

resume

接着委派任务继续(续子进程线程)。默认续本目录上次;也可凭模糊描述点名续任意历史/跨目录 session。读/写模式自动继承——不需要重传 --write。

@alvis-haoh@alvis-haohView Command