
Sets up isolated Git worktrees so you can work on features without polluting your main workspace. Automatically picks the right directory (checks for existing .worktrees or worktrees folders, then CLAUDE.md preferences, then asks), verifies it won't get committed by accident, creates the worktree with a new branch, runs your project setup (npm install, cargo build, whatever), and confirms tests pass before you start. The ignore verification is critical because committing worktree contents is a mess to clean up. Required step before brainstorming moves to implementation or any subagent work starts, pairs with finishing-a-development-branch for cleanup.
$ npx -y skills add ganyuanran/aegis --skill using-git-worktrees --agent claude-codeInstalls into .claude/skills of the current project.
A worktree is an exception for simultaneously checking out another Git history, not a general safety badge. Prefer the current workspace and reuse an existing suitable worktree. A branch decision and a worktree decision are separate.
Core principle: create only with necessity and ownership evidence; pair every created worktree with a cleanup path.
Announce at start: explain which concrete checkout conflict requires a worktree.
Before mutation, record the repository root, HEAD, branch/detached state,
staged/unstaged/untracked paths, active Git operations, and:
git worktree list --porcelain
Sponsors