
Huashu Agent Swarm
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.
- skills.sh installs
- 672
- GitHub stars
- 2.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add alchaincyf/huashu-skills --skill huashu-agent-swarm --agent claude-codeInstalls into .claude/skills of the current project.
Files
Infinite Agent Loop - 无限Agent蜂群模式
受Nicholas Carlini用16个Claude实例自主构建C编译器的启发。 没有master agent,纯git自组织,每个agent独立认领任务、写代码、推送。
触发条件
当用户提到「蜂群模式」「多agent并行」「infinite loop」「agent swarm」「启动蜂群」时使用此技能。
前置要求
- tmux(
brew install tmux) - claude CLI(已安装)
- git 仓库(已有或新建)
使用流程
Step 1: 描述项目
用户告诉我:
- 项目目录路径(必须是git仓库)
- 项目目标和总体描述
- 初始任务列表(或让agent自行拆解)
- agent数量(默认8个)
- 代码规范和测试命令
Step 2: 初始化项目
bash SKILL_DIR/scripts/setup_project.sh <项目目录>
这会在项目中创建:
AGENT_PROMPT.md- 从模板生成,需要我根据用户需求定制TASKS.md- 初始任务清单current_tasks/- 任务认领目录agent_logs/- 日志目录
然后我根据 references/agent-prompt-template.md 定制 AGENT_PROMPT.md,填入项目具体信息。
Step 3: 启动蜂群
bash SKILL_DIR/scripts/start_swarm.sh <agent数量> <项目目录>
这会:
- 为每个agent创建 git worktree(共享.git对象库,不浪费磁盘)
- 创建 tmux session,每个pane一个agent
- 每个agent进入无限循环:pull → 认领任务 → 执行 → push → 下一个
Step 4: 打开观测台
python3 SKILL_DIR/scripts/dashboard.py <项目目录> 8420
浏览器打开 http://localhost:8420,可以:
- 实时查看所有agent状态、git log、任务进度
- 查看每个agent的最新日志
- 输入框直接发送指令给agent(写入HUMAN_INPUT.md)
- 一键停止所有agent
也可以用命令行监控:
# 终端状态
bash SKILL_DIR/scripts/status.sh <项目目录>
Sponsors
Details
- Repository
- github.com/alchaincyf/huashu-skills
- Categories
- Git & Pull Requests, AI & Agent Building
- First seen
- Jun 3, 2026
More from alchaincyf/huashu-skills
All 21- Huashu Prompt Save662
- Huashu Md To Pdf1.1K
- Huashu Douyin Script1K
- Huashu Proofreading883
- Huashu Slides844
- Huashu Design776
- Huashu Research753
- Huashu Data Pro748
- Huashu Script Polish741
- Huashu Wechat Image740
- Huashu Xhs Image740
- Huashu Topic Gen734
- Huashu Speech Coach731
- Huashu Article Edit698
- Huashu Video Outline693
- Huashu Info Search692
- Huashu Article To X687
- Huashu Image Upload678
- Huashu Video Check675
- Huashu Material Search673