subagent-conflict-detection

Installation
SKILL.md

Subagent Conflict Detection

Native mechanism

Claude Code's own isolation primitives are the Subagents feature ("each subagent runs in its own context window with a custom system prompt, specific tool access, and independent permissions") and isolation:"worktree"'s base-branch selection. Neither one checks whether a NEW dispatch's file scope overlaps an in-flight one, or whether the worktree base is stale — that pre-flight discipline is what this skill adds on top.

  • Official sources: when verifying or updating a factual or version-sensitive claim, read references/official-docs.md.

When to invoke

Before dispatching a new subagent via the Agent tool — especially with isolation: "worktree" — if ANY other subagent is currently running or has an active worktree.

Trigger phrases / situations:

  • "派 subagent" / "dispatch a subagent" / "再派一個" while a prior subagent is in flight
  • About to call Agent tool when git worktree list shows non-main worktrees
  • Multiple [in_progress] tasks in TaskList that involve subagent work

Skip when: dispatching the first subagent in a session, or all prior subagents have completed AND their worktrees are cleaned/merged.

Installs
10
GitHub Stars
18
First Seen
Jul 6, 2026