assign
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAssign
任务分配
/assign "Fix the null check in auth.ts" --agent opencode --model opencode-go/kimi-k2.6
/assign "Fix the null check in auth.ts" --agent claude/assign "Fix the null check in auth.ts" --agent opencode --model opencode-go/kimi-k2.6
/assign "Fix the null check in auth.ts" --agent claudeFlags
选项
| Flag | Effect |
|---|---|
| Agent to delegate to. Default: |
| Model to use. Agent default applies if omitted. |
| Agent working directory. Default: current directory. |
If names an unsupported agent, stop: "Unknown agent .
Supported agents: opencode, codex, claude. See ."
--agent<name>./REFERENCE.md| 选项 | 作用 |
|---|---|
| 指定要委托的Agent。默认值: |
| 指定要使用的模型。若省略则使用Agent的默认模型。 |
| Agent的工作目录。默认值:当前目录。 |
若指定的Agent不被支持,则终止操作并提示:"Unknown agent .
Supported agents: opencode, codex, claude. See ."
--agent<name>./REFERENCE.mdStep 1: Write the prompt file
步骤1:写入提示词文件
Write the full task prompt to in the current working
directory (not ). Never pass the prompt as a shell argument, quoting
breaks on multi-line or special-character prompts. Overwrite silently.
./assign-prompt.tmp--dir将完整的任务提示词写入当前工作目录(而非指定的目录)下的文件。切勿将提示词作为shell参数传递,因为多行或含特殊字符的提示词会导致引号解析失败。覆盖文件时无需提示。
--dir./assign-prompt.tmpStep 2: Invoke the agent
步骤2:调用Agent
Look up the agent's invocation template and required non-interactive flags in
. Those flags are not optional: without them the agent blocks on
an invisible permission prompt and hangs silently. Substitute and
, then pipe the prompt:
./REFERENCE.md<model><dir>bash
cat ./assign-prompt.tmp | <agent-command>在中查找Agent的调用模板和所需的非交互选项。这些选项是必填的:缺少它们会导致Agent因隐形权限提示而阻塞并静默挂起。替换和后,通过管道传递提示词:
./REFERENCE.md<model><dir>bash
cat ./assign-prompt.tmp | <agent-command>Step 3: Monitor output
步骤3:监控输出
Watch for progress (tool calls, file writes, step completions). If there is no
output for >60s after startup, the agent is hung on a permission prompt. Kill
it and check the agent's troubleshooting notes in .
./REFERENCE.md监控任务进度(工具调用、文件写入、步骤完成情况)。若启动后超过60秒无输出,说明Agent因权限提示而挂起。此时需终止Agent并查看中的Agent故障排除说明。
./REFERENCE.mdStep 4: Verify and clean up
步骤4:验证与清理
- Report the exit code and a brief summary of what the agent did.
- Delete .
./assign-prompt.tmp - If the task was a code change, prompt the user to verify results.
- 报告Agent的退出代码及任务执行简要总结。
- 删除文件。
./assign-prompt.tmp - 若任务涉及代码修改,提示用户验证结果。
Constraints
约束条件
- Never infer or expand the task. Delegate exactly the prompt provided.
- Never commit, push, or build unless the prompt explicitly asked for it.
- 切勿推断或扩展任务内容,严格按照提供的提示词进行委托。
- 除非提示词明确要求,否则切勿执行提交(commit)、推送(push)或构建操作。