alchaincyf/huashu-skills / huashu-agent-swarm
huashu-agent-swarm
Verified多Agent蜂群并行协作,纯git自组织,适合大型项目开发。当用户提到"蜂群模式"、"多agent"、"并行开发"、"agent swarm"时使用。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.6 KB |
| references/agent-prompt-template.md | markdown | 4.1 KB |
| references/carlini-lessons.md | markdown | 3.3 KB |
| scripts/agent_loop.shexecutable | script | 2.8 KB |
| scripts/dashboard.pyexecutable | script | 20.6 KB |
| scripts/send_input.shexecutable | script | 1.0 KB |
| scripts/setup_project.shexecutable | script | 2.7 KB |
| scripts/start_swarm.shexecutable | script | 3.3 KB |
| scripts/status.shexecutable | script | 2.7 KB |
| scripts/stop_swarm.shexecutable | script | 2.3 KB |
scripts/setup_project.sh
View on GitHub#!/bin/bash
# setup_project.sh - 初始化项目结构,为蜂群模式做准备
# 用法: bash setup_project.sh <项目目录>
set -e
PROJECT_DIR="${1:-.}"
PROJECT_DIR="$(cd "$PROJECT_DIR" && pwd)"
SKILL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
echo "=== 初始化蜂群项目: $PROJECT_DIR ==="
# 检查是否是git仓库
if [ ! -d "$PROJECT_DIR/.git" ]; then
echo "初始化git仓库..."
git -C "$PROJECT_DIR" init
git -C "$PROJECT_DIR" add -A
git -C "$PROJECT_DIR" commit -m "Initial commit" --allow-empty
fi
# 确保有main分支
CURRENT_BRANCH=$(git -C "$PROJECT_DIR" branch --show-current)
if [ "$CURRENT_BRANCH" != "main" ]; then
# 检查是否存在main分支
if git -C "$PROJECT_DIR" show-ref --verify --quiet refs/heads/main 2>/dev/null; then
echo "注意: 当前在 $CURRENT_BRANCH 分支,main分支已存在"
else
echo "创建main分支..."
git -C "$PROJECT_DIR" branch -M main
fi
fi
# 创建目录结构
mkdir -p "$PROJECT_DIR/current_tasks"
mkdir -p "$PROJECT_DIR/agent_logs"
# 创建.gitkeep
touch "$PROJECT_DIR/current_tasks/.gitkeep"
# agent_logs加入gitignore
if [ ! -f "$PROJECT_DIR/.gitignore" ]; then
echo "agent_logs/" > "$PROJECT_DIR/.gitignore"
else
if ! grep -q "agent_logs/" "$PROJECT_DIR/.gitignore" 2>/dev/null; then
echo "agent_logs/" >> "$PROJECT_DIR/.gitignore"
fi
fi
# 复制AGENT_PROMPT模板(如果不存在)
if [ ! -f "$PROJECT_DIR/AGENT_PROMPT.md" ]; then
cp "$SKILL_DIR/references/agent-prompt-template.md" "$PROJECT_DIR/AGENT_PROMPT.md"
echo "已创建 AGENT_PROMPT.md(模板),请根据项目需求定制内容"
fi
# 创建HUMAN_INPUT.md(人类指令通道)
if [ ! -f "$PROJECT_DIR/HUMAN_INPUT.md" ]; then
touch "$PROJECT_DIR/HUMAN_INPUT.md"
echo "已创建 HUMAN_INPUT.md(人类指令通道)"
fi
# 创建初始TASKS.md(如果不存在)
if [ ! -f "$PROJECT_DIR/TASKS.md" ]; then
cat > "$PROJECT_DIR/TASKS.md" << 'EOF'
# 任务清单
## 状态说明
- [ ] 待完成
- [x] 已完成
- [~] 进行中(查看 current_tasks/ 目录确认谁在做)
## 任务列表
<!-- Agent会自行维护这个列表 -->
<!-- 在这里添加初始任务 -->
EOF
echo "已创建 TASKS.md,请添加初始任务"
fi
# 提交初始结构
cd "$PROJECT_DIR"
git add -A
git diff --cached --quiet || git commit -m "Setup swarm project structure
- Added current_tasks/ for task claiming
- Added agent_logs/ (gitignored)
- Added AGENT_PROMPT.md template
- Added TASKS.md"
echo ""
echo "=== 初始化完成 ==="
echo ""
echo "下一步:"
echo "1. 编辑 AGENT_PROMPT.md - 填入项目目标、代码规范、测试命令"
echo "2. 编辑 TASKS.md - 添加初始任务"
echo "3. 运行 start_swarm.sh 启动蜂群"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |