Huashu Agent Swarm logo

Huashu Agent Swarm

CommunityPopular
alchaincyf
huashu-agent-swarm

多Agent蜂群并行协作,纯git自组织,适合大型项目开发。当用户提到"蜂群模式"、"多agent"、"并行开发"、"agent swarm"时使用。

Overview

Publisheralchaincyf
Repositoryhuashu-skills
Skill namehuashu-agent-swarm
Stars
1.6K
Forks
244
Bundled files
9
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 9 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by alchaincyf on GitHub. Read the source before you install it.

Installation

Install the Huashu Agent Swarm AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/alchaincyf/huashu-skills.git /tmp/huashu-skills
mkdir -p .claude/skills
cp -r /tmp/huashu-skills/huashu-agent-swarm .claude/skills/huashu-agent-swarm
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Huashu Agent Swarm in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Huashu Agent Swarm on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Huashu Agent Swarm is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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
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
bash SKILL_DIR/scripts/start_swarm.sh <agent数量> <项目目录>

这会:

  1. 为每个agent创建 git worktree(共享.git对象库,不浪费磁盘)
  2. 创建 tmux session,每个pane一个agent
  3. 每个agent进入无限循环:pull → 认领任务 → 执行 → push → 下一个

Step 4: 打开观测台

bash
python3 SKILL_DIR/scripts/dashboard.py <项目目录> 8420

浏览器打开 http://localhost:8420,可以:

  • 实时查看所有agent状态、git log、任务进度
  • 查看每个agent的最新日志
  • 输入框直接发送指令给agent(写入HUMAN_INPUT.md)
  • 一键停止所有agent

也可以用命令行监控:

bash
# 终端状态
bash SKILL_DIR/scripts/status.sh <项目目录>

# 发送指令
bash SKILL_DIR/scripts/send_input.sh <项目目录> "你的指令"

# 直接进入tmux观察
tmux attach -t swarm-<项目名>

Step 5: 停止

bash
bash SKILL_DIR/scripts/stop_swarm.sh <项目目录>

自动停止所有agent + 合并分支 + 清理worktrees。

核心机制

Git自组织协调

  • 每个agent通过 current_tasks/*.lock 文件认领任务
  • 通过 TASKS.md 了解全局进度
  • 通过 git log 了解其他agent的工作
  • 冲突由agent自行解决

Git Worktree隔离

  • 不用多份clone,用 git worktree 实现隔离
  • 所有worktree共享同一个 .git 对象库
  • 每个agent在自己的worktree独立工作

无限循环

  • 每个agent完成一个session后自动开始下一个
  • 通过 git pull 获取其他agent的最新成果
  • 通过 sleep 间隔避免API限流

关键配置

参数默认值说明
agent数量8可在启动时指定
sleep间隔5秒agent_loop.sh中可调
模型claude-opus-4-6agent_loop.sh中可调

风险和应对

风险应对
API限流sleep间隔 + 可调agent数量
合并冲突AGENT_PROMPT指导小粒度commit
死循环无用功日志监控 + 停止条件
磁盘空间stop_swarm.sh自动清理
成本失控可在AGENT_PROMPT中限制session数

花叔出品 | AI Native Coder · 独立开发者 公众号「花叔」| 30万+粉丝 | AI工具与效率提升 代表作:小猫补光灯(AppStore付费榜Top1)·《一本书玩转DeepSeek》

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Huashu Agent Swarm AI skill do?

多Agent蜂群并行协作,纯git自组织,适合大型项目开发。当用户提到"蜂群模式"、"多agent"、"并行开发"、"agent swarm"时使用。

Why use Huashu Agent Swarm on TypingMind?

Because you install it once and use it with any model. Huashu Agent Swarm is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Huashu Agent Swarm in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/alchaincyf/huashu-skills/tree/master/huashu-agent-swarm. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Huashu Agent Swarm?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Huashu Agent Swarm?

As many as you like. As long as a model supports skills, you can use Huashu Agent Swarm with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Huashu Agent Swarm AI skill free?

It is published on GitHub by alchaincyf. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇