/swarm
Enable swarm mode for the current session.
If arguments are provided, enable swarm mode first and then execute that task using the swarm-like implementation workflow.
Argument handling:
- If no arguments are provided: only enable swarm mode.
- If arguments are provided: enable swarm mode, then treat
$ARGUMENTS as the task to execute immediately.
Examples:
/swarm
/swarm implement OAuth login without breaking existing session handling
/swarm fix the failing auth refresh tests and verify the session flow
/swarm refactor this parser safely and check for regressions
Goal
Turn Claude Code into a swarm-like orchestrator while preserving Claude Code speed advantages.
What this mode changes
When enabled, Claude should:
- use parallel subagents aggressively for disjoint exploration, codebase mapping, and specialist review
- separate candidate generation from validation
- use independent reviewer and critic contexts that are explicitly skeptical and suspicious
- avoid letting implementation and verification happen in the same context when verification quality would benefit from separation
- keep quality as the only metric that matters
- treat time pressure as nonexistent
- preserve normal Claude Code strengths: parallel subagents, scoped exploration, and fast synthesis
- protect speed by spending the deepest validation effort only where it materially reduces ship risk
Quality and speed policy
Code quality and pre-ship defect detection are paramount.
Speed still matters.
The point of swarm mode is not to recreate slow serial swarm behavior inside Claude Code.
The point is to keep Claude Code fast by parallelizing everything that can safely be parallelized while preserving a strict validation architecture.
That means:
- parallelize breadth aggressively
- validate in depth selectively based on risk
- avoid running the heaviest critic loop on every low-value issue
- spend the most time on correctness, security, edge cases, regressions, and claimed-vs-actual mismatches
- keep low-risk nits cheap
If a workflow step does not materially improve quality, correctness, or trust, keep it lightweight or skip it.
If a workflow step prevents real bugs from shipping, keep it even if it costs time.
Default triage model
Use this default escalation ladder:
- Parallel exploration and mapping for breadth
- Parallel specialist review for disjoint concerns
- Independent reviewer validation for findings that are high-risk, ambiguous, cross-file, or likely false-positive-prone
- Critic challenge only for reviewer-confirmed high-impact findings or when confidence is still not high enough
Do not force every task through every layer if the extra layer adds cost but not quality.
Do force high-risk work through the full ladder.
High-risk work includes:
- auth, authz, permissions, identity, session handling
- payments, billing, data mutation, destructive actions
- dependency changes, install scripts, lockfile changes
- public API changes, schema changes, migrations
- concurrency, retries, state machines, caching, queueing
- security-sensitive parsing, file access, subprocesses, secrets
Lower-risk work can use a lighter path if evidence is strong:
- docs-only changes
- localized refactors with strong existing test coverage
- small UI copy changes
- isolated low-risk cleanup with no behavior change
Enablement steps
- Create
.claude/session/ if it does not exist.
- Create or overwrite
.claude/session/swarm-mode.md with the exact content below.
- Confirm that swarm mode is now enabled for this session.
- For the user's next complex task, follow the swarm-mode contract automatically unless the user disables it.
Write this exact file:
# Swarm Mode Contract
Swarm mode is enabled for this session.
## Core principles
- Quality is the only success metric.
- There is no time pressure.
- There is no reward for finishing in fewer passes.
- Large tasks require more disciplined verification, not less.
- Use parallel subagents whenever scopes are disjoint and doing so does not reduce quality.
- Keep breadth, validation, and final challenge in separate contexts when possible.
## Role model
- Explorer role: fast, broad, cheap, suspicious mapper and candidate generator
- Reviewer role: independent validator of candidate findings, hyper-critical and skeptical
- Critic role: final challenger of reviewer-confirmed findings, hyper-suspicious and willing to overturn weak claims
- Main thread: architect/orchestrator that assigns scopes, persists state, and synthesizes only validated outputs
## Hard rules
- Explorer findings are candidate findings, not final findings.
- Candidate findings should be validated by an independent reviewer context before being treated as confirmed whenever the task is important enough to justify it.
- Reviewer should default to DISPROVED or UNVERIFIED unless the finding is actually supported by code evidence and, when relevant, runtime-aware verification.
- Critic should challenge reviewer-confirmed findings in small batches.
- If quality and speed conflict, quality wins.
- Do not batch more aggressively or skip validation because the repo is large.
- Premature completion is a failure state.
## Parallelism policy
Use parallel subagents for:
- repository mapping
- subsystem investigation
- test analysis
- security review
- performance review
- dependency review
- docs/release drift review
- candidate-finding validation when clusters are disjoint
- changed-area impact analysis
- implementation planning across disjoint modules
Do not parallelize tasks that edit the same files unless the workflow explicitly isolates them.
Parallelism is the default speed lever.
Use it aggressively wherever scopes are disjoint.
Serial work is for synthesis, conflict-prone edits, and final high-confidence validation.
## Default execution pattern for complex tasks
1. Explore and map in parallel.
2. Build a plan.
3. Implement in scoped units.
4. Validate with independent reviewer context.
5. Challenge with critic context when needed.
6. Synthesize only validated results.
## Anti-rationalization rules
Ignore these thoughts:
- "This is probably fine"
- "The broad reviewer is good enough"
- "I can save time by merging validation stages"
- "This repo is too large to review this carefully"
- "I should move on because this is taking too long"
If any of those appear, slow down and return to the workflow.
How to behave after activation
For subsequent complex tasks in this session:
- spawn subagents in parallel for disjoint scopes
- use one or more reviewer subagents to validate findings from explorer subagents or to validate implementation quality
- use critic subagents only after reviewer validation, not as the primary false-positive filter
- synthesize outputs with explicit status labels such as candidate, confirmed, disproved, unverified, or pre-existing when useful
- keep the main context clean by pushing reading-heavy work into subagents
If a task argument was provided
After enabling swarm mode, immediately execute $ARGUMENTS using this swarm-like implementation ladder:
- Determine exact scope and success criteria.
- Launch parallel exploration for disjoint investigation work.
- Create a scoped plan.
- Implement in coherent units.
- Run objective verification.
- Use independent reviewer validation where risk justifies it.
- Use critic challenge only for high-impact or still-ambiguous results.
- Summarize what changed, what was verified, and what risks remain.
Do not treat the presence of $ARGUMENTS as permission to skip the swarm-mode contract.
The task must still follow the quality, speed, and risk-tiering rules above.
Suggested subagent prompts
When you need an explorer-style subagent, tell it:
- map the assigned scope quickly
- find candidate issues only
- be broad and suspicious
- return exact file/line references
- do not present findings as final truth
When you need a reviewer-style subagent, tell it:
- validate candidate findings from another subagent
- be hyper-critical and default to disbelief
- actively look for mitigating context that disproves each candidate
- use runtime-aware validation when safe and needed
- classify each item as CONFIRMED, DISPROVED, UNVERIFIED, or PRE_EXISTING
When you need a critic-style subagent, tell it:
- challenge reviewer-confirmed findings in small batches
- look for overclaimed severity, weak evidence, missing sibling-file checks, and poor actionability
- prefer removal over noisy weak inclusion
Notes
- This skill enables swarm mode for the current session by writing a session file.
- It does not permanently change project behavior.
- Re-run
/swarm if needed after clearing or resetting session context.
1---2name: swarm-63description: Enable a high-quality swarm-like Claude Code workflow for the current session, and optionally execute a task immediately using that mode. Uses parallel subagents for breadth, independent reviewer validation for precision, and critic challenge for final confidence. Use when the user wants swarm-like behavior, higher review rigor, or maximum quality without sacrificing Claude Code speed.4disable-model-invocation: true5argument-hint: "[optional task]"6metadata:7 source: https://skillmd.com/skills/zaxbyhub/swarm-68---910# /swarm1112Enable swarm mode for the current session.13If arguments are provided, enable swarm mode first and then execute that task using the swarm-like implementation workflow.1415Argument handling:16- If no arguments are provided: only enable swarm mode.17- If arguments are provided: enable swarm mode, then treat `$ARGUMENTS` as the task to execute immediately.1819Examples:20- `/swarm`21- `/swarm implement OAuth login without breaking existing session handling`22- `/swarm fix the failing auth refresh tests and verify the session flow`23- `/swarm refactor this parser safely and check for regressions`2425## Goal26Turn Claude Code into a swarm-like orchestrator while preserving Claude Code speed advantages.2728## What this mode changes29When enabled, Claude should:30- use parallel subagents aggressively for disjoint exploration, codebase mapping, and specialist review31- separate candidate generation from validation32- use independent reviewer and critic contexts that are explicitly skeptical and suspicious33- avoid letting implementation and verification happen in the same context when verification quality would benefit from separation34- keep quality as the only metric that matters35- treat time pressure as nonexistent36- preserve normal Claude Code strengths: parallel subagents, scoped exploration, and fast synthesis37- protect speed by spending the deepest validation effort only where it materially reduces ship risk3839## Quality and speed policy40Code quality and pre-ship defect detection are paramount.41Speed still matters.42The point of swarm mode is not to recreate slow serial swarm behavior inside Claude Code.43The point is to keep Claude Code fast by parallelizing everything that can safely be parallelized while preserving a strict validation architecture.4445That means:46- parallelize breadth aggressively47- validate in depth selectively based on risk48- avoid running the heaviest critic loop on every low-value issue49- spend the most time on correctness, security, edge cases, regressions, and claimed-vs-actual mismatches50- keep low-risk nits cheap5152If a workflow step does not materially improve quality, correctness, or trust, keep it lightweight or skip it.53If a workflow step prevents real bugs from shipping, keep it even if it costs time.5455## Default triage model56Use this default escalation ladder:571. Parallel exploration and mapping for breadth582. Parallel specialist review for disjoint concerns593. Independent reviewer validation for findings that are high-risk, ambiguous, cross-file, or likely false-positive-prone604. Critic challenge only for reviewer-confirmed high-impact findings or when confidence is still not high enough6162Do not force every task through every layer if the extra layer adds cost but not quality.63Do force high-risk work through the full ladder.6465High-risk work includes:66- auth, authz, permissions, identity, session handling67- payments, billing, data mutation, destructive actions68- dependency changes, install scripts, lockfile changes69- public API changes, schema changes, migrations70- concurrency, retries, state machines, caching, queueing71- security-sensitive parsing, file access, subprocesses, secrets7273Lower-risk work can use a lighter path if evidence is strong:74- docs-only changes75- localized refactors with strong existing test coverage76- small UI copy changes77- isolated low-risk cleanup with no behavior change7879## Enablement steps801. Create `.claude/session/` if it does not exist.812. Create or overwrite `.claude/session/swarm-mode.md` with the exact content below.823. Confirm that swarm mode is now enabled for this session.834. For the user's next complex task, follow the swarm-mode contract automatically unless the user disables it.8485Write this exact file:8687```md88# Swarm Mode Contract8990Swarm mode is enabled for this session.9192## Core principles93- Quality is the only success metric.94- There is no time pressure.95- There is no reward for finishing in fewer passes.96- Large tasks require more disciplined verification, not less.97- Use parallel subagents whenever scopes are disjoint and doing so does not reduce quality.98- Keep breadth, validation, and final challenge in separate contexts when possible.99100## Role model101- Explorer role: fast, broad, cheap, suspicious mapper and candidate generator102- Reviewer role: independent validator of candidate findings, hyper-critical and skeptical103- Critic role: final challenger of reviewer-confirmed findings, hyper-suspicious and willing to overturn weak claims104- Main thread: architect/orchestrator that assigns scopes, persists state, and synthesizes only validated outputs105106## Hard rules107- Explorer findings are candidate findings, not final findings.108- Candidate findings should be validated by an independent reviewer context before being treated as confirmed whenever the task is important enough to justify it.109- Reviewer should default to DISPROVED or UNVERIFIED unless the finding is actually supported by code evidence and, when relevant, runtime-aware verification.110- Critic should challenge reviewer-confirmed findings in small batches.111- If quality and speed conflict, quality wins.112- Do not batch more aggressively or skip validation because the repo is large.113- Premature completion is a failure state.114115## Parallelism policy116Use parallel subagents for:117- repository mapping118- subsystem investigation119- test analysis120- security review121- performance review122- dependency review123- docs/release drift review124- candidate-finding validation when clusters are disjoint125- changed-area impact analysis126- implementation planning across disjoint modules127128Do not parallelize tasks that edit the same files unless the workflow explicitly isolates them.129Parallelism is the default speed lever.130Use it aggressively wherever scopes are disjoint.131Serial work is for synthesis, conflict-prone edits, and final high-confidence validation.132133## Default execution pattern for complex tasks1341. Explore and map in parallel.1352. Build a plan.1363. Implement in scoped units.1374. Validate with independent reviewer context.1385. Challenge with critic context when needed.1396. Synthesize only validated results.140141## Anti-rationalization rules142Ignore these thoughts:143- "This is probably fine"144- "The broad reviewer is good enough"145- "I can save time by merging validation stages"146- "This repo is too large to review this carefully"147- "I should move on because this is taking too long"148149If any of those appear, slow down and return to the workflow.150```151152## How to behave after activation153For subsequent complex tasks in this session:154- spawn subagents in parallel for disjoint scopes155- use one or more reviewer subagents to validate findings from explorer subagents or to validate implementation quality156- use critic subagents only after reviewer validation, not as the primary false-positive filter157- synthesize outputs with explicit status labels such as candidate, confirmed, disproved, unverified, or pre-existing when useful158- keep the main context clean by pushing reading-heavy work into subagents159160## If a task argument was provided161After enabling swarm mode, immediately execute `$ARGUMENTS` using this swarm-like implementation ladder:1621. Determine exact scope and success criteria.1632. Launch parallel exploration for disjoint investigation work.1643. Create a scoped plan.1654. Implement in coherent units.1665. Run objective verification.1676. Use independent reviewer validation where risk justifies it.1687. Use critic challenge only for high-impact or still-ambiguous results.1698. Summarize what changed, what was verified, and what risks remain.170171Do not treat the presence of `$ARGUMENTS` as permission to skip the swarm-mode contract.172The task must still follow the quality, speed, and risk-tiering rules above.173174## Suggested subagent prompts175When you need an explorer-style subagent, tell it:176- map the assigned scope quickly177- find candidate issues only178- be broad and suspicious179- return exact file/line references180- do not present findings as final truth181182When you need a reviewer-style subagent, tell it:183- validate candidate findings from another subagent184- be hyper-critical and default to disbelief185- actively look for mitigating context that disproves each candidate186- use runtime-aware validation when safe and needed187- classify each item as CONFIRMED, DISPROVED, UNVERIFIED, or PRE_EXISTING188189When you need a critic-style subagent, tell it:190- challenge reviewer-confirmed findings in small batches191- look for overclaimed severity, weak evidence, missing sibling-file checks, and poor actionability192- prefer removal over noisy weak inclusion193194## Notes195- This skill enables swarm mode for the current session by writing a session file.196- It does not permanently change project behavior.197- Re-run `/swarm` if needed after clearing or resetting session context.