Agent skill
distributed-task-orchestrator
Decompose complex tasks into parallel sub-agents. Use for multi-step operations, batch processing, or when user mentions "parallel", "agents", or "orchestrate".
Install this agent skill to your Project
npx add-skill https://github.com/shuyu-labs/WebCode/tree/main/skills/codex/distributed-task-orchestrator
SKILL.md
Distributed Task Orchestrator
You are an advanced distributed task orchestration system. Decompose complex requests into independent atomic tasks, manage parallel execution, and aggregate results.
Quick Decision
Is task complex? (3+ independent steps, multiple files, parallel benefit)
├── NO → Execute directly, skip orchestration
└── YES → Use orchestration
├── Simulated mode (default) → Present as parallel batches
└── CLI mode (user requests) → Launch real Claude CLI sub-agents
Skip orchestration for: single-file ops, simple queries, < 3 steps, purely sequential tasks.
Core Workflow
Phase 1: Decompose
Analyze request → Break into atomic tasks → Map dependencies → Create .orchestrator/master_plan.md
# Task Plan
## Request
> [Original request]
## Tasks
| ID | Task | Deps | Status |
|----|------|------|--------|
| T-01 | [Description] | None | 🟡 |
| T-02 | [Description] | T-01 | ⏸️ |
Status: 🟡 Pending · 🔵 Running · ✅ Done · ❌ Failed · ⏸️ Waiting
Phase 2: Assign Agents
Create .orchestrator/agent_tasks/agent-XX.md for each task:
# Agent-XX: [Task Name]
**Input:** [parameters]
**Do:** [specific instructions]
**Output:** [expected format]
Phase 3: Execute
Simulated Mode (Default):
═══ Batch #1 (No Dependencies) ═══
🤖 Agent-01 [T-01: Task Name]
⚙️ [Execution steps...]
✅ Completed
═══ Batch #2 (After Batch #1) ═══
🤖 Agent-02 [T-02: Task Name]
⚙️ [Execution steps...]
✅ Completed
CLI Mode (When Requested):
# Windows - Parallel execution
$jobs = Get-ChildItem ".orchestrator/agent_tasks/*.md" | ForEach-Object {
Start-Job -ScriptBlock {
param($path, $out)
claude --print (Get-Content $path -Raw) | Out-File $out
} -ArgumentList $_.FullName, ".orchestrator/results/$($_.BaseName)-result.md"
}
$jobs | Wait-Job | Receive-Job; $jobs | Remove-Job
# Linux/Mac - Using GNU parallel
parallel claude --print "$(cat {})" ">" .orchestrator/results/{/.}-result.md ::: .orchestrator/agent_tasks/*.md
Phase 4: Aggregate
Collect results → Merge by dependency order → Generate .orchestrator/final_output.md
# Execution Report
- Tasks: N total, X succeeded, Y failed
- Duration: Zs
## Results
[Integrated findings organized logically]
## Key Takeaways
1. [Finding 1]
2. [Finding 2]
Dependency Patterns
- Parallel: T-01, T-02, T-03 → T-04 (first three run together)
- Serial: T-01 → T-02 → T-03 (each waits for previous)
- DAG: Complex graphs use topological sort
Error Handling
| Strategy | When to Use |
|---|---|
| Retry (3x, exponential backoff) | Timeouts, transient failures |
| Skip and continue | Non-critical tasks |
| Fail-fast | Critical dependencies |
Best Practices
- Granularity: Target 1-5 min per task; split large, merge trivial
- Parallelism: Minimize dependencies; use file-based data passing
- State: Update
master_plan.mdon every status change
Trigger Conditions
USE when:
- 3+ independent steps possible
- User mentions: "parallel", "concurrent", "subtasks", "agents"
- Batch processing needed
- Claude CLI sub-agents requested
SKIP when:
- Single-step task
- Quick query/explanation
- Purely sequential with no parallel benefit
Related Files
- workflow.md - Detailed workflow spec
- templates.md - Complete templates
- cli-integration.md - CLI deep dive
- examples.md - Practical examples
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
internal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
canvas-design
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
web-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
Didn't find tool you were looking for?