← Back to list

using-git-worktrees
by ReinaMacCredy
Agent Skills (compatible with Claude Code, Codex, and more—for details visit: https://agentskills.io/home) with Conductor planning, Beads tracking, and TDD for AI-assisted development
⭐ 23🍴 3📅 Jan 17, 2026
SKILL.md
name: using-git-worktrees description: Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Using Git Worktrees
Core Principles
- Systematic selection - Follow priority: existing dir > CLAUDE.md > ask user
- Safety first - Always verify .gitignore for project-local worktrees
- Clean baseline - Run tests before starting work
Announce: "I'm using the using-git-worktrees skill to set up an isolated workspace."
Quick Reference
| Situation | Action |
|---|---|
.worktrees/ exists | Use it (verify .gitignore) |
worktrees/ exists | Use it (verify .gitignore) |
| Both exist | Use .worktrees/ |
| Neither exists | Check CLAUDE.md → Ask user |
| Not in .gitignore | Add immediately + commit |
| Tests fail | Report failures + ask before proceeding |
Basic Workflow
# Check existing
ls -d .worktrees worktrees 2>/dev/null
# Verify gitignore (project-local only)
grep -q "^\.worktrees/$" .gitignore
# Create
git worktree add .worktrees/$BRANCH -b $BRANCH
cd .worktrees/$BRANCH
# Setup + verify
npm install # or cargo build, pip install, etc.
npm test # must pass before starting
Anti-Patterns
- ❌ Skipping .gitignore - Worktree contents pollute git status
- ❌ Assuming location - Always follow priority order
- ❌ Ignoring test failures - Can't distinguish new vs pre-existing bugs
- ❌ Hardcoding setup - Auto-detect from package.json, Cargo.toml, etc.
References
- Creation Steps - Full setup process with examples
- Safety Verification - .gitignore checks and directory selection
Related
- conductor - Design approval triggers worktree creation
- finishing-a-development-branch - Cleanup after work complete
- maestro-core - Plugin coordination context
Score
Total Score
75/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
1ヶ月以内に更新
+10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon
