skills/start-worktree/SKILL.md
Set up a git worktree to work on multiple branches in parallel without stashing or losing in-progress changes. Use when someone says "create a worktree", "I need to work on two branches at once", "set up parallel development", "I got a hotfix while my feature is still in progress", "how do I review this PR without disrupting my work", or "can I run tests on both branches simultaneously?". Each worktree is a separate directory sharing the same git history.
npx skillsauth add maestria-co/ai-playbook start-worktreeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Set up git worktrees to enable parallel work on multiple branches without stashing or losing in-progress changes. Worktrees create separate working directories that share the same .git history, allowing you to have multiple branches checked out simultaneously. Useful for working on a hotfix while a feature is in progress, reviewing PRs without disrupting current work, or running tests on different branches.
| Scenario | Why Worktree Helps | |----------|-------------------| | Hotfix while feature in progress | No stash needed; switch contexts instantly | | Reviewing a PR | Test PR code without disturbing your working branch | | Running tests on two branches | Compare behavior side-by-side | | Long-running migration | Keep migration branch alive while doing other work |
git worktree add ../project-[branch-name] [branch-name]
git worktree add -b [new-branch] ../project-[new-branch] main
git worktree add ../project-[hash] [commit-hash]
The new directory is placed as a sibling to the main repo (../) — never inside it.
Worktrees share .git history but not dependencies or build artifacts. After creating:
cd ../project-[branch-name]
# Install dependencies
npm install # Node.js
pip install -r requirements.txt # Python
dotnet restore # .NET
# If dev server conflicts with main worktree's port:
PORT=3001 npm run dev
# See all worktrees
git worktree list
# Remove when done
git worktree remove ../project-[branch-name]
# Clean up after manual directory deletion
git worktree prune
# Repair after moving a worktree directory
git worktree repair ../new-location/project-[branch]
Before creating:
git stash suffice?After creating:
Before removing:
cd'd into the worktree directory../) — never nested inside the main repodevelopment
Writes and runs a test suite for a piece of code, covering happy path, edge cases, error cases, and security cases. Use when: implementation is complete and needs test coverage, a bug needs a reproduction test and fix validation, or code needs coverage before a refactor. Do not use when: the code under test is not yet implemented, or the spec is still unclear.
testing
Use when creating a new skill, editing an existing skill, or helping a user author a skill for this system. Covers structure, discoverability, quality, and discipline hardening.
development
Evidence-based verification process to run before marking any task complete. Use this skill every time you're about to report that work is done — for features, bug fixes, refactoring, or any code change. This catches the most common failure mode: declaring "done" without proof. If you're finishing up and about to tell the user the task is complete, run this checklist first.
development
Teaches agents how to discover, select, and invoke skills from the skill library. Use this skill whenever you're uncertain which skill applies to a task, when composing multiple skills for complex work, or when you need to understand what skills are available. This is your go-to when facing an ambiguous task and need to figure out the right approach before diving into implementation.