using-git-worktrees · Isolated Git Workspaces

using-git-worktrees sets up an isolated workspace before feature work: it first detects whether you're already isolated (telling worktrees apart from submodules) and skips creation if so; prefers the platform's native worktree tool, falling back to manual git worktree when none exists.
Directory choice follows a priority order (explicit preference → project-local .worktrees/ → default .worktrees/), and project-local directories are verified git-ignored before creation. Dependencies install automatically by language, then baseline tests confirm a clean starting point.
Example invocation: "Set up an isolated worktree — I'm starting the login feature."
Full brief
Positioning
using-git-worktrees is the environment isolator before feature work: it makes sure implementation happens in an isolated workspace so the current branch stays clean. It sets up the environment and verifies the baseline — it writes no product code.
Core capabilities
- Detect before creating: Step 0 checks for an existing linked worktree via git commands (with a submodule guard against false positives); already isolated means creation is skipped.
- Native tools first: uses the platform's native worktree tool when available (EnterWorktree, /worktree, etc.); manual
git worktreeonly as fallback, avoiding phantom state the harness can't see. - Directory priority: explicit user preference > project-local
.worktrees/(hidden wins) >worktrees/> default.worktrees/at the project root. - Safety verification: project-local directories must pass
git check-ignorebefore use — otherwise they're added to.gitignoreand committed first, so a worktree is never accidentally committed into the repo. - Auto project setup: dependency installation by language (Node.js / Rust / Python / Go).
- Baseline tests: a test run confirms a clean starting point; failures are reported and the human decides whether to proceed.
Workflow
- Detect existing isolation (Step 0): already in a linked worktree → skip creation
- Create the workspace: consent (unless a preference is declared) → native tool first → git fallback (with .gitignore verification)
- Project setup: auto dependency install
- Baseline tests:
Worktree ready at <path> / Tests passing (<N> tests, 0 failures)
Inputs & outputs
| Input | Notes |
|---|---|
| Feature / branch name | Names the workspace and branch |
| Workspace directory preference | Optional; auto-selected by priority otherwise |
Output: isolated workspace path + baseline test verdict (test and failure counts) + ready report.
Boundaries with adjacent skills
- executing-plans: this skill prepares the isolated environment and verifies the baseline; executing-plans runs the implementation plan inside it.
Fit
- Isolating the current workspace before starting a feature
- Preparing a clean environment before executing a plan
- Parallel branch development without cross-contamination
- Baseline verification so later failures can be attributed to your own changes
Before you start
- No API key; git required.
- Creation asks for consent unless a preference is already declared.
- Baseline failures are reported first — proceeding is the human's call; if the sandbox blocks creation, work in place and say so.
using-git-worktrees is part of the Aiglade Skill library. Invoke it from the Aiglade chat box in plain language.