agentleFS
milad-raeisimilad-raeisi/senior-skills/skills/parallel-agents/SKILL.md

parallel-agents

Skill4 starsChanged 16 days agoMITView on GitHub

Delegate work to subagents effectively and safely. Use when a task splits into independent parts (several unrelated failing tests or bugs, per-module reviews or migrations, broad codebase searches, research across many sources), when the main context is filling up with file dumps, or when the user asks for subagents, parallel agents, or fan-out. Covers when not to delegate, how to write a self-contained brief, how to keep agents from colliding on the same files, and how to verify their output instead of trusting their reports.

30 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use nextjs-react-expert, intelligent-routing and 2 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.
  • SKB3002Skill

    nextjs-react-expert

    React and Next.js performance optimization from Vercel Engineering. Use when building React components, optimizing performance, eliminating waterfalls, reducing bundle size, reviewing code for performance issues, or implementing server/client-side optimizations.

    Also in 3 projects that use this

  • SKB3002Skill

    intelligent-routing

    Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.

    Also in 3 projects that use this

  • xfstudioSkill

    rust-pro

    Master Rust 1.75+ with modern async patterns, advanced type system

    Also in 3 projects that use this

  • VercelSkill

    web-design-guidelines

    Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 29 edited versions we read keep these.

  • 6

    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 each needs to edit freely, use separate git worktrees or branches and integrate afterwards.

    line 49
  2. Distinctive:

    Keep shared resources (databases, ports, caches) isolated per agent or run those steps sequentially.

    line 50
  3. Distinctive:

    Read the actual diff, not just the summary.

    line 56
  4. Distinctive:

    Check that it stayed in scope (git status, git diff --stat).

    line 58
  5. Distinctive:

    Look for the common failure modes: tests weakened or skipped to go green, a symptom patched instead of the cause, TODOs left behind, …

    line 59
  6. Distinctive:

    Start with the smallest number of agents that covers the independent parts, typically 2 to 5.

    line 65

“Common” is measured: kept by at least 6 in 10 of the 29 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

Parallel Agents

Subagents give you parallelism and a clean context, but every handoff loses information in both directions: the agent knows only what your brief says, and you only see the summary it returns. Delegation pays off when the work is genuinely independent and the brief is good. Otherwise it's slower, more expensive, and less correct than doing it yourself.

When to delegate

Good fits

  • Independent problems: five failing test files with unrelated causes; one review per module.
  • Broad read-only exploration where you only need the conclusion, not the files: "find every place we parse dates".
  • Research across many sources that would flood your context.
  • An independent second opinion, where you deliberately don't share your conclusion.

Poor fits

  • Tightly coupled changes where each step depends on the last.
  • Tasks of a few tool calls; the brief costs more than the work.
  • Anything where you'd need to re-check every line anyway.
  • Work touching the same files as another agent.

Write a brief like you're briefing a peer

The brief is the agent's entire world. Include:

**Goal:** what done looks like, in one or two sentences.
**Context:** the relevant files, how to run things, conventions to follow.
**Already known / ruled out:** so it doesn't repeat your work.
**Scope:** exactly which files or areas it may change; what it must not touch.
**Constraints:** no new dependencies, keep the public API stable, ask before deleting anything, and so on.
**Deliverable:** the format you want back, such as a findings list with file:line, a diff summary, or test results.
**Verification:** the command that proves the work is done.

Hand over the problem, not your hypothesis. An agent told "the bug is probably in the cache" will usually come back confirming it.

Avoid collisions

  • Give parallel agents disjoint files or directories. Two agents editing the same file produce conflicts or silent overwrites.
  • When each needs to edit freely, use separate git worktrees or branches and integrate afterwards.
  • Keep shared resources (databases, ports, caches) isolated per agent or run those steps sequentially.

Verify, don't trust

A subagent's report is a claim, not evidence. When results come back:

  1. Read the actual diff, not just the summary.
  2. Re-run the verification command yourself.
  3. Check that it stayed in scope (git status, git diff --stat).
  4. Look for the common failure modes: tests weakened or skipped to go green, a symptom patched instead of the cause, TODOs left behind, confident claims about code it didn't read.

Then integrate the pieces and run the full suite once more, because changes that pass separately can still conflict together.

Sizing the fan-out

Start with the smallest number of agents that covers the independent parts, typically 2 to 5. More agents mean more integration work and more tokens; parallelism only helps while the parts are truly independent.

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.