Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

swarm

БесплатноЗапускает вложенные скриптыНе проверен

Autonomous multi-agent workflow system for complex coding tasks. Use when the user requests non-trivial changes that would benefit from autonomous execution…

nbashawот nbashaw★ 41 звезда на GitHub20 установок в других каталогах

Об этом скилле

Swarm: Autonomous Multi-Agent Workflows

Execute complex coding tasks autonomously using multiple agents working from a coordinated plan.

How It Works

  1. Interview — Gather requirements and context from user
  2. Plan — Create structured markdown plan with checkboxes and review gates
  3. Execute — Spawn autonomous agents to work on the plan
  4. Complete — Agents signal completion with .done files

Workflow

Step 1: Interview the User

When this skill is invoked, gather the information needed to create an effective plan:

Required information:

  • Goal: What does "done" look like? (Be specific and measurable)
  • Context: What files/directories are involved? Key constraints?
  • Test strategy: What commands verify success? (e.g., npm test, pytest)
  • Plan location: Where should the plan file be created?

Interview questions:

I'll help you set up an autonomous workflow for this task.

To create an effective plan, I need to understand:

1. What's the specific goal? What does "done" look like?
2. What files or directories are involved?
3. What tests or verification commands should agents run?
4. Where should I create the plan file? (e.g., PLAN.md, AUTH_REFACTOR.md)

Ask follow-up questions as needed to clarify scope, constraints, or success criteria.

Step 2: Create the Plan

Use the template at assets/PLAN_TEMPLATE.md as a starting point. Customize it based on the user's requirements.

Plan structure:

  • ## Goal — One sentence defining completion criteria
  • ## Context — Codebase structure, key files, constraints
  • ## Plan — Phases with checkboxes for each step
  • ## Agent Roles — Review gates (Reviewer, Simplifier, Tester, Gatekeeper)
  • ## Rules — Behavioral constraints for agents
  • ## Log — Communication space for agents across iterations

Critical components:

  1. Checkboxes — Every step must be checkable. Avoid prose.

  2. Review Gates — Force perspective shifts at intervals:

    • Reviewer (every 5th iteration): Fresh eyes on progress vs goal
    • Simplifier (before final phase): Identify overengineering
    • Tester (before final phase): Write and run tests
    • Gatekeeper (before .done): Mandatory checklist before completion
  3. Gatekeeper Checklist — Must include:

    • Commands to run with output (npm test, git diff --stat)
    • Explicit yes/no questions with evidence
    • GO/NO-GO decision with reasoning
  4. Log Section — Agents append work here. Format:

    ### Iteration N — YYYY-MM-DD HH:MM
    **Role:** [Worker / Reviewer / Simplifier / Tester / Gatekeeper]
    **What I did:** ...
    **Current state:** ...
    **Next agent should:** ...
    

Write the plan file:

I've created the plan at [FILENAME]. Here's the structure:
- [Summarize the phases]
- [Note key review gates]
- [Highlight gatekeeper checklist]

The agents will work through this autonomously. Ready to start?

Step 3: Execute with Autonomous Agents

Once the plan is written and user approves, run the swarm script.

Execution mechanism: The swarm.sh script spawns headless agent processes in a loop. By default, it uses Codex CLI in full-auto mode (codex exec --full-auto). You can use --claude to switch to Claude CLI. Each iteration runs the agent with the iteration number and plan file path. The plan file serves as shared state between iterations. Agents signal completion by creating a .done file.

Running the swarm:

Use the Bash tool with run_in_background: true to start the swarm:

Bash(run_in_background=true):
./path/to/swarm.sh .context/PLAN.md

This returns a task_id. Tell the user the swarm is starting, then use TaskOutput to wait for completion:

TaskOutput(task_id=<id>, block=true, timeout=600000)

This blocks until the swarm finishes (up to 10 minutes) without burning tokens on polling. The swarm typically completes in 2-10 iterations.

Important: The swarm script uses --full-auto for Codex (or --dangerously-skip-permissions for Claude) for headless agents. This is required for agents to edit files autonomously.

Tell the user:

Starting the swarm. Agents will work autonomously on the plan.

You can monitor progress by watching the plan file:
  tail -f .context/PLAN.md

The swarm will:
- Execute steps and check them off
- Log progress after each iteration
- Run review gates at intervals
- Complete the Gatekeeper checklist before finishing
- Create .done when all criteria are met

I'll let you know when it's complete.

Available flags:

  • --codex: Use Codex CLI in full-auto mode (default)
  • --claude: Use Claude CLI instead of Codex
  • --verbose / -v: Show timing and log section after each iteration
  • --dry-run / -n: Preview what would run without executing
  • --help / -h: Show usage information

Step 4: Report Completion

When TaskOutput returns:

  1. Check if .done file exists (success) or max iterati
Полный SKILL.md на GitHub

Установить swarm в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/PLAN_TEMPLATE.mdassets/swarm.shassets/test_swarm.shcommands/init.md

FAQ

Что делает скилл swarm?

Autonomous multi-agent workflow system for complex coding tasks. Use when the user requests non-trivial changes that would benefit from autonomous execution with built-in review gates. Ideal for refactoring modules, adding major features, migrating codebases, adding comprehensive test coverage, or any multi-step development task that can run autonomously. NOT for simple fixes, typos, or single-file changes.

Как установить скилл swarm?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл swarm запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить swarm с