agent-cli-worktree-safety
SolidData-loss invariants for a CLI that runs an agent SDK in a git worktree then force-removes it. Use when building or reviewing such a CLI, or when an agent run reports "no changes" after writing files.
Install
Quality Score: 81/100
Skill Content
Details
- Author
- laurigates
- Repository
- laurigates/claude-plugins
- Created
- 8 months ago
- Last Updated
- today
- Language
- Shell
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
shared-worktree-safety
Invariants for working in a git checkout that another agent or human may be writing to at the same time — capture a baseline, preserve dirty paths you do not own, treat mid-run file changes as a concurrency signal, stage narrowly, and re-check ownership before every external write. Use whenever parallel agents, background tasks, or a human share one worktree, before any commit/push/tracker write in a shared tree, or when files change underneath you mid-run.
worktree
Isolate risky or parallel file-mutating work in a git worktree so the main tree's uncommitted changes are never clobbered. For fan-out agents that edit files, throwaway experiments, or any change you may want to discard cleanly.
safe-worktree
Run several agents or sessions on one repository without stealing each other's work. Use before starting feature work, before any commit or push when other sessions may be open, and when a dev server has to run from a second copy of the repo. Triggers on "work on this in parallel", "another session", "start a branch", "set up a worktree", "before I commit", "did someone else change this", "the branch changed", "clean up this branch".