CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

dispatching-parallel-agents

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

Quality

61%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./skills/dispatching-parallel-agents/SKILL.md
SKILL.md
Quality
Evals
Security

Dispatching Parallel Agents

Overview

You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.

When you have multiple unrelated failures (different test files, different subsystems, different bugs), investigating them sequentially wastes time. Each investigation is independent and can happen in parallel.

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

When to Use

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

    "Multiple failures?" -> "Are they independent?" [label="yes"];
    "Are they independent?" -> "Single agent investigates 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:

  • 2+ test files failing with different root causes
  • Multiple subsystems broken independently
  • Each problem can be understood without context from others
  • No shared state between investigations

Don't use when:

  • Failures are related (fix one might fix others)
  • Need to understand full system state
  • Agents would interfere with each other

The Pattern

1. Identify Independent Domains

Group failures by what's broken:

  • test/models/subscription_test.rb: Renewal date calculation
  • test/jobs/invoice_delivery_job_test.rb: Invoice email delivery
  • test/controllers/imports_controller_test.rb: CSV import flow

Each domain is independent - fixing renewal dates doesn't affect invoice delivery.

2. Create Focused Agent Tasks

Each agent gets:

  • Specific scope: One test file or subsystem
  • Clear goal: Make these tests pass
  • Constraints: Don't change other code
  • Expected output: Summary of what you found and fixed

3. Dispatch in Parallel

Send all Agent tool calls in one message. Calls sent in separate messages run one after another.

Agent(description: "Fix subscription_test.rb", prompt: "...")
Agent(description: "Fix invoice_delivery_job_test.rb", prompt: "...")
Agent(description: "Fix imports_controller_test.rb", prompt: "...")
# All three run concurrently

4. Review and Integrate

When agents return:

  • Read each summary
  • Verify fixes don't conflict
  • Run full test suite
  • Integrate all changes

Agent Prompt Structure

Good agent prompts are:

  1. Focused - One clear problem domain
  2. Self-contained - All context needed to understand the problem
  3. Specific about output - What should the agent return?
Fix the 3 failing tests in test/models/subscription_test.rb:

1. "renews on the same day next month" - expected 2026-03-31, got 2026-03-30
2. "renewal date ignores the user's time zone" - off by one day near midnight
3. "trial ends after 14 days" - passes locally, fails on CI

These look like time and time zone issues. Your task:

1. Read the test file and understand what each test verifies
2. Identify root cause - test setup or actual bugs in Subscription?
3. Fix by:
   - Freezing time with `travel_to` instead of relying on the real clock
   - Using `Time.current` / `Date.current` instead of `Time.now` / `Date.today`
   - Fixing bugs in the renewal calculation if found

Do NOT add `sleep`, retries, or loosen assertions - find the real issue.
Run only this file: bin/rails test test/models/subscription_test.rb

Return: Summary of the root cause and what you changed.

Common Mistakes

❌ Too broad: "Fix all the tests" - agent gets lost ✅ Specific: "Fix subscription_test.rb" - focused scope

❌ No context: "Fix the race condition" - agent doesn't know where ✅ Context: Paste the error messages and test names

❌ No constraints: Agent might refactor everything ✅ Constraints: "Do NOT change production code" or "Fix tests only"

❌ Vague output: "Fix it" - you don't know what changed ✅ Specific: "Return summary of root cause and changes"

When NOT to Use

Related failures: Fixing one might fix others - investigate together first Need full context: Understanding requires seeing entire system Exploratory debugging: You don't know what's broken yet Shared state: Agents would interfere (editing same files, using same resources)

Example

Scenario: 6 test failures across 3 files after a Rails upgrade

Failures:

  • subscription_test.rb: 3 failures (time zone and date math)
  • invoice_delivery_job_test.rb: 2 failures (email never delivered)
  • imports_controller_test.rb: 1 failure (imported row count = 0)

Decision: Independent domains - date math separate from email delivery separate from imports

Dispatch:

Agent 1 → Fix subscription_test.rb
Agent 2 → Fix invoice_delivery_job_test.rb
Agent 3 → Fix imports_controller_test.rb

Results:

  • Agent 1: Replaced Date.today with Date.current and froze time with travel_to
  • Agent 2: Fixed argument bug - job was enqueued with invoice.id but perform expected an Invoice
  • Agent 3: Replaced sleep 1 with perform_enqueued_jobs so the import job runs inside the test

Integration: All fixes independent, no conflicts, bin/rails test green

Time saved: 3 problems solved in parallel vs sequentially

Key Benefits

  1. Parallelization - Multiple investigations 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 problems solved in time of 1

Verification

After agents return:

  1. Review each summary - Understand what changed
  2. Check for conflicts - Did agents edit same code?
  3. Run full suite - Verify all fixes work together
  4. Spot check - Agents can make systematic errors
Repository

lucianghinda/superpowers-ruby

Path

skills/dispatching-parallel-agents/SKILL.md

Last updated
First committed

Canonical home

obra/superpowers
In sync

since Jan 28, 2026

Also appears in

valeriibeck-star/claude-skills
Stale

last in sync Mar 12, 2026

arwei944/codeg
Stale

last in sync Mar 12, 2026

chandler767/WorkJournal
In sync

since Oct 20, 2026

davila7/claude-code-templates
Stale

last in sync Jan 28, 2026

Renamed to: parallel-agents

rpamis/comet
Stale

last in sync Jun 18, 2026

openai/plugins
In sync

since Jul 24, 2026

roman01la/skills-agents
Stale

last in sync Jan 28, 2026

Renamed to: parallel-agents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.