agentleFS
EvoClawEvoClaw/amplify/skills/dispatching-parallel-agents/SKILL.md

dispatching-parallel-agents

Skill12 starsChanged 9 months agoMITView on GitHub

Use when facing 2+ independent experiments or tasks that can be worked on without shared state or sequential dependencies

136 other projects use a version of this, 104 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnosing-superpowers, workflow-runner and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • obraSkill

    diagnosing-superpowers

    Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

    Also in 6 projects that use this

  • MorningStar0709Skill

    workflow-runner

    Run an agency-orchestrator style YAML workflow inside the current Trae conversation by simulating or coordinating multiple roles. Use when the user provides a `.yaml` or `.yml` workflow, asks for multi-role collaboration, says things like “用多个角色一起评审这个 PRD”“多角色协作”“先生成工作流再执行”“让产品经理、架构师、QA 一起看一下”, or wants roles such as product manager, architect, reviewer, or QA to work together. Supports layered execution, role prompting, variable interpolation, document-backed inputs, and parallel steps only when the current environment has a clear subagent mapping. Do not use for ordinary implementation plans, simple code changes, or tasks already covered by `writing-plans`, `executing-plans`, `subagent-driven-development`, or single-purpose review/debug skills.

    Also in 5 projects that use this

  • MorningStar0709Skill

    chinese-git-workflow

    Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".

    Also in 4 projects that use this

  • shibit-netSkill

    chinese-code-review

    中文 review 沟通参考——话术模板、分级标注(必须修复/建议修改/仅供参考)、国内团队常见反模式应对。仅在用户显式 /chinese-code-review 时调用,不要根据上下文自动触发。

    Also in 3 projects that use this

  • shibit-netSkill

    chinese-commit-conventions

    中文 commit 与 changelog 配置参考——Conventional Commits 中文适配、commitlint/husky/commitizen 中文模板、conventional-changelog 中文配置。仅在用户显式 /chinese-commit-conventions 时调用,不要根据上下文自动触发。

    Also in 3 projects that use this

  • MicrosoftSkill

    testing-anti-patterns

    Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies

    Also in 4 projects that use this

  • +1 more from shibit-net

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 3 are common, 12 are distinctive, and 0 are very specific to this project.

  • 3

    Common

    Most of the 129 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When you have multiple independent experiments (different datasets, different methods, different baselines), running them sequentially …

    line 10
  2. Distinctive:

    Use this skill alongside:

    line 14
  3. Common:

    No shared state between experiments

    line 43
  4. Distinctive:

    Clear goal: Run this experiment and collect results

    line 65
  5. Common:

    Constraints: Don't change shared code or other experiments

    line 66
  6. Distinctive:

    Use the Task tool to launch subagents.

    line 71
  7. Distinctive:

    How to invoke: Call multiple Task tools in a single response.

    line 73
  8. Distinctive:

    Critical: All three Task calls go in the SAME message, so they execute concurrently.

    line 95
  9. Common:

    Verify results don't conflict

    line 101
  10. Distinctive:

    Self-contained: - All context the subagent needs (it has NO access to your conversation history)

    line 109
  11. Distinctive:

    Integration: All results independent, no conflicts, comprehensive comparison table built

    line 181
  12. Distinctive:

    Run validation: - Verify all results are reproducible

    line 197
  13. Distinctive:

    Before declaring success, invoke:

    line 200
  14. Distinctive:

    All experiments completed concurrently

    line 209
  15. Distinctive:

    All results integrated successfully

    line 210

“Common” is measured: kept by at least 6 in 10 of the 129 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dispatching Parallel Agents

Overview

When you have multiple independent experiments (different datasets, different methods, different baselines), running them sequentially wastes time. Each experiment is independent and can happen in parallel.

Core principle: Dispatch one agent per independent problem domain. Let them work concurrently.

Use this skill alongside:

  • amplify:experiment-execution for Phase 4 orchestration
  • amplify:results-verification-protocol before claiming completion
  • amplify:results-integration when consolidating outputs

When to Use

digraph when_to_use {
    "Multiple experiments?" [shape=diamond];
    "Are they independent?" [shape=diamond];
    "Single agent runs all" [shape=box];
    "One agent per experiment" [shape=box];
    "Can they work in parallel?" [shape=diamond];
    "Sequential agents" [shape=box];
    "Parallel dispatch" [shape=box];

    "Multiple experiments?" -> "Are they independent?" [label="yes"];
    "Are they independent?" -> "Single agent runs all" [label="no - related"];
    "Are they independent?" -> "Can they work in parallel?" [label="yes"];
    "Can they work in parallel?" -> "Parallel dispatch" [label="yes"];
    "Can they work in parallel?" -> "Sequential agents" [label="no - shared state"];
}

Use when:

  • 3 independent experiments on different datasets
  • Multiple baseline implementations to evaluate
  • Each experiment can be understood without context from others
  • No shared state between experiments

Don't use when:

  • Experiments are related (result of one informs another)
  • Need to understand full system state
  • Agents would interfere with each other

The Pattern

1. Identify Independent Domains

Group experiments by what they investigate:

  • Experiment A: Baseline model on dataset X
  • Experiment B: Proposed method on dataset Y
  • Experiment C: Ablation study on component Z

Each domain is independent - running the baseline doesn't affect the ablation study.

2. Create Focused Agent Tasks

Each agent gets:

  • Specific scope: One experiment or method
  • Clear goal: Run this experiment and collect results
  • Constraints: Don't change shared code or other experiments
  • Expected output: Summary of findings, metrics, and artifacts

3. Dispatch in Parallel

Use the Task tool to launch subagents. The Task tool is the standard mechanism for spawning independent subagents in Cursor and similar AI development environments.

How to invoke: Call multiple Task tools in a single response. Each Task runs as an independent subagent with its own context.

Call Task tool with:
  description: "Run baseline on dataset X"
  prompt: |
    [Full self-contained prompt — see Agent Prompt Structure below]
  subagent_type: "generalPurpose"

Call Task tool with:
  description: "Run proposed method on dataset Y"
  prompt: |
    [Full self-contained prompt]
  subagent_type: "generalPurpose"

Call Task tool with:
  description: "Run ablation on component Z"
  prompt: |
    [Full self-contained prompt]
  subagent_type: "generalPurpose"

Critical: All three Task calls go in the SAME message, so they execute concurrently. If you put them in separate messages, they run sequentially.

4. Review and Integrate

When agents return:

  • Read each summary
  • Verify results don't conflict
  • Run validation checks
  • Integrate all findings

Agent Prompt Structure

Good agent prompts are:

  1. Focused - One clear experiment or problem domain
  2. Self-contained - All context the subagent needs (it has NO access to your conversation history)
  3. Specific about output - What should the agent return?
  4. Include file paths - The subagent starts in the workspace root; give absolute or relative paths
Call Task tool with:
  description: "Run baseline on sentiment dataset"
  prompt: |
    Run the baseline experiment on the sentiment analysis dataset.

    Project root: [workspace path]

    Steps:
    1. Load the pre-trained model from checkpoints/baseline-v2
    2. Evaluate on test split of sentiment-benchmark
    3. Collect metrics: accuracy, F1, precision, recall

    Configuration:
    - Batch size: 32
    - Use GPU if available
    - Log results to experiments/baseline-sentiment/

    Do NOT modify the model code or training pipeline.

    Return: Summary of metrics, any anomalies observed, and path to saved results.
  subagent_type: "generalPurpose"

Common Mistakes

Bad: Too broad: "Run all the experiments" - agent gets lost Good: Specific: "Run baseline on sentiment dataset" - focused scope

Bad: No context: "Evaluate the model" - agent doesn't know which model or data Good: Context: Specify model path, dataset, metrics, and configuration

Bad: No constraints: Agent might refactor everything Good: Constraints: "Do NOT change model code" or "Evaluation only"

Bad: Vague output: "Run it" - you don't know what was measured Good: Specific: "Return summary of metrics and path to artifacts"

When NOT to Use

Related experiments: Result of one informs the next - run sequentially Need full context: Understanding requires seeing entire research pipeline Exploratory analysis: You don't know what to investigate yet Shared state: Agents would interfere (writing same output files, using same GPU)

Real Example from Session

Scenario: 3 independent experiments needed after method development

Experiments:

  • Dataset A evaluation: Baseline model performance (accuracy, F1)
  • Dataset B evaluation: Proposed method with hyperparameter sweep
  • Ablation study: Component contribution analysis on validation set

Decision: Independent domains - each dataset/method combination is separate

Dispatch (all three Task calls in one message):

Task(description="Baseline on Dataset A", prompt="...", subagent_type="generalPurpose")
Task(description="Proposed method on Dataset B", prompt="...", subagent_type="generalPurpose")
Task(description="Ablation study", prompt="...", subagent_type="generalPurpose")

Results:

  • Agent 1: Baseline accuracy 78.3%, F1 0.76 - logged to experiments/baseline-A/
  • Agent 2: Best config found (lr=3e-4, layers=6), accuracy 84.1% - logged to experiments/proposed-B/
  • Agent 3: Attention component contributes +3.2%, embedding component +1.8% - logged to experiments/ablation/

Integration: All results independent, no conflicts, comprehensive comparison table built

Time saved: 3 experiments completed in parallel vs sequentially

Key Benefits

  1. Parallelization - Multiple experiments happen simultaneously
  2. Focus - Each agent has narrow scope, less context to track
  3. Independence - Agents don't interfere with each other
  4. Speed - 3 experiments completed in time of 1

Verification

After agents return:

  1. Review each summary - Understand what was measured and found
  2. Check for conflicts - Did agents write to the same output paths?
  3. Run validation - Verify all results are reproducible
  4. Spot check - Agents can make systematic errors

Before declaring success, invoke:

  • amplify:results-verification-protocol
  • amplify:claim-evidence-alignment (if claims are being prepared for reporting/writing)

Real-World Impact

From research session:

  • 3 independent experiments needed
  • 3 agents dispatched in parallel
  • All experiments completed concurrently
  • All results integrated successfully
  • Zero conflicts between agent outputs

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.