ワンクリックで
gwt
Manage git worktrees using a centralized worktrees folder. Use for parallel development, PR reviews, or isolated work.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Manage git worktrees using a centralized worktrees folder. Use for parallel development, PR reviews, or isolated work.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
This skill should be used when the user asks to "plan a feature", "create PRD", "interview me about requirements", "define stories", "write a spec", "break down feature into tasks", "create implementation plan", "help me scope this feature", "what questions should I answer", or discusses feature planning. Covers the PRD interview process, spec structure, story atomization, and 4-phase workflow from idea to Dex tasks.
This skill should be used when the user asks about "parallel agents", "background tasks", "run_in_background", "non-blocking agents", "check agent progress", "TaskOutput", "retrieve agent results", or discusses running multiple agents concurrently. Covers patterns for launching agents in background, monitoring progress, and retrieving results.
This skill should be used when implementing features from a PRD spec, tracking implementation progress, or resuming work across sessions. Covers Dex task management for PRD story execution, daily workflows, and skill auto-loading.
This skill should be used when the user asks for "browser tests", "playwright tests", "end-to-end testing", "test user flows", "E2E coverage", "integration tests for UI", "page object pattern", "/e2e command", or discusses automated browser testing. Covers the E2E test loop workflow, Playwright patterns, page objects, and selector strategies.
This skill should be used when the user asks to "improve test coverage", "add unit tests", "TDD", "test this module", "write tests for", "increase coverage", "/ut command", or discusses unit testing strategies. Covers the unit test loop workflow, React Testing Library best practices, query priorities, and coverage improvement strategies.
Creates and manages Biome GritQL custom lint rules to enforce coding patterns. Use when creating linter rules, enforcing code conventions, preventing anti-patterns, or when the user mentions Biome, GritQL, custom lint rules, or AST-based linting.
| name | gwt |
| description | Manage git worktrees using a centralized worktrees folder. Use for parallel development, PR reviews, or isolated work. |
| author | Somto Odera |
| version | 1.1.0 |
| date | "2026-02-01T00:00:00.000Z" |
Nested worktree directories cause Next.js Turbopack to detect multiple lockfiles, IDE file watchers to get confused, and build tools to traverse into nested worktrees. Sibling worktrees clutter the code directory.
Use a centralized worktrees/ folder to keep all worktrees organized and your main code directory clean.
~/code/
├── my-project/ # main repo
├── other-project/ # another repo
└── worktrees/ # all worktrees live here
├── my-project--feat-auth/
├── my-project--fix-bug/
└── other-project--feat-x/
Naming: {repo-name}--{branch-name} (double dash separator, slashes become dashes)
gwt new <branch> [from] # Create worktree (copies .env files)
gwt ls # List worktrees for current repo
gwt go <branch> # Output path (use: cd $(gwt go feat))
gwt switch <branch> # Copy "cd <path> && claude" to clipboard
gwt rm <branch> # Remove worktree + delete branch
gwt here # Show current worktree info
gwt path <branch> # Alias for 'go'
--json - Machine-readable output--no-env - Skip .env file copying--keep-branch - Don't delete branch on rmGWT_WORKTREE_DIR - Override worktrees directory (default: ../worktrees)# Create worktree
gwt new feat/my-feature
# Copy switch command to clipboard and get instructions
gwt switch my-feature
# Paste the command to switch and start Claude session
# (command is already in clipboard)
# Switch to existing worktree
gwt switch auth # fuzzy matches feat-auth, fix-auth, etc.
Claude Code's working directory resets between Bash calls. Two approaches:
Option 1: New session (recommended for long work)
gwt switch <branch> # Copies command, tells user to paste
User starts new Claude session in the worktree.
Option 2: Full paths (for quick operations)
# Work with full paths from main session
WT=$(gwt go my-feature)
cd $WT && bun install
cd $WT && bun run check-types
Agents can create and operate on multiple worktrees without switching sessions:
# Setup phase: create worktrees
gwt new feat/auth
gwt new feat/payments
gwt new fix/bug-123
# Get paths
AUTH_WT=$(gwt go auth)
PAY_WT=$(gwt go payments)
BUG_WT=$(gwt go bug)
# Install deps in parallel (if needed)
cd $AUTH_WT && bun install &
cd $PAY_WT && bun install &
cd $BUG_WT && bun install &
wait
# Work on each with full paths
# Read files
cat $AUTH_WT/src/lib/auth.ts
# Edit files (use full path in Edit tool)
# file_path: /Users/.../worktrees/project--feat-auth/src/lib/auth.ts
# Run commands
cd $AUTH_WT && bun run check-types
cd $PAY_WT && bun run test
For complex parallel work, spawn subagents per worktree:
# Create worktrees first
gwt new feat/a
gwt new feat/b
# Then use Task tool to spawn agents:
# - Agent 1: "Work on feat/a at $(gwt go a)"
# - Agent 2: "Work on feat/b at $(gwt go b)"
Each subagent works independently with its worktree path.
# Get JSON list of worktrees
gwt ls --json
# Get current worktree info as JSON
gwt here --json
# Parse in scripts
gwt ls --json | jq '.[].path'
# Remove worktree and branch
gwt rm my-feature
# Keep the branch, just remove worktree
gwt rm my-feature --keep-branch
Worktrees share the same git database as the main repo:
origin)# From worktree, PRs work normally
cd $(gwt go my-feature)
gh pr create --title "My feature" # Creates PR against main repo
.env files are automatically copied from main repo on creationgwt go auth matches feat-authfeat/auth → repo--feat-authbun install after creating a worktree~/code/worktrees/