From mjmendo-plugins
Choose the right isolation strategy when spinning parallel cmux agents — shared filesystem, file ownership, or git worktrees.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mjmendo-plugins:cmux-agents-isolationThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
| Situation | Strategy |
| Situation | Strategy |
|---|---|
| Agents write to completely different files | Shared filesystem — no action needed |
| Research / docs only, no code overlap | Shared filesystem — no action needed |
| Agent B imports or extends Agent A's output | Sequence them (A finishes first), or use worktrees |
| Agents write to the same file | Git worktrees — always |
State explicit ownership in each agent's prompt. Agent B describes the API of Agent A's file by spec, not by reading a moving target.
# Agent 1 prompt:
You OWN these files (create freely):
- bots/shared/working_memory.py
- bots/tech-support/memory_server.py
Do NOT touch: bots/shared/vector_memory.py (owned by Agent 2)
# Agent 2 prompt:
You OWN these files:
- bots/shared/vector_memory.py
- bots/tech-support/semantic_memory_server.py
Do NOT write: bots/shared/working_memory.py (written by Agent 1 in parallel)
Its API: [describe classes/methods inline in the prompt]
# Before spinning agents
git worktree add /tmp/agent-1 -b agent-1-branch
git worktree add /tmp/agent-2 -b agent-2-branch
# In each agent's prompt, set working directory:
# "Working directory: /tmp/agent-1"
# After agents finish — merge on main
git checkout main
git merge agent-1-branch
git merge agent-2-branch # resolve conflicts if any
# Clean up
git worktree remove /tmp/agent-1
git worktree remove /tmp/agent-2
git branch -d agent-1-branch agent-2-branch
Use worktrees when agents are likely to touch shared config files (.gitignore, pyproject.toml, etc.) even if their primary outputs don't overlap.
Back to orchestration → /cmux-agents
For writing effective prompts → /cmux-agents-prompts
npx claudepluginhub mjmendo/claude-plugins --plugin mjmendo-pluginsOrchestrates multiple worktree agents using `workmux` CLI: spawn, monitor, communicate, and merge. Invoked via `/coordinator`, useful for parallelizing tasks across git worktrees.
Enforces two-pipeline isolation protocol in multi-agent workflows: worktree (filesystem-level) for writers and information barriers between builder, tester, simulator pipelines for independent verification.
Orchestrates parallel AI agent workflows with dmux tmux manager across Claude Code, Codex, and other harnesses for multi-session dev tasks.