parallel-agent-dispatch
БесплатноЗапускает вложенные скриптыНе проверенDispatch contract for spawning parallel agents covering worktree collisions, scope overflow, and silent exits. Use when fanning out concurrent agents or…
от laurigates★ 61 звезда на GitHubОб этом скилле
Parallel Agent Dispatch
Conventions that apply every time more than one agent runs in parallel. Prevents the top failure modes observed across real multi-agent sessions: dirty-worktree cross-contamination, context overflow mid-task, and silent exits that require manual salvage from orphan branches.
Supporting material is split across references/ by the path that needs it;
REFERENCE.md is the index. Sections below link the specific file.
When to Use This Skill
| Use this skill when... | Use agent-teams instead when... |
|---|---|
Spawning >1 agent via plain Agent tool fan-out (N concurrent invocations) |
Single-agent delegation or one-off subagent spawn |
| Using the implicit team + teammate spawn for coordinated parallel work | A simple background task with no parallel siblings |
| Running worktree-isolated parallel implementation across repos/features | A read-only inline subagent that does not write to disk |
| Coordinating parallel investigation or audit swarms | The work fits in the current session without forking |
Dispatch from the Main Thread When Possible
A sub-agent may lack Agent and the other spawn tools, so a fan-out designed
inside one can silently degrade to sequential execution.
- Default: dispatch from the main conversation.
- Sub-agent orchestrator: only when its outputs need not feed back into the
main thread. Brief it to check tool availability first and report a
sequential fallback as an outcome (
agent-teams→ "Sub-Agent Caveat").
The Three Pillars
1. Worktree Preflight
Before spawning, the orchestrator must verify:
| Check | Rationale |
|---|---|
Main working tree is clean (git status --porcelain empty) |
Agents inherit cwd; uncommitted changes cross-contaminate worktrees |
No existing worktree at each planned path (git worktree list) |
Nested or duplicate worktrees are the #1 source of salvage work |
| Each agent gets a unique branch name | Prevents commits landing on the wrong branch when cwd resolution drifts |
| Fixed target branch name not already taken (see Target-branch preflight below) | A conventional per-issue/milestone name is one two sessions pick identically; the collision otherwise surfaces only at end-of-task rename |
| Shared counters snapshot (next ADR/PRP number, feature-tracker IDs) | Prevents numbering collisions in parallel doc writes |
gh auth, merge/push permission gates, required secrets: workflow-orchestration-plugin:workflow-preflight with --recon |
A wave that cannot merge or release stalls at its last step; the approvals it needs get asked for before dispatch |
If any check fails, refuse to dispatch and report the blocker. Do not "clean up" uncommitted user work — surface it and ask.
Target-branch preflight (#1969). isolation: "worktree" auto-names the
branch; renaming onto a fixed conventional name another session's worktree
already holds is refused only at the end-of-task rename, deep into the run (real
case: two sessions both reached PR-open → duplicate-PR reconcile). Check the name
is free first (git branch -a --list "$target", git worktree list,
git ls-remote --heads origin "$target"); any hit ⇒ stop and reconcile, not
race to a duplicate PR (.claude/rules/concurrent-session-pr-check.md).
Mitigation: push via explicit refspec (git push origin HEAD:$target)
instead of renaming. See
references/worktree-hazards.md → Target-branch preflight.
Transient worktree leaks (#1319). While a wave runs, a file a child wrote
inside its worktree can briefly appear in the parent as an untracked entry
at the same relative path, then vanish when the child commits. Do not stash,
restore, or commit untracked parent files during a wave; wait for the child's
completion, then let its branch reclaim the file. /git:coworker-check raises
worktree_leak_suspected for this — run it before every parent-side commit.
cwd-reset leaking git writes (#1480). Distinct from the transient leak: an
agent thread's bash cwd resets between calls and can land on the main repo root,
so a git-write agent's bare commands mutate main instead of its worktree.
Brief every git-write agent: pin the root once
(git rev-parse --show-toplevel → $WORKTREE) and prefix every call with
git -C "$WORKTREE" …; forbid bare git checkout -B / git rebase --autostash
until inside the worktree. After the agent returns, run the post-run main-repo
integrity check (see references/worktree-hazards.md → cwd-reset
guardrail) —
a changed branch or new dirty state is silent main-repo mutation.
GIT_DIR/GIT_WORK_TREE export leak (#1692 sibling). A worktree reporting
core.bare = true is shared-checkout corruption — STOP and report it; never
"work around
Установить parallel-agent-dispatch в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGlobGrepTodoWriteВложенные файлы
FAQ
Что делает скилл parallel-agent-dispatch?
Dispatch contract for spawning parallel agents covering worktree collisions, scope overflow, and silent exits. Use when fanning out concurrent agents or authoring a lead prompt.
Как установить скилл parallel-agent-dispatch?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл parallel-agent-dispatch запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic