Loading...
Loading...
Compare original and translation side by side
| Type | Official Name | Communication | Use When |
|---|---|---|---|
| A | Subagent | Hierarchical (parent spawns child) | Autonomous task, delegated by an orchestrator |
| B | Multi-Agent Swarm | Peer-to-peer via sessions (tmux) | Coordinated agents that message each other |
| 类型 | 官方名称 | 通信方式 | 使用场景 |
|---|---|---|---|
| A | Subagent | 层级式(父Agent生成子Agent) | 由编排器委派的自主任务 |
| B | Multi-Agent Swarm | 通过会话(tmux)进行对等通信 | 可相互发送消息的协同Agent |
.claude/agents/~/.claude/agents/skills/my-skill/agents/.claude/agents/~/.claude/agents/skills/my-skill/agents/created-at: YYYY-MM-DD
created-by: "Firstname Lastname <email@example.com>"
credits: https://... # Optional — only if derived from external workcreated-bycreated-at: YYYY-MM-DD
created-by: "Firstname Lastname <email@example.com>"
credits: https://... # 可选 — 仅当基于外部工作衍生时填写created-by| Field | Required | Values | Notes |
|---|---|---|---|
| Yes | | 3–50 chars, start/end alphanumeric |
| Yes | Text + | Primary triggering mechanism |
| No | | Default: |
| No | | UI identifier |
| No | Array of tool names | Omit = all tools |
| No | Array of tool names | Explicitly deny |
| No | | Override permission prompts |
| No | Integer | Cap agentic turns |
| No | | Run without blocking current session |
| No | | Reasoning effort level |
| No | | Isolated git worktree environment |
| No | | Persistent memory scope |
| No | Array of skill paths | Pre-loaded skills at startup |
| 字段 | 是否必填 | 可选值 | 说明 |
|---|---|---|---|
| 是 | | 3–50个字符,首尾为字母数字 |
| 是 | 文本 + | 主要触发机制 |
| 否 | | 默认值: |
| 否 | | UI识别标识 |
| 否 | 工具名称数组 | 省略则启用所有工具 |
| 否 | 工具名称数组 | 明确禁用指定工具 |
| 否 | | 覆盖权限提示设置 |
| 否 | 整数 | 限制Agent交互轮次 |
| 否 | | 在不阻塞当前会话的情况下运行 |
| 否 | | 推理努力级别 |
| 否 | | 隔离的git工作树环境 |
| 否 | | 持久化内存范围 |
| 否 | Skill路径数组 | 启动时预加载的Skill |
skillsskills1. Glob: **/SKILL.md (search both skills/ and .claude/skills/, wherever they live)
2. For each result, read the `name` and `description` fields from the frontmatter
3. Based on the agent's domain, propose the relevant onesskills:
- skills/react-best-practices
- skills/typescript-advanced-types1. 全局搜索:**/SKILL.md(搜索skills/和.claude/skills/目录,无论其位置)
2. 对于每个结果,从前置元数据中读取`name`和`description`字段
3. 根据Agent的领域,推荐相关的Skillskills:
- skills/react-best-practices
- skills/typescript-advanced-types---
created-at: YYYY-MM-DD
created-by: "Firstname Lastname <email@example.com>"
name: my-agent
description: Use this agent when [conditions]. Examples:
<example>
Context: [Situation]
user: "[Request]"
assistant: "[Response using this agent]"
<commentary>
[Why this agent triggers here]
</commentary>
</example>
model: inherit
color: blue
tools: ["Read", "Grep", "Glob"]
---
You are [role] specializing in [domain].
**Your Core Responsibilities:**
1. [Primary responsibility]
2. [Secondary responsibility]
**Process:**
1. [Step 1]
2. [Step 2]
**Output Format:**
[What to produce and how to structure it]---
created-at: YYYY-MM-DD
created-by: "Firstname Lastname <email@example.com>"
name: my-agent
description: 在[条件]下使用此Agent。示例:
<example>
上下文:[场景]
用户:"[请求]"
助手:"[使用此Agent的响应]"
<commentary>
[此Agent在此处触发的原因]
</commentary>
</example>
model: inherit
color: blue
tools: ["Read", "Grep", "Glob"]
---
你是专注于[领域]的[角色]。
**核心职责:**
1. [主要职责]
2. [次要职责]
**流程:**
1. [步骤1]
2. [步骤2]
**输出格式:**
[需生成的内容及其结构]undefinedundefinedundefinedundefinedtools: Agent(worker, researcher), Read, Bashtools: Agent(worker, researcher), Read, Bashdescription<example>references/triggering-examples.mddescription<example>references/triggering-examples.mdYou are...You will...references/system-prompt-design.md你是...你将...references/system-prompt-design.mdCoordinator session (e.g. "team-leader")
├── Worker session A ("auth-agent") → works on Task 3.5
├── Worker session B ("db-agent") → works on Task 4.2
└── Worker session C ("api-agent") → works on Task 5.1
↕ communicate via tmux send-keys协调器会话(例如"team-leader")
├── 工作者会话A("auth-agent") → 处理任务3.5
├── 工作者会话B("db-agent") → 处理任务4.2
└── 工作者会话C("api-agent") → 处理任务5.1
↕ 通过tmux send-keys进行通信.claude/multi-agent-swarm.local.md---
agent_name: auth-agent
task_number: 3.5
pr_number: TBD
coordinator_session: team-leader
enabled: true
dependencies: ["Task 3.4"]
additional_instructions: "Use JWT, not sessions"
---.claude/multi-agent-swarm.local.md---
agent_name: auth-agent
task_number: 3.5
pr_number: TBD
coordinator_session: team-leader
enabled: true
dependencies: ["Task 3.4"]
additional_instructions: "使用JWT,而非会话"
---undefinedundefined| Field | Required | Description |
|---|---|---|
| Yes | Identifier for this agent in the swarm |
| Yes | Task ordering (e.g. |
| Yes | tmux session name of the coordinator |
| Yes | |
| No | Associated PR number |
| No | Task IDs that must complete first |
| No | Per-agent override instructions |
| 字段 | 是否必填 | 描述 |
|---|---|---|
| 是 | 集群中此Agent的标识符 |
| 是 | 任务顺序(例如 |
| 是 | 协调器的tmux会话名称 |
| 是 | |
| 否 | 关联的PR编号 |
| 否 | 必须先完成的任务ID |
| 否 | 针对该Agent的覆盖指令 |
Stop.claude/settings.jsonexamples/complete-agent-examples.mdsettings.jsonnotify-coordinator.sh.claude/settings.jsonStopsettings.jsonnotify-coordinator.shexamples/complete-agent-examples.mdYou are the coordinator of a multi-agent swarm managing parallel development tasks.
**Your Core Responsibilities:**
1. Assign tasks to worker agents via their tmux sessions
2. Track task dependencies — only assign a task when its dependencies are complete
3. Handle worker notifications (agents message you when idle)
4. Consolidate completed work into a final report
**Coordination Process:**
1. Maintain a backlog of pending tasks with their dependencies
2. When a worker becomes idle: identify the next unblocked task and assign it
3. To assign a task: tmux send-keys -t <session> "<task description>" Enter
4. When all tasks complete: produce a summary of all PRs and outcomes
**State:** Track which tasks are pending/in-progress/done, and which session owns each.你是管理并行开发任务的多Agent集群协调器。
**核心职责:**
1. 通过tmux会话向工作者Agent分配任务
2. 跟踪任务依赖关系 — 仅在依赖任务完成后分配新任务
3. 处理工作者通知(Agent在空闲时向你发送消息)
4. 将已完成的工作整合为最终报告
**协同流程:**
1. 维护带有依赖关系的待处理任务积压
2. 当工作者空闲时:识别下一个未阻塞的任务并分配
3. 分配任务:tmux send-keys -t <session> "<任务描述>" Enter
4. 所有任务完成后:生成所有PR和结果的摘要
**状态跟踪:** 记录哪些任务处于待处理/进行中/已完成状态,以及每个任务所属的会话。examples/complete-agent-examples.mdexamples/complete-agent-examples.mdDoes the agent need to message other running Claude Code sessions?
├── No → Type A: Subagent
│ .claude/agents/my-agent.md
└── Yes → Type B: Multi-Agent Swarm
.claude/multi-agent-swarm.local.md该Agent是否需要与其他运行中的Claude Code会话通信?
├── 不需要 → 类型A:Subagent
│ .claude/agents/my-agent.md
└── 需要 → 类型B:Multi-Agent Swarm
.claude/multi-agent-swarm.local.md---
created-at: 2026-03-31
created-by: "Name <email>"
name: my-agent
description: Use this agent when... Examples: <example>...</example>
model: inherit
---
You are an agent that does X.
1. Step one
2. Step two
Output: [what to produce]---
created-at: 2026-03-31
created-by: "Name <email>"
name: my-agent
description: 在...场景下使用此Agent。示例:<example>...</example>
model: inherit
---
你是一个执行X任务的Agent。
1. 步骤一
2. 步骤二
输出:[需生成的内容]references/system-prompt-design.mdreferences/triggering-examples.md<example>references/agent-creation-system-prompt.mdreferences/system-prompt-design.mdreferences/triggering-examples.md<example>references/agent-creation-system-prompt.mdexamples/complete-agent-examples.mdexamples/agent-creation-prompt.mdexamples/complete-agent-examples.mdexamples/agent-creation-prompt.md