spawn by alirezarezvani/claude-skills
npx skills add https://github.com/alirezarezvani/claude-skills --skill spawn启动 N 个子智能体,在隔离的 git 工作树中并行处理同一任务。
/hub:spawn # 为最新会话启动智能体
/hub:spawn 20260317-143022 # 为指定会话启动智能体
/hub:spawn --template optimizer # 使用优化器模板作为调度提示
/hub:spawn --template refactorer # 使用重构器模板
当提供 --template <名称> 时,使用 references/agent-templates.md 中的调度提示,而非下方默认提示。可用模板:
| 模板 | 模式 | 使用场景 |
|---|---|---|
optimizer | 编辑 → 评估 → 保留/丢弃 → 重复 x10 | 性能、延迟、体积缩减 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
refactorer| 重构 → 测试 → 迭代直至通过 |
| 代码质量、技术债务 |
test-writer | 编写测试 → 测量覆盖率 → 重复 | 测试覆盖率缺口 |
bug-fixer | 复现 → 诊断 → 修复 → 验证 | 采用竞争性方法修复错误 |
使用模板时,用会话配置中的值替换所有 {变量}。为每个智能体分配一个不同的策略,该策略应适合模板和任务——多样化的策略能最大化并行探索的价值。
.agenthub/sessions/{会话ID}/config.yaml 加载会话配置.agenthub/board/dispatch/Agent(
prompt: "你是 {会话ID} 会话中的 agent-{i}。
你的任务:{任务}
完整任务分配请见 .agenthub/board/dispatch/{seq}-agent-{i}.md
指令:
1. 在你的工作树中工作——进行修改、运行测试、迭代
2. 提交所有更改,并附上描述性信息
3. 将结果摘要写入 .agenthub/board/results/agent-{i}-result.md
包括:采用的方法、更改的文件、可用指标、置信度
4. 完成后退出
约束:
- 请勿读取或修改其他智能体的工作
- 请勿访问其他智能体的 .agenthub/board/results/
- 尽早并频繁提交,附带描述性信息
- 如果陷入死胡同,提交已有内容并在结果中说明",
isolation: "worktree"
)
running:python {skill_path}/scripts/session_manager.py --update {session-id} --state running
告知用户:
/hub:status 监控/hub:eval 进行评估每周安装量
100
代码仓库
GitHub 星标数
6.5K
首次出现
7 天前
安全审计
已安装于
gemini-cli96
kimi-cli96
cursor96
opencode96
codex96
github-copilot96
Spawn N subagents that work on the same task in parallel, each in an isolated git worktree.
/hub:spawn # Spawn agents for the latest session
/hub:spawn 20260317-143022 # Spawn agents for a specific session
/hub:spawn --template optimizer # Use optimizer template for dispatch prompts
/hub:spawn --template refactorer # Use refactorer template
When --template <name> is provided, use the dispatch prompt from references/agent-templates.md instead of the default prompt below. Available templates:
| Template | Pattern | Use Case |
|---|---|---|
optimizer | Edit → eval → keep/discard → repeat x10 | Performance, latency, size reduction |
refactorer | Restructure → test → iterate until green | Code quality, tech debt |
test-writer | Write tests → measure coverage → repeat | Test coverage gaps |
bug-fixer | Reproduce → diagnose → fix → verify | Bug fix with competing approaches |
When using a template, replace all {variables} with values from the session config. Assign each agent a different strategy appropriate to the template and task — diverse strategies maximize the value of parallel exploration.
.agenthub/sessions/{session-id}/config.yaml.agenthub/board/dispatch/Agent(
prompt: "You are agent-{i} in hub session {session-id}.
Your task: {task}
Read your full assignment at .agenthub/board/dispatch/{seq}-agent-{i}.md
Instructions:
1. Work in your worktree — make changes, run tests, iterate
2. Commit all changes with descriptive messages
3. Write your result summary to .agenthub/board/results/agent-{i}-result.md
Include: approach taken, files changed, metric if available, confidence level
4. Exit when done
Constraints:
- Do NOT read or modify other agents' work
- Do NOT access .agenthub/board/results/ for other agents
- Commit early and often with descriptive messages
- If you hit a dead end, commit what you have and explain in your result",
isolation: "worktree"
)
4. Update session state to running via:
python {skill_path}/scripts/session_manager.py --update {session-id} --state running
Tell the user:
/hub:status/hub:evalWeekly Installs
100
Repository
GitHub Stars
6.5K
First Seen
7 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli96
kimi-cli96
cursor96
opencode96
codex96
github-copilot96
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
69,600 周安装