Using Git Worktrees
SkillDev toolsUse when starting nontrivial feature work that should stay isolated from the main checkout. Creates or reuses a safe git worktree with sensible defaults.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Using Git Worktrees skill
What this skill tells your AI
The instructions your AI receives, as published by rock3r/spectre in .agents/skills/using-git-worktree/SKILL.md and read by ahel’s review.
Purpose
Create isolated workspaces for implementation work without disturbing the main checkout.
Before Creating Anything
Check whether isolation already exists:
- Are you already inside a worktree?
- Are you already on a non-main branch?
If either is true, report that isolation already exists and skip worktree creation.
Directory Selection
Prefer these locations in order:
.worktrees/worktrees/- create
.worktrees/
Before creating a project-local worktree directory, verify it is gitignored. If it is not, fix that first.
Creation Flow
- Determine the current branch and default branch.
- Choose the base branch.
- Create a new worktree with a descriptive branch name.
- Run an initial project sanity check in the worktree.
Example commands:
git rev-parse --git-common-dir
git rev-parse --git-dir
git rev-parse --abbrev-ref HEAD
git worktree add .worktrees/<branch-name> -b <branch-name> <base-branch>
./gradlew build
Spectre Notes
- Keep
.plans/in the root checkout rather than inside the worktree. - Use absolute paths when switching between Spectre and prior-art repos under
~/src. - Prefer a worktree for implementation-heavy tasks, not for tiny doc-only edits.
Signals
- GitHub stars
- 35
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
using-git-worktree- Source
- github.com/rock3r/spectre