Git worktrees
Skill jagreehal/jagreehal-claude-skills/skills/git-worktrees
Isolates feature work in a dedicated git worktree with directory selection, gitignore checks, setup, and baseline tests. Use this skill when starting isolated feature work, before multi-task plans, parallel branches, or discardable experiments. Do not use when/for finishing and merging work (use branch-completion) or dispatching parallel agents without a worktree need (use parallel-agent-dispatch).From its SKILL.md
npx -y skills add jagreehal/jagreehal-claude-skills --skill git-worktreesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.1 KB, as published. Nobody here has run it
Git Worktrees
Critical rules
- Prefer the bundled script over hand-rolled commands.
- Project-local worktree dirs must be git-ignored before use.
- Run baseline tests before starting work; ask before proceeding on failure.
- Directory priority: existing
.worktrees/>worktrees/> CLAUDE.md > ask. Never guess. - Always report the worktree path when ready.
- Before manual flows or directory edge cases, read references/directory-and-setup.md.
Workflow
- Prefer:
scripts/create-worktree.sh <branch-name> [base-dir](from this skill). Exit 2 = not ignored; exit 3 = baseline tests failed. - If the script cannot run or you must deviate: follow directory priority, gitignore check, create branch worktree, project setup, baseline tests (see reference).
- Report location and baseline status; only then implement.
- Cleanup via
git worktree remove(orbranch-completionfor land/discard options).
Resources
- scripts/create-worktree.sh — deterministic create + setup + baseline. Run when creating a worktree; use
--helpfor usage and exit codes. - references/directory-and-setup.md — directory priority, gitignore, manual steps, cleanup. Read when not using the script or on edge cases.
Validation
- Directory chosen by priority order
- Project-local dir git-ignored
- Setup ran; baseline tests pass (or failures reported and approved)
- Worktree path reported
Constraints
- Skip for trivial one-line fixes on the current branch.
- Related:
design-exploration,implementation-planning,parallel-agent-dispatch,branch-completion.