agents/skills/swarm/SKILL.md
Conductor-native multi-agent orchestration with real-time progress. Use for parallel agent swarm, multi-agent tasks, agent team, team coordination, parallel workers.
npx skillsauth add drn/dots swarmInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Agent teams with automatic progress monitoring. The lead thread stays alive, polls task status, and reports progress -- you never have to re-prompt to check in.
When team-based skills (/dev, /explore, /debug, /contest) run in Conductor, the lead creates the team, sends initial assignments, and its turn ends. Agents work in the background, but the workspace appears idle. You have to manually re-prompt to check status.
This skill uses native agent teams (TeamCreate + SendMessage) for full inter-agent communication, then adds an automatic monitoring loop that polls TaskList every 20 seconds and outputs progress. The lead thread never returns until all tasks are complete.
$ARGUMENTS - Required: description of the task. Can be any kind of parallel work: development, research, debugging, review, etc.If no arguments are provided, ask the user what they want to accomplish.
git branch --show-current 2>/dev/null | head -1git status --short 2>/dev/null | head -20pwdfind . -maxdepth 1 \( -name go.mod -o -name Gemfile -o -name package.json -o -name Cargo.toml -o -name pyproject.toml -o -name setup.py -o -name requirements.txt \) 2>/dev/null | head -5git log --oneline -5 2>/dev/null | head -5find . -maxdepth 2 -type d -not -path '*/\.*' -not -path '*/node_modules/*' -not -path '*/vendor/*' 2>/dev/null | head -30You are the swarm coordinator. You create an agent team, assign work, then actively monitor progress in a polling loop -- keeping the main thread alive and reporting status in real time.
Task: $ARGUMENTS
You coordinate, monitor, and synthesize. Agents do the work and communicate with each other.
How the monitoring loop works:
TeamCreate, spawn agents, send initial assignments via SendMessageTaskCreate so agents can track progress via TaskUpdateBash("sleep 20") to block the thread (keeps it alive in Conductor)TaskList() to check current task statusescompletedAgents communicate freely via SendMessage during the work phase. The lead does not participate in agent-to-agent communication -- it monitors via TaskList.
Parse the task. Identify the type of work and what parallel structure makes sense:
| Task Type | Parallel Structure | |-----------|-------------------| | Development | Implementer + reviewer + tester. Reviewer validates plan, then parallel test + review after implementation. | | Research | N researchers on different angles. Peer challenge phase after initial findings. | | Debugging | N investigators pursuing different hypotheses. Converge, then fix + verify. | | Review | N independent reviewers. Synthesize disagreements. | | Custom | Decompose into independent parallel units. |
Explore the codebase briefly. Read key files related to the task. Understand context before planning.
Present the plan to the user:
## Swarm Plan
**Task:** {summary}
**Agents:**
| # | Name | Role | Assignment |
|---|------|------|-----------|
| 1 | {name} | {role} | {description} |
| 2 | {name} | {role} | {description} |
| 3 | {name} | {role} | {description} |
**Phases:**
1. {phase name} -- {which agents, what they do}
2. {phase name} -- {which agents, what they do}
**Deliverable:** {what the final output looks like}
Wait for user approval. Revise if requested. Do NOT create the team until approved.
Clean up any stale team:
TeamDelete() -- ignore errors if no existing team
Create the team:
TeamCreate(team_name: "swarm-session", description: "{brief task summary}")
Create tasks with TaskCreate for every work item. Set activeForm to present-continuous (e.g., "Implementing auth module"). Set up addBlockedBy for dependencies between phases.
Spawn all agents in a single message with parallel Agent tool calls. Each agent gets:
team_name: "swarm-session"subagent_type matching their roleSend initial assignments to each agent via SendMessage:
TaskUpdate as they progressOutput launch status:
## Team launched -- {N} agents
| # | Agent | Role | Task |
|---|-------|------|------|
| 1 | {name} | {role} | {assignment} |
| 2 | {name} | {role} | {assignment} |
| 3 | {name} | {role} | {assignment} |
Entering monitoring loop...
This is the critical section that keeps the main thread alive in Conductor.
Initialize tracking state:
poll_count = 0
max_polls = 90 # 90 polls x 20s = 30 minutes max
last_task_states = {} # task_id -> status mapping from last check
Loop:
Block the thread: Bash("sleep 20") -- this keeps the lead alive in Conductor. 20 seconds balances responsiveness with overhead.
Check task progress: Call TaskList() to get current statuses.
Detect changes: Compare current statuses against last_task_states. For each task that changed status since last check, note the change.
Output progress update (only when something changed OR every 5th poll as a heartbeat):
If changes detected:
### Progress update ({elapsed time})
| Task | Status | Changed |
|------|--------|---------|
| {task subject} | completed | NEW |
| {task subject} | in_progress | -- |
| {task subject} | pending | -- |
**{completed_count}/{total_count}** tasks complete
If no changes (heartbeat every 5th poll):
Still working... {completed_count}/{total_count} tasks complete ({elapsed time})
Check exit conditions:
IF all tasks are completed:
→ Break out of loop, proceed to Phase 3
IF poll_count >= max_polls (30 minutes elapsed):
→ Output warning: "Monitoring timeout reached (30 min). {N} tasks still incomplete."
→ Break out of loop, proceed to Phase 3 with partial results
IF no task has changed status in 10 consecutive polls (>3 minutes of no progress):
→ Output warning: "No progress detected for 3+ minutes. Agents may be stuck."
→ Continue monitoring (do not break -- agents may be doing long work)
Increment: poll_count += 1, update last_task_states, continue loop.
After exiting the monitoring loop:
Process any queued messages. Agent messages that arrived during the monitoring loop will auto-deliver now that the lead's turn is ending/restarting. Read and incorporate them.
Gather results. For each completed task, the agent should have reported findings via messages or task metadata. Read through all available context.
If multi-phase work remains (e.g., Wave 1 done, Wave 2 needed):
SendMessageProduce the final report:
## Swarm Complete
### Task
{original task description}
### Summary
{3-5 sentence executive summary of what was accomplished}
### Agent Contributions
| Agent | Role | Key Contribution |
|-------|------|-----------------|
| {name} | {role} | {1-line summary} |
| {name} | {role} | {1-line summary} |
| {name} | {role} | {1-line summary} |
### Detailed Results
{Organized by TOPIC, not by agent. Cross-reference findings from multiple agents where they overlap.}
### Changes Made
{If development: table of files created/modified/deleted with git diff --stat}
{If research: key discoveries organized by theme}
{If debugging: root cause analysis and fix}
### Open Items
{Unresolved issues, follow-up suggestions, or "None -- all clear."}
### Execution
- Agents: {N}
- Phases: {N}
- Monitoring duration: {elapsed time}
- Tasks completed: {N}/{total}
Shut down all agents:
For each agent:
SendMessage(type: "shutdown_request", recipient: {name}, content: "Work complete.")
Wait for confirmations.
Clean up: TeamDelete()
When spawning agents, use this as the base prompt (customize per role):
You are {ROLE_NAME} on a swarm team. You {role description}.
YOUR TEAMMATES:
- Lead (swarm coordinator): monitors progress, does NOT participate in work. Sends you assignments and phase transitions.
{- Other agent: {name} -- {role}. Message them directly when you need {what}.}
WORKFLOW:
1. You will receive an assignment from the lead via message.
2. Work on your assignment. Use TaskUpdate to mark your task in_progress when you start and completed when you finish.
3. Message other teammates directly when collaboration is needed.
4. When done, message the lead with your results summary.
TASK TRACKING (critical for progress monitoring):
- Call TaskUpdate(status: "in_progress") when you BEGIN work on a task.
- Call TaskUpdate(status: "completed") when you FINISH.
- The lead monitors via TaskList -- keeping tasks current is how progress gets reported.
Always use TaskUpdate to mark tasks as you work.
For code-writing agents, add:
CODING RULES:
- Follow existing codebase conventions.
- Run tests/linter before reporting done.
- If writing tests, create NEW test files rather than modifying existing ones (avoids conflicts with implementer).
Agents: implementer, tester, reviewer
Phase 1 (plan + implement):
Phase 2 (validate):
Phase 3 (fix -- if needed):
Agents: 3-4 researchers
Phase 1 (investigate): Each researcher explores a different angle.
Phase 2 (peer challenge): Researchers read each other's findings (relayed by lead) and challenge/confirm them.
Agents: 3 investigators
Phase 1 (hypothesize): Each investigator pursues a different theory, messages others to debate.
Phase 2 (fix + verify): One investigator fixes, another verifies.
Agents: 3 independent reviewers
Single phase: All review the same changes independently. Lead cross-references findings. No Phase 2 needed.
| Failure | Action | |---------|--------| | Agent fails to spawn | Retry once. Proceed with fewer agents. Note in summary. | | No progress for 3+ minutes | Output warning but continue. Agents may be doing deep work. | | 30-minute monitoring timeout | Break loop. Produce partial summary with remaining tasks listed. | | Agent unresponsive to shutdown | Proceed with TeamDelete regardless. | | All tasks stuck | After 10 minutes with zero completions, ask the user if they want to continue waiting or abort. | | Team creation fails | Fall back to sequential work -- do the task directly without agents. |
development
Walk every unresolved review thread on a PR, triage each one, reply with a rationale of whether or not the comment will be acted upon, make the code change if warranted, and mark the thread resolved. Use when the user asks to address only the open PR comments without re-running CI, respond to review feedback, resolve review threads, or clear bot comments on a PR.
tools
Iteratively run /rereview, fix the findings, and loop until reviewers approve clean. Use for iterative automated review, when you want /rereview to loop until clean, or for a paranoid pre-merge review that auto-addresses every blocker.
development
Generate self-contained HTML visualizations with Plannotator theming. Use for implementation plans, PR explainers, architecture diagrams, data tables, slide decks, and any visual explanation of technical concepts. Plans and PR explainers follow Plannotator's prescriptive approach; all other visual content delegates to nicobailon/visual-explainer.
development
Create reviewed Codex goal setup packages for long-running /goal work. Use when the user wants to turn an idea, backlog, project mission, or vague objective into durable goal files under a project goals slug folder, with Plannotator review gates for brief, narrative plan with acceptance criteria, verification, blockers, and the final /goal prompt.