pbl/skills/using-git-worktrees/SKILL.md
Use when starting feature work that needs isolation from current workspace or before executing implementation plans
npx skillsauth add tim-hub/powerball using-git-worktreesInstall 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.
Create an isolated git worktree for feature work, with safety verification and clean baseline.
Priority order:
.worktrees/ or worktrees/ in project root. If both exist, .worktrees/ wins..worktrees/ (project-local, hidden) as default.For project-local directories, verify the worktree directory is git-ignored:
git check-ignore -q .worktrees 2>/dev/null
If NOT ignored: Add to .gitignore and commit before proceeding. This prevents worktree contents from polluting git status.
git worktree add .worktrees/$BRANCH_NAME -b $BRANCH_NAME
cd .worktrees/$BRANCH_NAME
Then auto-detect and run project setup (e.g., npm install, pip install, go mod download) based on project files.
Run the project's test suite. If tests fail, report failures and ask whether to proceed or investigate. If tests pass, report ready.
Worktree ready at <full-path>
Tests passing (<N> tests, 0 failures)
Ready to implement <feature-name>
| Situation | Action |
|-----------|--------|
| .worktrees/ exists | Use it (verify ignored) |
| Neither exists | Check CLAUDE.md → ask user |
| Directory not ignored | Add to .gitignore + commit |
| Tests fail at baseline | Report + ask before proceeding |
Called by:
After work is complete: Remove the worktree with git worktree remove .worktrees/$BRANCH_NAME
testing
Picks the right Kubernetes Deployment update strategy (RollingUpdate / Recreate / Blue-Green / Canary) for the situation. Use when configuring a new Deployment, changing rollout config, or deciding how to ship a risky change.
tools
Translates a markdown file to a target language, preserving structure. Use when the user needs a markdown file translated.
development
Translates text between any two languages while preserving source format. Use when the user needs to translate plain text, code, or markdown content.
testing
Generates written content — blog posts, social posts, emails, and marketing copy — matched to the project's existing voice. Use when the user needs written material.