Dev & Engineering

Git Worktree Parallel Environment Skill

Spin up fully isolated git worktrees — separate ports, databases, and config — so parallel branch environments run side by side without conflicts.

57/ 100
Use with care

Useful, but reliability, evidence or controls still have material gaps.

See how it was scored ↓
Works as-is in
Claude Code
Stars
★ 1.5k
Last updated
8mo ago
git-worktreeparallel-developmentslash-commandenvironment-isolation
+2port-managementgit

What does this skill do, and when should you use it?

This is one of four skills bundled in the disler/claude-code-hooks-multi-agent-observability repository, located at .claude/skills/create-worktree-skill/. It is a thin wrapper: Claude Code's SlashCommand tool invokes the repo's own /create_worktree_prompt slash command, which creates a git worktree under trees/<branch-name>, assigns non-conflicting ports, writes environment files, installs dependencies, and starts services. The skill deliberately restricts its trigger: it should fire only when the user explicitly asks to use a skill to create a worktree. It depends on the companion slash command and the bun runtime, so it does not work outside the repo's .claude directory.

Extracts a required branch name and an optional port offset from the user's request (stopping to ask if no branch name is given); runs /create_worktree_prompt <branch-name> [port-offset] via the SlashCommand tool; that command creates the git worktree in trees/<branch-name>, auto-increments ports to avoid conflicts, sets up environment files, installs server and client dependencies, and starts both services automatically; then surfaces access URLs, ports in use, and how to stop, restart, or remove the worktree.

Good fit
  • A developer wants an isolated environment on the feature-dashboard branch without disturbing the current working tree
  • A team needs services from feature-a, feature-b, and feature-c running simultaneously for comparison testing
  • A hotfix on hotfix-security should use a specific port offset (e.g., 5) to avoid port collisions
  • Multiple branches each need a fully isolated testing environment with independent ports, databases, and configuration
  • The user explicitly asks to use a skill or slash command to create a worktree

How do you install this skill?

Before you start
Your agent needs
  • Shell / CLI
  • Local filesystem
Install first
  • git
  • bun
  • the repo's /create_worktree_prompt slash command in .claude/commands/

Copy the repo's .claude directory into your project root: cp -R .claude /path/to/your/project/. The skill lives at .claude/skills/create-worktree-skill/ and depends on the /create_worktree_prompt command in the same repo's .claude/commands/, so deploy them together. bun must be installed (used for dependency installation). License is not stated in the source.

Generic route: install into Claude Code manually (macOS / Linux)
tmp="$(mktemp -d)"
git clone --depth 1 https://github.com/disler/claude-code-hooks-multi-agent-observability.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/.claude/skills/create-worktree-skill" ~/.claude/skills/
rm -rf "$tmp"

Generated from the source repository and skill path; it copies only this skill's folder. If the author's install steps above differ, follow those first. To scope it to one project, replace ~/.claude/skills with that project's .claude/skills.

How do you use this skill?

Try saying

Once installed, send your agent any of these to trigger it:

  • use a skill to create a worktree for feature-auth
  • invoke the worktree skill on hotfix-security with port offset 5

In Claude Code, explicitly request the skill, e.g., 'use a skill to create a worktree for feature-auth' (without mentioning skill, it will not trigger). With a port offset: 'invoke the worktree skill on hotfix-security with port offset 5'. Multiple worktrees at once: run it once per branch (feature-a, feature-b, feature-c); ports are staggered automatically (e.g., 4010/5183, 4020/5193, 4030/5203). Troubleshooting: branch already exists as a worktree, ports in use (the command kills them automatically), missing bun dependency, or git worktree errors (handle uncommitted changes first).

What are this skill's strengths and limitations?

Pros
  • One command handles worktree creation, port allocation, environment config, dependency install, and service startup end to end
  • Ports auto-increment across parallel worktrees, eliminating manual conflict management
  • SKILL.md explicitly constrains trigger conditions, reducing false activations
  • Includes troubleshooting guidance for common failures (port conflicts, branch collisions, missing bun)
Limitations
  • Hard-depends on Claude Code's SlashCommand tool and the repo's /create_worktree_prompt command; unusable outside this .claude directory
  • Implicitly requires bun; no support for other package managers is documented
  • Part of a four-skill bundle whose README mostly covers the observability system; the skill itself lacks standalone docs and test evidence
  • License is not stated in the source, so verify before commercial use

How does this skill compare with similar options?

Side by side with related skills; every score comes from the same FSRS standard.

Skill FS score Stars Last updated License
Git Worktree Parallel Environment Skill this page 57 · Use with care ★ 1.5k 8mo ago —
Worktree Manager Skill 59 · Recommended ★ 1.5k 8mo ago —
do — Feature Development Orchestrator 47 · Use with care ★ 2.8k 5mo ago AGPL-3.0
ClawTeam Multi-Agent Coordination Skill 54 · Use with care ★ 5.5k 5mo ago MIT
ClawTeam Multi-Agent Coordination 51 · Use with care ★ 1.5k 3mo ago MIT

The same author's Claude Code Hooks Mastery project (linked in the README) covers the hook system itself; this skill instead focuses on worktree orchestration within the same Claude Code workflow ecosystem. No other comparators are named in the source.

How did FollowSkills review this skill?

FollowSkills review · FSRS-1.0
Use with care
57/ 100 5-point scale 2.9 / 5
1Utility11 / 20 · 2.8/5

Creates isolated git worktrees (with independent port/database config), explicitly scoped to trigger only when the user explicitly asks for a skill to create one — avoids accidental triggering.

2Reliability11 / 20 · 2.8/5
3Safety18 / 25 · 3.6/5
4Evidence5 / 15 · 1.7/5
5Usability7 / 10 · 3.5/5
6Maintenance5 / 10 · 2.5/5
1 2 3 4 5 6

Open a dimension to read why it scored that way

Reviewed Jul 17, 2026 Review evidence[1]

Evidence confidence:Low — Mostly static review, author material or a limited demo; useful for discovery, not high-risk decisions.

This review was completed under FSRS 1.0. Dimension scores are not converted; it is queued for re-review under FSRS 2.0.

See the full review method →

FAQ

Will it trigger if I don't say 'skill'?
No. SKILL.md explicitly states it should only fire when the user says things like 'use a skill to create a worktree' or 'invoke the worktree skill'.
How are ports assigned?
They are auto-calculated with increments to avoid conflicts; you can also pass an explicit port offset (offset 2 maps to ports 4020/5193). Ports in use are killed automatically by the command.
Can I install it standalone, outside this repo?
Not directly. It depends on the /create_worktree_prompt slash command in the same repo's .claude/commands/, so the whole .claude directory must be deployed to your project root.
What if the command fails?
Common causes: the branch already has a worktree, ports are occupied, bun is not installed, or git worktree reports uncommitted changes. The slash command provides detailed error messages and suggestions.

More skills from this repository

All from disler/claude-code-hooks-multi-agent-observability

Related skills