.claude/skills/git-worktree-workflow/SKILL.md
Use git-wt to manage Git Worktrees for efficient parallel development. Handle feature branches, bug fixes, and experimental work in isolated worktrees for faster context switching.
npx skillsauth add asonas/dotfiles git-worktree-workflowInstall 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.
Leverage git-wt to create and manage Git Worktrees for parallel development environments.
When this skill is activated, the following workflow will be executed:
# List existing worktrees
git wt
# Create worktree for feature/feature-name
git wt feature/[feature-name]
# Create from specific branch
git wt feature/[feature-name] origin/main
# Create worktree for hotfix/fix-description
git wt hotfix/[fix-description] origin/main
# Create worktree for experiment/experiment-name
git wt experiment/[experiment-name]
# Switch to existing worktree
git wt [branch-name-or-worktree-name]
If docker compose up was run inside the worktree, stop the containers first. Docker Compose uses the worktree directory name as the project name, so containers keep running and occupy ports even after you leave the worktree.
# Stop Docker Compose services started in the worktree
docker compose -p [worktree-dir-name] down
# Safely delete worktree and branch (only if merged)
git wt -d [branch-name]
# Force delete (with unmerged changes)
git wt -D [branch-name]
Create Feature Worktree
git wt feature/new-component
Test and Implementation
Sync with Main Branch
# Fetch latest from main
git fetch origin
git merge origin/main
Create and Merge PR
Cleanup Worktree
# Stop Docker Compose services if started in the worktree
docker compose -p [worktree-dir-name] down
git wt -d feature/new-component
# While working on feature/payment-integration
# 1. Create hotfix worktree without interrupting current work
git wt hotfix/critical-security-fix origin/main
# 2. Apply fix and push
git add .
git commit -m "Fix critical security vulnerability"
git push -u origin hotfix/critical-security-fix
# 3. Return to original work
git wt feature/payment-integration
# 4. Stop any Docker Compose services, then delete worktree
docker compose -p critical-security-fix down
git wt -d hotfix/critical-security-fix
Configure per-project settings:
# Set worktree base directory
git config wt.basedir "../{gitroot}-worktrees"
# Copy ignored files like .env
git config wt.copyignored true
# Install dependencies after creating worktree
git config --add wt.hook "npm install"
git config --add wt.hook "bundle install"
Consistent Naming Convention
Regular Cleanup
git wtDependency Management
wt.copyignoredClear Context
# Use force delete
git wt -D [branch-name]
# Manual deletion if needed
rm -rf ../[worktree-dir]
git worktree prune
If docker compose up fails with "port is already allocated", another worktree's containers may still be running:
# Find which compose project holds the port
docker ps --filter "publish=<port>" --format "table {{.Names}}\t{{.Ports}}"
# List all running compose projects
docker compose ls
# Stop the orphaned project
docker compose -p <project-name> down
# Show detailed worktree information
git worktree list --porcelain
# Enable copying of gitignored files
git config wt.copyignored true
data-ai
Summarize the day's work and append to the daily note in Obsidian.
data-ai
memory-vector と memory-graph を横断検索して過去の記憶を呼び出す。「思い出して」「覚えていますか」「前に話した」等の記憶呼び出し時に使う。
development
Review GitHub Pull Requests. When given a PR URL, fetches diff and comments using gh command, then performs objective and critical code review.
tools
Use when starting the day. Organizes tasks, calendar, and context from previous sessions, then coaches through blockers on Linear issues via interactive dialogue.