# Complex Orchestrator

> Complex Orchestrator is an Agent Skill for agent building published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Orchestrates multi-file tasks by delegating to parallel sub-agents. Use when a task spans multiple files or components and can benefit from parallel execution to save context and time.

- Skill name: `complex-orchestrator`
- Category: [Agent Building](https://www.openparable.com/skill/agent-building/1)
- Source: https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/data/complex-orchestrator/SKILL.md
- Repository: majiayu000/claude-skill-registry (498 GitHub stars when collected)

## SKILL.md

# Parallel Task Orchestrator

Distribute multi-file work across parallel sub-agents to save context and time.

## When to Use

```
Task spans multiple files?
    │
    ├─ Independent? ──────► Full Parallel
    ├─ Some dependencies? ─► Staged Parallel (waves)
    └─ Tightly coupled? ──► Sequential or single agent
```

## 4-Step Workflow

### 1. Decompose
Break into file-scoped units. Identify dependencies.

### 2. Choose Strategy
- **Full Parallel**: All units independent
- **Staged Parallel**: Wave 1 (dependencies) → Wave 2 (consumers)
- **Fan-out/Fan-in**: Setup → parallel work → integration

### 3. Delegate in Parallel
Launch multiple Tasks in **single message**:
```typescript
Task({ subagent_type: "general-purpose", description: "Edit file A", prompt: "..." })
Task({ subagent_type: "general-purpose", description: "Edit file B", prompt: "..." })
```

### 4. Integrate
- Verify each succeeded
- Check for conflicts
- Run integration tests

## Sub-agent Prompt Structure

```markdown
## Scope
File: [path] | Task: [what to do in THIS file only]

## Context
Pattern: [consistent approach across all units]

## Constraints
- Only modify [path]
- Follow existing style
```

## Agent Selection

| Sub-task | Agent |
|----------|-------|
| Simple edit | `general-purpose` |
| Exploration needed | `Explore` → `general-purpose` |
| Complex logic | `advanced-general-purpose` |

---

*For detailed examples and troubleshooting, see `examples.md`*

---

Source: https://www.openparable.com/skill/agent-building/complex-orchestrator (OpenParable). Cite the canonical URL above.
