본문으로 건너뛰기
cccskills
무료GitHub에 공개

swarm-coordination

Multi-agent swarm coordination patterns. Orchestrates parallel agent execution, manages agent communication, handles task distribution, and coordinates results aggregation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(10)

  • SKILL.md7.9 KB
  • commands/swarm-coordination.md118 B
  • hooks/post-execute.cjs314 B
  • hooks/pre-execute.cjs431 B
  • references/research-requirements.md459 B
  • rules/swarm-coordination.md442 B
  • schemas/input.schema.json645 B
  • schemas/output.schema.json262 B
  • scripts/main.cjs1.2 KB
  • templates/implementation-template.md192 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Swarm Coordination Skill

<identity> Swarm Coordination Skill - Orchestrates parallel agent execution, manages inter-agent communication, handles task distribution, and coordinates results aggregation for complex multi-agent workflows. </identity> <capabilities> - Parallel agent spawning - Task distribution strategies - Results aggregation - Inter-agent communication - Failure handling and recovery </capabilities> <instructions> <execution_process>

Step 1: Analyze Task for Parallelization

Identify parallelizable work:

PatternExampleStrategy
Independent tasksReview multiple filesSpawn in parallel
Dependent tasksDesign → ImplementSequential spawn
Fan-out/Fan-inMultiple reviews → ConsolidateParallel + Aggregation
PipelineParse → Transform → ValidateSequential handoff

Step 2: Spawn Agents in Parallel

Use the Task tool to spawn multiple agents in a single message:

// Spawn multiple agents in ONE message for parallel execution
Task({
  task_id: 'task-1',
  subagent_type: 'general-purpose',
  description: 'Architect reviewing design',
  prompt: 'Review architecture...',
});

Task({
  task_id: 'task-2',
  subagent_type: 'general-purpose',
  description: 'Security reviewing design',
  prompt: 'Review security...',
});

Key: Both Task calls must be in the SAME message for true parallelism.

Step 3: Define Handoff Format

Use structured formats for agent communication:

## Agent Handoff: [Source] → [Target]

### Context

- Task: [What was done]
- Files: [Files touched]

### Findings

- [Key finding 1]
- [Key finding 2]

### Recommendations

- [Action item 1]
- [Action item 2]

### Artifacts

- [Path to artifact 1]
- [Path to artifact 2]

Step 4: Aggregate Results

Combine outputs from parallel agents:

## Swarm Results Aggregation

### Participating Agents

- Architect: Completed ✅
- Security: Completed ✅
- DevOps: Completed ✅

### Consensus Points

- [Point all agents agree on]

### Conflicts

- [Point agents disagree on]
- Resolution: [How to resolve]

### Combined Recommendations

1. [Prioritized recommendation]
2. [Prioritized recommendation]

Step 5: Handle Failures

Strategies for partial failures:

ScenarioStrategy
Agent timeoutRetry with simpler prompt
Agent errorContinue with available results
Conflicting resultsUse consensus-voting skill
Missing critical resultBlock and retry

</execution_process>

<best_practices>

  1. Parallelize Aggressively: Independent work should run in parallel
  2. Structured Handoffs: Use consistent formats for communication
  3. Graceful Degradation: Continue with partial results when safe
  4. Clear Aggregation: Combine results systematically
  5. Track Provenance: Know which agent produced each result

</best_practices> </instructions>

<examples> <usage_example> **Parallel Review Request**:
Get architecture, security, and performance reviews for the new API design

Swarm Coordination:

// Spawn 3 reviewers in parallel (single message)
Task({ task_id: 'task-3', description: 'Architect reviewing API', prompt: '...' });
Task({ task_id: 'task-4', description: 'Security reviewing API', prompt: '...' });
Task({ task_id: 'task-5', description: 'Performance reviewing API', prompt: '...' });

Aggregated Results:

## API Design Review (3 agents)

### Consensus

- RESTful design is appropriate
- Need authentication on all endpoints

### Recommendations by Priority

1. [HIGH] Add rate limiting (Security)
2. [HIGH] Use connection pooling (Performance)
3. [MED] Add versioning to URLs (Architect)

</usage_example> </examples>

Rules

  • Always spawn independent agents in parallel
  • Use structured handoff formats
  • Handle partial failures gracefully

Related Workflow

This skill has a corresponding workflow for complex multi-agent scenarios:

  • Workflow: .claude/workflows/enterprise/swarm-coordination-skill-workflow.md
  • When to use workflow: For massively parallel task execution with Queen/Worker topology, fault tolerance, and distributed coordination (large-scale refactoring, parallel code review, multi-file implementation)
  • When to use skill directly: For simple parallel agent spawning or when integrating swarm patterns into other workflows

Workflow Integration

This skill powers multi-agent orchestration patterns across the framework:

Router Decision: .claude/workflows/core/router-decision.md

  • Router uses swarm patterns for parallel agent spawning
  • Planning Orchestration Matrix defines when to use swarm coordination

Artifact Lifecycle: .claude/workflows/core/skill-lifecycle.md

  • Swarm patterns apply to artifact creation at scale
  • Parallel validation of multiple artifacts

Related Workflows:

  • consensus-voting skill for resolving conflicting agent outputs
  • context-compressor skill for aggregating parallel results
  • Enterprise workflows in .claude/workflows/enterprise/ use swarm patterns

Iron Laws

  1. NEVER spawn workers sequentially — all independent agents must be dispatched in a single message
  2. ALWAYS implement failure detection; never let a hung worker block the swarm indefinitely
  3. NEVER allow cross-worker communication — all coordination must flow through the Queen
  4. ALWAYS use structured handoff format for worker reports to enable programmatic aggregation
  5. NEVER spawn more than 7 workers in a single fan-out — coordination overhead dominates beyond that

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Sequential spawningNo parallelism; swarm executes like a queueSpawn all independent workers in a single message
Cross-worker communicationO(N²) coordination chaosAll worker-to-worker communication flows through the Queen
No failure handlingOne worker crash stalls the swarmDetect hung/failed workers and re-spawn with fresh state
Unbounded parallelismCoordination overhead exceeds speedup beyond 7 workersLimit to 5-7 workers per fan-out for optimal throughput
Free-form worker reportsCannot aggregate results programmaticallyRequire all workers to use the structured handoff template

Memory Protocol (MANDATORY)

Before starting:

cat .claude/context/memory/learnings.md

After completing:

  • New pattern -> .claude/context/memory/learnings.md
  • Issue found -> .claude/context/memory/issues.md
  • Decision made -> .claude/context/memory/decisions.md

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

Use when you want to improve response quality through meta-cognitive reasoning. Applies 15+ reasoning methods to reconsider and refine initial outputs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

N-round opposing-stance debates for trade-off analysis. Assigns pro/con roles to agents, runs structured debate rounds with quality scoring, and produces a moderator synthesis with confidence-rated recommendation. Generalizable to architecture, technology, security, and design decisions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

Force adversarial code review stance that eliminates confirmation bias — reviewer must find issues or re-analyze

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

Creates specialized AI agents on-demand when no existing agent matches a request. Use when the Router cannot find a suitable agent for a task. Enables self-evolution by generating persistent agents.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

LLM-as-judge evaluation framework with 5-dimension rubric (accuracy, groundedness, coherence, completeness, helpfulness) for scoring AI-generated content quality with weighted composite scores and evidence citations

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

oimiragieo의 스킬 모두 보기

이 스킬의 문제 신고