About prd-worktree
prd-worktree is a skill for creating Git worktrees for PRDs, with concise, descriptive branch names based on their titles. It is for users starting PRD-based feature work and can copy local Claude settings into the new worktree.
Key features
- 01Identify a PRD by number
- 02Create a descriptive title-based branch
- 03Branch new work from main
- 04Copy local Claude settings
Use cases
- 01Create an isolated workspace for PRD work
- 02Identify a PRD number from conversation context
- 03Carry local settings into a new worktree
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ vtmocanu/ skills --skill prd-worktreeAfter installing, type/prd-worktreein Claude Code to confirm it loaded.
Bundled filescreate.sh
Details
From the project READMEVendored from vfarcic/dot-ai
.claude/skills/dot-ai-worktree-prd/(MIT, Copyright (c) 2025 Viktor Farcic). Original author: Viktor Farcic. Renamed fromworktree-prd.
Create Git Worktree for PRD
Create a git worktree with a descriptive branch name based on the PRD title.
Workflow
Step 1: Identify the PRD
Infer the PRD number from the current conversation. Look for references like "PRD 353", "PRD #353", or "prd-353".
If not found, ask the user: "Which PRD should I create a worktree for? (e.g., 353)"
Step 2: Create the Worktree
If the PRD title is already known from conversation context, pass both number and title:
bash "<this skill's directory>/create.sh" [number] "[title]"
Otherwise let the script look it up from prds/:
bash "<this skill's directory>/create.sh" [number]
Step 3: Copy Local Settings
Copy .claude/settings.local.json from the main repo to the new worktree so local settings (which are not tracked in git) are available:
cp .claude/settings.local.json [worktree_path]/.claude/settings.local.json
If the source file doesn't exist, skip this step silently.
Step 4: Handle Result
- If
SUCCESS=true: report the branch name, worktree path, and suggestcd [worktree_path] - If
ERROR=true: show the errors to the user and ask how to proceed
Guidelines
- Descriptive names: Branch names describe the feature, not just the PRD number
- Base on main: Always branches from
mainfor new feature work - Clean names: The script keeps branch names concise and URL-safe