This spins up multiple Claude instances that work in parallel on the same codebase, coordinating through git alone with no master orchestrator. Each agent claims tasks via lock files, commits independently, and pulls others' work in an infinite loop. Inspired by Nicholas Carlini's compiler project. You get a tmux session with 8 agents by default, a web dashboard to watch their progress, and git worktrees to keep them isolated without cloning repeatedly. It's genuinely experimental infrastructure for tackling large projects when you're willing to babysit the chaos. Watch for API rate limits and merge conflicts, but the self-organizing approach through git is legitimately interesting if you want to see what emerges from parallel AI collaboration.
npx -y skills add alchaincyf/huashu-skills --skill huashu-agent-swarm --agent claude-codeInstalls into .claude/skills of the current project.
受Nicholas Carlini用16个Claude实例自主构建C编译器的启发。 没有master agent,纯git自组织,每个agent独立认领任务、写代码、推送。
当用户提到「蜂群模式」「多agent并行」「infinite loop」「agent swarm」「启动蜂群」时使用此技能。
brew install tmux)用户告诉我:
bash SKILL_DIR/scripts/setup_project.sh <项目目录>
这会在项目中创建:
AGENT_PROMPT.md - 从模板生成,需要我根据用户需求定制TASKS.md - 初始任务清单current_tasks/ - 任务认领目录agent_logs/ - 日志目录然后我根据 references/agent-prompt-template.md 定制 AGENT_PROMPT.md,填入项目具体信息。
bash SKILL_DIR/scripts/start_swarm.sh <agent数量> <项目目录>
这会:
python3 SKILL_DIR/scripts/dashboard.py <项目目录> 8420
浏览器打开 http://localhost:8420,可以:
也可以用命令行监控:
# 终端状态
bash SKILL_DIR/scripts/status.sh <项目目录>
# 发送指令
bash SKILL_DIR/scripts/send_input.sh <项目目录> "你的指令"
# 直接进入tmux观察
tmux attach -t swarm-<项目名>
bash SKILL_DIR/scripts/stop_swarm.sh <项目目录>
自动停止所有agent + 合并分支 + 清理worktrees。
current_tasks/*.lock 文件认领任务TASKS.md 了解全局进度git log 了解其他agent的工作git worktree 实现隔离.git 对象库git pull 获取其他agent的最新成果| 参数 | 默认值 | 说明 |
|---|---|---|
| agent数量 | 8 | 可在启动时指定 |
| sleep间隔 | 5秒 | agent_loop.sh中可调 |
| 模型 | claude-opus-4-6 | agent_loop.sh中可调 |
| 风险 | 应对 |
|---|---|
| API限流 | sleep间隔 + 可调agent数量 |
| 合并冲突 | AGENT_PROMPT指导小粒度commit |
| 死循环无用功 | 日志监控 + 停止条件 |
| 磁盘空间 | stop_swarm.sh自动清理 |
| 成本失控 | 可在AGENT_PROMPT中限制session数 |
花叔出品 | AI Native Coder · 独立开发者 公众号「花叔」| 30万+粉丝 | AI工具与效率提升 代表作:小猫补光灯(AppStore付费榜Top1)·《一本书玩转DeepSeek》
sickn33/antigravity-awesome-skills
moizibnyousaf/ai-agent-skills
github/awesome-copilot