跳到正文
cccskills
免费在 GitHub 公开

huashu-agent-swarm

Coordinate multiple AI agents working on a large software project in parallel. The skill uses Git tasks and worktrees to let agents claim work, share progress, and contribute changes, with scripts and a dashboard for monitoring and control.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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

实测评分 未实测

查看安装方法

适用场景

  • Splitting a large development project across agents
  • Running parallel coding tasks in a Git repository
  • Monitoring agent progress and logs from a dashboard
  • Stopping agents and merging their work

包含的文件(10)

  • SKILL.md3.6 KB
  • references/agent-prompt-template.md4.1 KB
  • references/carlini-lessons.md3.3 KB
  • scripts/agent_loop.sh2.8 KB
  • scripts/dashboard.py20.6 KB
  • scripts/send_input.sh1.0 KB
  • scripts/setup_project.sh2.7 KB
  • scripts/start_swarm.sh3.3 KB
  • scripts/status.sh2.7 KB
  • scripts/stop_swarm.sh2.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

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

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

Step 5: 停止

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》

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Use this skill to edit existing articles through a clear, trackable process. It helps identify requested changes, confirm their scope, save work in batches, and summarize what changed and why.

中文简介正在准备中。当前显示英语简介。

  • Revising several sections of an existing article
  • Shortening content or changing its tone
  • Reorganizing an article’s structure
alchaincyf/huashu-skills19752026年10月19日 更新

Turn a long article into a 200–500 character X post that keeps its main point and personal voice. Choose an opening based on a strong opinion, a surprising result, or a direct value statement, then add concrete details and an invitation to engage.

中文简介正在准备中。当前显示英语简介。

  • Adapt a finished article for an X post
  • Condense a long piece while keeping its main argument
  • Create an opening based on a result or opinion
alchaincyf/huashu-skills19752026年10月19日 更新

Analyze spreadsheet and advertising data, calculate ROI, and create visual reports or presentation slides. The skill checks what the data fields and audience mean when needed, then presents conclusions with supporting numbers, potential risks, and practical next steps.

中文简介正在准备中。当前显示英语简介。

  • Analyzing Excel data and calculating ROI
  • Reviewing advertising campaign results
  • Preparing a visual report or presentation from data
alchaincyf/huashu-skills19752026年10月19日 更新

Clarify a visual brief, recommend three distinct design directions drawn from different design schools, and create prompts for visual generation. The skill can also review finished work for hierarchy, consistency, detail, function, and originality, with actionable suggestions.

中文简介正在准备中。当前显示英语简介。

  • Explore visual directions for a website or app
  • Choose a look for slides, a report, or a cover
  • Create prompts for a visual concept
alchaincyf/huashu-skills19752026年10月19日 更新

Analyze Douyin competitor videos to identify hooks, pacing, shot structure, and conversion patterns, then use product details to draft a seeding or Qianchuan ad script with a storyboard. It also reviews conversational tone and flagged advertising claims.

中文简介正在准备中。当前显示英语简介。

  • Breaking down competitor videos for Douyin
  • Creating a product seeding video script
  • Drafting a Qianchuan ad script and storyboard
alchaincyf/huashu-skills19752026年10月19日 更新

Plan illustrations for an article, source or generate suitable images, upload them to ImgBB, and insert permanent Markdown links with concise alt text. The workflow covers placement, image sourcing, link checks, and basic copyright considerations for public-domain, AI-made, and stock images.

中文简介正在准备中。当前显示英语简介。

  • Add a cover and supporting images to an article
  • Generate concept art for a long-form post
  • Upload images and insert Markdown links
alchaincyf/huashu-skills19752026年10月19日 更新

查看 alchaincyf 的全部技能

报告此技能的问题