create-worktree-skill — Claude Code skill for Git worktrees
Creates a separate Git worktree for a chosen branch and prepares its ports and configuration. Use it to run multiple project branches side by side.
npx skills add disler/claude-code-hooks-multi-agent-observability --skill create-worktree-skill -a claude-codeWhat create-worktree-skill does
The create-worktree-skill skill sets up a Git worktree under trees/<branch-name>. Each environment has its own ports, database, and configuration, allowing several project instances to run at the same time. Port assignments are calculated automatically, with an optional manual offset.
To build the environment, the skill invokes /create_worktree_prompt <branch-name> [port-offset]. The command prepares environment files, installs server and client dependencies, and starts both services. Its output includes access URLs and instructions for managing the new worktree.
A branch name is required. If you leave it out, the skill asks you to provide one. Dependency installation requires bun. An existing worktree for the same branch or uncommitted Git changes can prevent setup from completing.
What it helps with
- Create a dedicated worktree for a feature branch
- Run multiple branches of one project at once
- Assign separate ports to parallel application instances
- Prepare an isolated environment for testing a fix
- Install dependencies and launch the client and server in a new worktree
Example prompts for the agent
- Create a separate worktree for the
feature-dashboardbranch. - Set up the
hotfix-securitybranch with a port offset of5. - Create separate worktrees for
feature-a,feature-b, andfeature-c.
How to install create-worktree-skill
1Skills CLI (Vercel)
npx skills add disler/claude-code-hooks-multi-agent-observability --skill create-worktree-skill -a claude-code2Manually: put the files in place
~/.claude/skills/create-worktree-skill/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/create-worktree-skill/
1Skills CLI (Vercel)
npx skills add disler/claude-code-hooks-multi-agent-observability --skill create-worktree-skill -a codex2Manually: put the files in place
.agents/skills/create-worktree-skill/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add disler/claude-code-hooks-multi-agent-observability --skill create-worktree-skill -a cursor2Manually: put the files in place
.cursor/skills/create-worktree-skill/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install disler/claude-code-hooks-multi-agent-observability create-worktree-skill2Manually: put the files in place
.github/skills/create-worktree-skill/SKILL.md1Skills CLI (Vercel)
npx skills add disler/claude-code-hooks-multi-agent-observability --skill create-worktree-skill -a gemini-cli2Platform CLI
gemini skills install https://github.com/disler/claude-code-hooks-multi-agent-observability --path .claude/skills/create-worktree-skillManually: put the files in place
.devin/skills/create-worktree-skill/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add disler/claude-code-hooks-multi-agent-observability --skill create-worktree-skill -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about create-worktree-skill
How do I install create-worktree-skill in Claude Code?
Run npx skills add disler/claude-code-hooks-multi-agent-observability --skill create-worktree-skill -a claude-code. The skill will be available at ~/.claude/skills/create-worktree-skill/SKILL.md.
What does create-worktree-skill do?
It creates a Git worktree with separate ports, database, and configuration. It also installs the server and client dependencies and starts both services.
What do I need before creating a worktree?
Provide a Git branch name and have bun installed for dependency setup. Uncommitted changes or an existing worktree for that branch can block creation.