跳到主内容
智客 ZICQ

技能库 智客分类:Agent 工作流 claude-delegate

Claude Delegate

将一个编码任务委托给一个单独的克洛德代码CLI进程或另一个克洛德会话作为执行者,然后审查它的diff并自己登陆. 只有在用户明确要求将执行委托给克洛德代码,另一个克洛德会话,或"Claude"CLI——例如"让另一个克洛德执行这个","把这个交给克洛德代码",或"通过单独的克洛德会话运行这个队列"时才使用. 不要仅仅因为目前的管弦乐手是克洛德而触发,不要在用户请克洛德不经授权直接执行时使用.

4568 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

将一个编码任务委托给一个单独的克洛德代码CLI进程或另一个克洛德会话作为执行者,然后审查它的diff并自己登陆. 只有在用户明确要求将执行委托给克洛德代码,另一个克洛德会话,或"Claude"CLI——例如"让另一个克洛德执行这个","把这个交给克洛德代码",或"通过单独的克洛德会话运行这个队列"时才使用. 不要仅仅因为目前的管弦乐手是克洛德而触发,不要在用户请克洛德不经授权直接执行时使用.

何时用

用户请现任克劳德不经授权直接执行

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Claude Delegate、When not to use this、Prerequisites、The loop、1. Write the brief、2. Dispatch。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/writing-the-brief.md、scripts/relay.mjs、references/dispatch-and-poll.md、references/review-and-land.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Delegate a coding task to a separate Claude Code CLI process or another Claude session as an implementer, then review its diff and land it yourself. Use only when the user explicitly asks to delegate implementation to Claude Code, another Claude session, or the `claude` CLI — for example, "have another Claude implement this", "delegate this to Claude Code", or "run this queue through a separate Claude session." Do not trigger merely because the current orchestrator is Claude, and do not use when the user asks the current Claude to implement directly without delegation.

Claude DelegateWhen not to use thisPrerequisitesThe loop1. Write the brief2. Dispatchreview/diagnosis only: add --read-onlycontinue the latest session: add --resume-lastcontinue the recorded session: add --session <id>choose limits: add --max-turns 40 --max-budget-usd 10hard relay deadline: add --timeout 2hinspect every option: node .../relay.mjs --help

兼容:Requires the `claude` CLI (Claude Code) installed and authenticated, Node 18+, and git. The orchestrating agent must be able to run shell commands and read files. Claude's shell sandbox requires macOS, Linux, or WSL2; native Windows launch is pending verification. · 许可:MIT

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
claude-delegate
description
Delegate a coding task to a separate Claude Code CLI process or another Claude session as an implementer, then review its diff and land it yourself. Use only when the user explicitly asks to delegate implementation to Claude Code, another Claude session, or the `claude` CLI — for example, "have another Claude implement this", "delegate this to Claude Code", or "run this queue through a separate Claude session." Do not trigger merely because the current orchestrator is Claude, and do not use when the user asks the current Claude to implement directly without delegation.
compatibility
Requires the `claude` CLI (Claude Code) installed and authenticated, Node 18+, and git. The orchestrating agent must be able to run shell commands and read files. Claude's shell sandbox requires macOS, Linux, or WSL2; native Windows launch is pending verification.
许可
MIT
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 4
  • references/writing-the-brief.md
  • scripts/relay.mjs
  • references/dispatch-and-poll.md
  • references/review-and-land.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「claude-delegate」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-d03e5c74143da5ce-%E5%85%8B%E5%8A%B3%E5%BE%B7%E4%BB%A3%E8%A1%A8.html
请存为 .cursor/skills/claude-delegate/SKILL.md 或 .claude/skills/claude-delegate/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/amelnagdy/delegate-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/amelnagdy/delegate-skills' --list

npx skills add 'https://github.com/amelnagdy/delegate-skills' --skill 'claude-delegate'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: claude-delegate description: >- Delegate a coding task to a separate Claude Code CLI process or another Claude session as an implementer, then review its diff and land it yourself. Use only when the user explicitly asks to delegate implementation to Claude Code, another Claude session, or the `claude` CLI — for example, "have another Claude implement this", "delegate this to Claude Code", or "run this queue through a separate Claude session." Do not trigger merely because the current orchestrator is Claude, and do not use when the user asks the current Claude to implement directly without delegation. license: MIT compatibility: Requires the `claude` CLI (Claude Code) installed and authenticated, Node 18+, and git. The orchestrating agent must be able to run shell commands and read files. Claude's shell sandbox requires macOS, Linux, or WSL2; native Windows launch is pending verification. metadata: version: 0.5.0 --- # Claude Delegate You are the **orchestrator**. Delegate one bounded coding task to a separate **implementer** — a Claude Code CLI session — then review what it produced and land it yourself. You write the brief and own the judgment; the separate Claude session edits the working tree; you verify and commit. This skill is not a signal for the current Claude to implement directly. Use it only after the human explicitly asks for delegation to another Claude Code process or session. ## When not to use this - The human asked the current agent to implement the task directly. - The task is small enough to do inline and the human did not request delegation. - The `claude` CLI is missing or unauthenticated (`claude auth status`). - The task needs a stronger host boundary than Claude Code's tool permissions and shell-only sandbox provide. Use an isolated container or VM for that requirement. ## Prerequisites 1. `claude --version` succeeds. 2. `claude auth status` reports an authenticated session. On macOS the live credentials sit in the login Keychain; when the orchestrator's own sandbox blocks Keychain access (Codex's sandbox does), `claude` falls back to a possibly stale credentials file and reports `loggedIn: false` even though the login is valid. Re-run the check — and the dispatch itself — with that sandbox escalated or outside it before concluding the CLI is unauthenticated. 3. The target repository is the directory passed with `--cd`. 4. On Linux/WSL2, Claude's sandbox dependencies are installed. The normal relay profile is configured to fail when the sandbox is unavailable instead of silently running shell commands unsandboxed. Existing merged settings can still affect the effective boundary. ## The loop ### 1. Write the brief The separate session has no orchestrator chat history. It receives the brief on stdin and can inspect the target working tree. Claude Code automatically discovers the target project's `CLAUDE.md` and normal local Claude configuration because the relay does not use `--bare`. It does **not** generically auto-load `AGENTS.md`. Read `AGENTS.md` yourself and copy every load-bearing constraint and the real gate commands into the brief. Tell the implementer not to commit. Keep one task per brief. Template and details: [references/writing-the-brief.md](references/writing-the-brief.md). ### 2. Dispatch ```bash node "/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo # review/diagnosis only: add --read-only # continue the latest session: add --resume-last # continue the recorded session: add --session # choose limits: add --max-turns 40 --max-budget-usd 10 # hard relay deadline: add --timeout 2h # inspect every option: node .../relay.mjs --help ``` `` is this installed skill directory, the folder containing this `SKILL.md`. The relay runs `claude -p --output-format stream-json --verbose`, sends the brief through stdin, and writes artifacts under the system temp directory by default. It never uses `--bg` or `--bare`, and it never commits. See [references/dispatch-and-poll.md](references/dispatch-and-poll.md). ### 3. Wait The relay blocks until Claude exits. Use the orchestrator's background-command facility, or run it in the foreground and wait. Completion means the process exited and `result.json` exists. - A pre-run usage error exits 2 and writes no `result.json`. - A missing `claude` exits 127 and writes `status: "claude_unavailable"`. - Timeout and caught relay signals terminate the whole implementer process tree and preserve an outcome artifact. Read `finalMessage`, `touchedFiles`, `resultSubtype`, and the raw artifact paths from `result.json`. ### 4. Review Treat the implementer's report and gate outcomes as claims: - Review edits to existing tests before a green gate means anything. - Re-run the project's actual gates yourself. - Read the complete diff against the brief, starting with `touchedFiles`. - Inspect untracked and staged content as well as the ordinary diff. - Run relevant guard skills if installed. Full checklist: [references/review-and-land.md](references/review-and-land.md). ### 5. Land The **orchestrator commits** only after the gates pass and the diff holds. For rework, resume the same Claude session with a delta brief: ```bash echo "Keep the implementation, replace the mocked DB test with the migrated fixture, and remove the unused import." | node "/scripts/relay.mjs" --session --cd /path/to/repo ``` Review a resumed run exactly like the first run. ## Permission profiles The normal profile is deliberately explicit: - `acceptEdits` permission mode. - Built-in tools restricted to Read, Glob, Grep, Edit, Write, and the platform shell. - On macOS, Linux, and WSL2, Claude's shell sandbox is enabled with startup failure on missing dependencies and no unsandboxed retry. Commands that stay sandboxed are auto-approved so ordinary gates can run headlessly. The sandbox governs shell processes and their children only; merged local or managed sandbox settings can add effective paths or exclusions. - Configured MCP discovery and Claude.ai connectors are disabled, all MCP tools are denied, and skills, commands, and Claude's Agent tool are unavailable to the child. Project `CLAUDE.md`, hooks, normal authentication, session persistence, and other local settings still load. - String rules deny common direct shell forms of `git commit`, `git push`, and nested `claude`, plus any command containing `claude-delegate`. Aliases, scripts, and wrappers can bypass them, so they are only a speed bump; the brief's no-commit instruction and orchestrator review remain the boundary. Native Windows does not support Claude's shell sandbox. The relay restricts the tool surface and pre-approves PowerShell so the run remains non-interactive, but that shell is not OS-isolated. Native `claude.exe` and npm `claude.cmd` launch paths are implemented; Windows verification is pending. `--read-only` uses `plan` mode with only Read, Glob, and Grep. It removes edit, write, and shell paths, then compares parsed git porcelain and fingerprints the working-tree identity and index entries of Git-visible paths that were already dirty. `readOnlyViolation` is `true` when either signal proves a change, `false` when coverage is complete and detects none, and `null` when coverage is incomplete. This is a reporting tripwire, not an OS boundary: ignored paths and perfect restores are outside it, local hooks can write, and concurrent changes cannot be attributed to Claude. `--dangerously-skip-permissions` is an explicit opt-in to Claude's `bypassPermissions` mode. The restricted tool surface, direct commit/push deny rules, and supported-platform shell sandbox remain, but direct file tools can cross normal permission boundaries. Use it only with the human's explicit acceptance. ## Complementary to native Claude features Claude subagents, agent teams, and background sessions are useful when the current Claude environment is already the orchestrator and native coordination is the goal. This skill is complementary: it provides a cross-orchestrator contract — self-contained brief → dispatch → artifacts → review → land — and keeps the commit with the orchestrator. ## References - [references/writing-the-brief.md](references/writing-the-brief.md) — context, `CLAUDE.md` versus `AGENTS.md`, real gates, report contract, and delta briefs. - [references/dispatch-and-poll.md](references/dispatch-and-poll.md) — flags, profiles, artifacts, `result.json`, polling, and failure recovery. - [references/review-and-land.md](references/review-and-land.md) — generated-code review, the commit boundary, and session rework. - [references/multi-task-queues.md](references/multi-task-queues.md) — sequential queues, progress tracking, constraint carry-forward, and final coherence.

相关技能

Agent 工作流

Skill Creator

创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.

Agent 工作流

Clawdhub

使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.

Agent 工作流

Agent Team Orchestration

管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.

Agent 工作流

Superpowers

Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…