Skip to content
alchaincyf avatar

Huashu Agent Swarm

Coordinates parallel Claude agents on a git repo through tmux, worktrees, and task lock files.

CCM score
55 of 100
skills.sh installs
680
GitHub stars
2.4K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers an 8-agent swarm, or a custom count, running self-organizing loops with no master agent
  • Includes setup_project.sh, start_swarm.sh, dashboard.py, status.sh, send_input.sh, and stop_swarm.sh
  • Enforces task claims through current_tasks/*.lock files, and isolates each agent in its own git worktree
  • Designed for large projects with a git repo, tmux, and the claude CLI installed locally

Install

$ npx -y skills add alchaincyf/huashu-skills --skill huashu-agent-swarm -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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数量> <项目目录>

这会:

  1. 为每个agent创建 git worktree(共享.git对象库,不浪费磁盘)
  2. 创建 tmux session,每个pane一个agent
  3. 每个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 <项目目录>

Details

Repository
github.com/alchaincyf/huashu-skills
Categories
Agent Workflow & Planning, Git & Releases
First seen
Jun 3, 2026

Questions

What does the huashu-agent-swarm skill do?

huashu-agent-swarm runs several Claude agents in parallel on one git project, with no master agent. Each agent claims tasks through lock files, writes code and pushes its own work, which suits large project development.

What do I need before using huashu-agent-swarm?

huashu-agent-swarm needs tmux, installed with brew install tmux, a working claude CLI, and a git repository that already exists or is newly created. Its setup script then creates the prompt, task and log files it uses.

How do I install huashu-agent-swarm?

Run npx -y skills add alchaincyf/huashu-skills --skill huashu-agent-swarm -y in a project to install it. Once installed, huashu-agent-swarm starts a tmux session with one git worktree per agent, and each agent loops through pulling, claiming a task, working and pushing.

Where does huashu-agent-swarm stand in its category?

huashu-agent-swarm is listed under Agent Workflow & Planning, alongside grill-me, grill-with-docs, setup-matt-pocock-skills, grilling and prototype. It sets itself apart by coordinating agents through git alone, with no master agent directing them.

More from alchaincyf/huashu-skills

All 21

Similar to Huashu Agent Swarm

More Agent Workflow & Planning