- Home
- Skills
- Xenitv1
- Claude Code Maestro
- Git Worktrees
git-worktrees_skill
- JavaScript
202
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill xenitv1/claude-code-maestro --skill git-worktrees- SKILL.md8.4 KB
Overview
This skill creates isolated Git workspaces so you can develop features without contaminating the primary repository. It chooses a sensible worktree directory, verifies safety (must be ignored for project-local locations), runs project setup, and ensures a clean test baseline before you start. Cross-platform support for Unix/macOS and Windows is included.
How this skill works
The skill inspects the repository for preferred directories (.worktrees then worktrees), checks CLAUDE.md for overrides, and asks you if no preference exists. For project-local worktrees it enforces that the destination directory is listed in .gitignore before creating the worktree. After creation it runs dependency installs and project tests to confirm a clean baseline and reports the full worktree path and test results.
When to use it
- Starting a new feature branch that needs isolation
- Running long processes or experiments without affecting main workspace
- Working on multiple branches in parallel
- When you must avoid stashing or disrupting current work
- Before executing an implementation plan from planning tools
Best practices
- Prefer .worktrees/ if present; fall back to worktrees/ or a global config path
- Always verify project-local worktree directories are ignored via git check-ignore
- Run project setup (npm/pip/poetry/cargo/go) automatically after creation
- Run the project's test suite and refuse to proceed on failing baseline without approval
- Remove and prune worktrees after feature merge to avoid stale entries and disk use
Example use cases
- Create .worktrees/feature-x and run npm install + npm test before coding
- Spin up a global worktree under %USERPROFILE% to keep work outside the repo
- Run an experimental refactor in a worktree so CI and main workspace remain stable
- Develop multiple features concurrently without switching branches
- Use worktree for long-running debug sessions while continuing other work
FAQ
The skill will add the directory to .gitignore and commit that change before creating the worktree to prevent accidental tracking of worktree contents.
Can I skip running tests before starting work in the new worktree?
You can choose to proceed after explicit confirmation, but the skill defaults to halting on failing tests to avoid mixing pre-existing failures with new changes.