isolate-subagent-workspaces
Use when parallel children share a machine, repo, or environment. Gives each child a private workspace (worktree, directory, container) so one cannot corrupt another's files or state.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 80
- Forks
- 17
01 前言 Front Matter
- name
- isolate-subagent-workspaces
- description
- Use when parallel children share a machine, repo, or environment. Gives each child a private workspace (worktree, directory, container) so one cannot corrupt another's files or state.
02 资源文件 3
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md353 B
- 参考文档TRUST.auto.yaml2.0 KB
03 SKILL.md 正文
Isolate Subagent Workspaces
Shared state is the root of most parallel bugs. Put each child in its own workspace — a git worktree, a copy, or a container — so its writes and environment changes stay local.
Procedure
- Pick the isolation level by the risk: a separate output directory for write-only children,
git worktreefor repo editors, a container for children that install packages. - For repo work, create a worktree per child:
git worktree add ../wt-<id> -b child-<id>. - Give each child its own scratch root via the environment:
TMPDIR=$PWD/scratch/child-<id>so temp files cannot collide. - Isolate environment variables and config paths per child (separate
$HOMEor config dir) so global settings do not race. - For containers, mount only the child's slice read-write; mount shared inputs read-only.
- Prevent package collisions by giving each child its own virtualenv under its worktree.
- Collect results by copying from each workspace into a wave directory at fan-in, not by having children write a shared path.
- Tear down workspaces after fan-in:
git worktree remove ../wt-<id>and delete the scratch directories. - Verify isolation: a child's writes should be invisible outside its workspace until copied out.
- Record the workspace path per child in
notes/roster.jsonso fan-in and teardown both know where to look.
Pitfalls
- Running all children in one checkout "because it's simpler", so writes interleave and a green run is luck.
- Sharing a single virtualenv, so one child's
pip installchanges the version another depends on. - Forgetting
git worktree removeand leaking dozens of checkouts that confuse the next run's globs. - Mounting a shared input read-write in a container and letting two children edit it concurrently.
- Isolating files but not env vars, so one child's exported variable leaks into the next through a shared parent shell.
Verification
git worktree list; ls -d scratch/child-*/
# passes when each child has its own worktree/dir and no child writes outside them
Report to the user: the isolation level chosen per child, the workspace paths, and confirmation they were torn down.
04 同仓库更多 Skills
recipe-performance
Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold/warm/background-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout/paint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.
mexc-spot-websocket
MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.
mexc-spot-rest
MEXC Spot REST workflows for public data, signed account requests, orders, wallet/admin actions, and secure signing without exposing API keys.
mexc-futures-websocket
MEXC Futures WebSocket workflows for public streams, private account/order/position streams, ping/pong, subscriptions, and depth maintenance.
0xklen-version-and-refresh-sanctions-lists
暂无简介
verify-tests-cover-changed-lines
Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.