Skip to content

alchaincyf/huashu-skills / huashu-agent-swarm

huashu-agent-swarm

Verified

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

FileKindSize
SKILL.mdskill md3.6 KB
references/agent-prompt-template.mdmarkdown4.1 KB
references/carlini-lessons.mdmarkdown3.3 KB
scripts/agent_loop.shexecutablescript2.8 KB
scripts/dashboard.pyexecutablescript20.6 KB
scripts/send_input.shexecutablescript1.0 KB
scripts/setup_project.shexecutablescript2.7 KB
scripts/start_swarm.shexecutablescript3.3 KB
scripts/status.shexecutablescript2.7 KB
scripts/stop_swarm.shexecutablescript2.3 KB

scripts/status.sh

View on GitHub
#!/bin/bash
# status.sh - 查看蜂群状态
# 用法: bash status.sh [项目目录]

PROJECT_DIR="${1:-.}"
PROJECT_DIR="$(cd "$PROJECT_DIR" && pwd)"
PROJECT_NAME="$(basename "$PROJECT_DIR")"
SESSION="swarm-${PROJECT_NAME}"

echo "=== 蜂群状态: $PROJECT_NAME ==="
echo ""

# ===== tmux状态 =====
echo "--- tmux session ---"
if tmux has-session -t "$SESSION" 2>/dev/null; then
    PANE_COUNT=$(tmux list-panes -t "$SESSION" 2>/dev/null | wc -l | tr -d ' ')
    echo "运行中: $SESSION ($PANE_COUNT 个agent)"
else
    echo "未运行"
fi
echo ""

# ===== worktree状态 =====
echo "--- Worktrees ---"
WORKTREE_COUNT=0
for dir in "${PROJECT_DIR}"-agent-*; do
    if [ -d "$dir" ]; then
        WORKTREE_COUNT=$((WORKTREE_COUNT + 1))
        AGENT_NUM=$(echo "$dir" | grep -o '[0-9]*$')
        LAST_COMMIT=$(git -C "$dir" log --oneline -1 2>/dev/null || echo "无提交")
        echo "  Agent-${AGENT_NUM}: $LAST_COMMIT"
    fi
done
[ "$WORKTREE_COUNT" -eq 0 ] && echo "  无(蜂群未启动或已清理)"
echo ""

# ===== 当前任务认领 =====
echo "--- 当前任务认领 ---"
LOCK_COUNT=0
for lock in "$PROJECT_DIR/current_tasks/"*.lock; do
    [ -f "$lock" ] || continue
    LOCK_COUNT=$((LOCK_COUNT + 1))
    TASK_NAME=$(basename "$lock" .lock)
    OWNER=$(cat "$lock" 2>/dev/null || echo "unknown")
    echo "  $TASK_NAME → $OWNER"
done
[ "$LOCK_COUNT" -eq 0 ] && echo "  无(没有进行中的任务)"
echo ""

# ===== 最近提交 =====
echo "--- 最近20条提交 ---"
git -C "$PROJECT_DIR" log --oneline --all -20 2>/dev/null || echo "  无提交记录"
echo ""

# ===== TASKS.md概要 =====
echo "--- 任务清单 (TASKS.md) ---"
if [ -f "$PROJECT_DIR/TASKS.md" ]; then
    # 统计任务状态
    TOTAL=$(grep -c '^\- \[' "$PROJECT_DIR/TASKS.md" 2>/dev/null || echo "0")
    DONE=$(grep -c '^\- \[x\]' "$PROJECT_DIR/TASKS.md" 2>/dev/null || echo "0")
    IN_PROGRESS=$(grep -c '^\- \[\~\]' "$PROJECT_DIR/TASKS.md" 2>/dev/null || echo "0")
    TODO=$((TOTAL - DONE - IN_PROGRESS))
    echo "  总计: $TOTAL | 完成: $DONE | 进行中: $IN_PROGRESS | 待做: $TODO"
    echo ""
    cat "$PROJECT_DIR/TASKS.md"
else
    echo "  TASKS.md 不存在"
fi
echo ""

# ===== 日志摘要 =====
echo "--- 最近日志 ---"
if [ -d "$PROJECT_DIR/agent_logs" ]; then
    LATEST_LOG=$(ls -t "$PROJECT_DIR/agent_logs/"*.log 2>/dev/null | head -1)
    if [ -n "$LATEST_LOG" ]; then
        LOG_COUNT=$(ls "$PROJECT_DIR/agent_logs/"*.log 2>/dev/null | wc -l | tr -d ' ')
        echo "  共 $LOG_COUNT 个日志文件"
        echo "  最新: $(basename "$LATEST_LOG")"
        echo "  最后几行:"
        tail -5 "$LATEST_LOG" 2>/dev/null | sed 's/^/    /'
    else
        echo "  暂无日志"
    fi
else
    echo "  日志目录不存在"
fi
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: 472kUpdated Claude CodeCodexVerifiedInstall
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: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated Claude CodeCodexVerifiedInstall
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 availableStars: 323kUpdated Claude CodeCodexVerifiedInstall