Strategic delegation for multi-step coding, research, or verification work. Use when a task can be split into parent reasoning plus focused sub-agent execution
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-delegate-10e8f21d8bd2 ,按照其中的说明把「delegate」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Use sub-agents when they can do focused work in parallel while the parent keeps architectural judgment, integration, and final verification.
Keep in the parent:
Delegate to sub-agents:
Do not delegate tiny one-step tasks, ambiguous product decisions, destructive operations without a clear acceptance criterion, or final verification.
Use agent for a focused child run. Launch independent children together so they can run in parallel.
Prefer provider-neutral model_strength over hardcoded model ids. Children inherit the active model by default (model_strength: "same"), including type: "scout", so pass model_strength: "faster" explicitly to get the cheaper same-family sibling for read-only exploration:
{
"name": "config_audit",
"prompt": "Inspect crates/tui/src/config.rs and crates/tui/src/settings.rs for duplicate model-default logic. Return file/line findings only; do not edit files.",
"type": "scout",
"model_strength": "faster",
"cwd": "."
}
For code changes, give the child a precise write boundary and tell it not to revert unrelated edits. Keep implementation children capable with model_strength: "same":
{
"name": "docs_patch",
"prompt": "Update only docs/configuration.md to document the new [statusline] keys. Match the surrounding style. Do not edit other files.",
"type": "builder",
"model_strength": "same",
"cwd": "."
}
Use fork_context: true only when the child genuinely needs the current conversation prefix. Leave it omitted for fresh, narrower context.
Sub-agent outputs are self-reports. Re-check material claims before relying on them:
A good delegation prompt includes:
Weak prompt:
Fix the settings bug.
Strong prompt:
Own only crates/tui/src/settings.rs and its tests. Preserve existing config key names. Add a regression test showing that provider-specific API key changes do not restart provider onboarding. Return the changed paths and test command output.