Preventing Subagent Collisions

Preventing Subagent Collisions is a skill for Claude Code from RudyCity/superagent. It costs 60 tokens per session (2,157 once invoked), scanned A, original, MIT.

A coordination guide for projects where several software agents work at the same time, including agents sharing a worktree or working in separate worktrees.

In plain words
What is it for?
It is for assigning tasks and file ownership before agents start, coordinating shared files, and tracking work through project plans and task lists.
Why use it?
It helps prevent two agents from doing the same task or changing the same file, reducing conflicts and wasted work.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: mentions subagents; installed under .agents/ (shared by several agents); mentions AGENTS.md.

Good fit It is for assigning tasks and file ownership before agents start, coordinating shared files, and tracking work through project plans and task lists.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rudycity/superagent/preventing-subagent-collisions
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add RudyCity/superagent --skill preventing-subagent-collisions
Clone the repo
git clone --depth 1 https://github.com/RudyCity/superagent

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Preventing Subagent Collisions

README.md
[![agentmods](https://agentmods.dev/badge/skills/rudycity/superagent/preventing-subagent-collisions/github.svg)](https://agentmods.dev/skills/rudycity/superagent/preventing-subagent-collisions)
Your own site
<a href="https://agentmods.dev/skills/rudycity/superagent/preventing-subagent-collisions"><img src="https://agentmods.dev/badge/skills/rudycity/superagent/preventing-subagent-collisions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Preventing Subagent Collisions

Your own site · 80×15
<a href="https://agentmods.dev/skills/rudycity/superagent/preventing-subagent-collisions"><img src="https://agentmods.dev/badge/skills/rudycity/superagent/preventing-subagent-collisions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,157 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.02157
Opus 5 $0.00030 $0.01078
Sonnet 5 $0.00012 $0.00431
Haiku 4.5 $0.00006 $0.00216

Measured 7d ago against content hash 653b5dbc86f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

Preventing Subagent Collisions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/preventing-subagent-collisions/SKILL.md · 235 lines

How it starts

The opening of the file, as written. The whole thing — 235 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Preventing Subagent Collisions

Overview

Two separate collision scenarios exist in the 3-tier architecture. Both must be handled:

Scenario Tier Risk
A — Subagent collision Superagent → Subagents Two subagents claim same task or edit same file within one worktree
B — Worktree collision Master Agent → Superagents Two Superagents in different worktrees both edit shared files (package.json, CHANGELOG.md, AGENTS.md), causing merge conflicts

Core principle (both scenarios): The parent pre-assigns tasks AND file scopes before spawning. Shared files are never touched in parallel — always serialized.


Scenario A — Subagent Collision (Superagent tier)

The Coordination Model

File Purpose Owner
_implementation_plan.md All tasks, file scopes, agent assignments Parent (via manage_plan)
_task.md Active task checklist — status per task Parent updates; subagents read only
_task_history.md Archive of completed tasks Automatic

Subagents do NOT call manage_plan or modify _task.md. They receive a pre-assigned task in their prompt and report back when done. Parent updates status via manage_tasks.

Plan Template with Agent Assignments

# Feature X Implementation Plan

## Proposed Changes

- [ ] [agent: researcher] Research existing auth patterns — src/auth/**
- [ ] [agent: coder-a] Implement JWT middleware — src/auth/jwt.ts, src/auth/middleware.ts
- [ ] [agent: coder-b] Implement billing service — src/billing/**, tests/unit/billing/**
- [ ] [agent: reviewer] Review and test all changes — tests/**, docs/**

## Shared Files (Read-Only for Parallel Agents)
- src/types/index.ts
- src/config/constants.ts
- package.json

If an agent needs to modify a shared file: STOP and report to parent.

## Verification Plan
### Automated Tests
`bun test`
### Manual Verification
Verify no conflicts in git log.

Spawn with fileScope

Read the full file on GitHub · 235 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 235 lines · 60 tokens per session scan A 653b5dbc86f5

Subscribe to this mod's changes

Preventing Subagent Collisions is a skill published in the GitHub repository RudyCity/superagent (21 stars, last pushed 2d ago), licensed MIT. It adds 60 tokens to every session and 2,157 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

recipe-create-meet-space

Create a Google Meet meeting space and share the join link.

googleworkspace/cli · 18 tokens

workthreads

SpecStory Workthreads - a weekly work-thread rollup across a team's repos from SpecStory coding histories (any agent - Claude Code, Codex, Cursor, Gemini, and more). It groups the window's sessions into threads of work per project and labels each new / open / recently closed, so a lead sees what shipped, what is still…

specstoryai/getspecstory · 126 tokens

atmos-config

Atmos root configuration: atmos.yaml discovery, precedence, deep merging, basepath, imports, minimal bootstrap, and routing to narrower Atmos skills.

cloudposse/atmos · 31 tokens

story-readiness

Validate that a story file is implementation-ready. Checks for embedded GDD requirements, ADR references, engine notes, clear acceptance criteria, and no open design questions. Produces READY / NEEDS WORK / BLOCKED verdict with specific gaps. Use when user says 'is this story ready', 'can I start on this story', 'is…

Donchitos/Claude-Code-Game-Studios · 77 tokens

autotask-creator

Rules for automation CRUD from the group-chat commander. The commander does not call mutation tools and does not edit cloud/autotasks files directly. It emits one or more top-level ... containers in its final text; the bus parses and applies them after the turn.

Orkas-AI/Orkas · 5 tokens

projects

List all managed projects with status, branch, open PRs, and open issue counts — portfolio-level view.

me2resh/apexyard · 24 tokens