create-worktree-skill
Use when the user explicitly asks for a SKILL to create a worktree. If the user does not mention "skill" or explicitly request skill invocation, do NOT trigger this. Only use when user says things like "use a skill to create a worktree" or "invoke the worktree skill". Creates isolated git worktrees with parallel-running configuration.
Best use case
create-worktree-skill is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Use when the user explicitly asks for a SKILL to create a worktree. If the user does not mention "skill" or explicitly request skill invocation, do NOT trigger this. Only use when user says things like "use a skill to create a worktree" or "invoke the worktree skill". Creates isolated git worktrees with parallel-running configuration.
Use when the user explicitly asks for a SKILL to create a worktree. If the user does not mention "skill" or explicitly request skill invocation, do NOT trigger this. Only use when user says things like "use a skill to create a worktree" or "invoke the worktree skill". Creates isolated git worktrees with parallel-running configuration.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "create-worktree-skill" skill to help with this workflow task. Context: Use when the user explicitly asks for a SKILL to create a worktree. If the user does not mention "skill" or explicitly request skill invocation, do NOT trigger this. Only use when user says things like "use a skill to create a worktree" or "invoke the worktree skill". Creates isolated git worktrees with parallel-running configuration.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/create-worktree-skill/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How create-worktree-skill Compares
| Feature / Agent | create-worktree-skill | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use when the user explicitly asks for a SKILL to create a worktree. If the user does not mention "skill" or explicitly request skill invocation, do NOT trigger this. Only use when user says things like "use a skill to create a worktree" or "invoke the worktree skill". Creates isolated git worktrees with parallel-running configuration.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Worktree Creator Skill This skill enables creating fully configured git worktrees for parallel development with isolated ports, databases, and configuration. ## When to use this skill Use this skill when: - User asks to create a git worktree - User wants to set up parallel development environments - User needs to run multiple instances simultaneously - User mentions working on multiple branches at once - User wants isolated testing environments ## Instructions ### Step 1: Understand the request Extract from the user's request: - **Branch name** (required): The git branch to create the worktree from - If the branch name is not provided, stop and ask the user to provide a branch name - **Port offset** (optional): Custom port offset (if not provided, auto-calculated) ### Step 2: Invoke the slash command Use the SlashCommand tool to run: ``` /create_worktree_prompt <branch-name> [port-offset] ``` **Examples:** - `/create_worktree_prompt feature-auth` - Creates worktree with auto-calculated ports - `/create_worktree_prompt fix-bug 2` - Creates worktree with port offset 2 (ports 4020, 5193) ### Step 3: Share results The `/create_worktree_prompt` command will: - Create the git worktree in `trees/<branch-name>` - Configure isolated ports (auto-incremented to avoid conflicts) - Set up environment files with proper configuration - Install dependencies for server and client - Start both services automatically - Provide access URLs and management instructions Share the command output with the user, highlighting: - Access URLs for the dashboard - Ports being used - How to stop/restart the worktree - How to remove it later ## Examples ### Example 1: Simple worktree creation **User:** "Create a worktree for the feature-dashboard branch" **Your response:** Use SlashCommand to run `/create_worktree_prompt feature-dashboard` ### Example 2: Worktree with specific port offset **User:** "Set up a parallel environment on branch hotfix-security with port offset 5" **Your response:** Use SlashCommand to run `/create_worktree_prompt hotfix-security 5` ### Example 3: Multiple worktrees **User:** "I need worktrees for branches: feature-a, feature-b, and feature-c" **Your response:** 1. Use SlashCommand to run `/create_worktree_prompt feature-a` 2. Use SlashCommand to run `/create_worktree_prompt feature-b` 3. Use SlashCommand to run `/create_worktree_prompt feature-c` Each will automatically get unique ports (4010/5183, 4020/5193, 4030/5203). ## Related capabilities - The created worktree will run automatically with isolated ports, database, and configuration - Each worktree is completely independent and can run simultaneously with others ## Troubleshooting If the command fails, common issues: - Branch name already exists as a worktree - Ports are in use (command kills them automatically) - Missing dependencies (ensure bun is installed) - Git worktree errors (handle uncommitted changes first) The slash command provides detailed error messages and suggestions.
Related Skills
create-adaptable-composable
Create a library-grade Vue composable that accepts maybe-reactive inputs (MaybeRef / MaybeRefOrGetter) so callers can pass a plain value, ref, or getter. Normalize inputs with toValue()/toRef() inside reactive effects (watch/watchEffect) to keep behavior predictable and reactive. Use this skill when user asks for creating adaptable or reusable composables.
ralph-tui-create-json
Convert PRDs to prd.json format for ralph-tui execution. Creates JSON task files with user stories, acceptance criteria, and dependencies. Triggers on: create prd.json, convert to json, ralph json, create json tasks.
ralph-tui-create-beads
Convert PRDs to beads for ralph-tui execution. Creates an epic with child beads for each user story. Use when you have a PRD and want to use ralph-tui with beads as the task source. Triggers on: create beads, convert prd to beads, beads for ralph, ralph beads.
ralph-tui-create-beads-rust
Convert PRDs to beads for ralph-tui execution using beads-rust (br CLI). Creates an epic with child beads for each user story. Use when you have a PRD and want to use ralph-tui with beads-rust as the task source. Triggers on: create beads, convert prd to beads, beads for ralph, ralph beads, br beads.
create-skill-file
Guides Claude in creating well-structured SKILL.md files following best practices. Provides clear guidelines for naming, structure, and content organization to make skills easy to discover and execute.
x-create
Create viral X (Twitter) posts including short tweets, threads, and replies. Use when user wants to write X content, create posts, or mentions "create tweet", "write thread", "x-create", "写推文", "创作推文". Supports 5 post styles with customizable templates. First-time users go through onboarding to set up profile.
convex-create-component
Designs and builds Convex components with isolated tables, clear boundaries, and app-facing wrappers. Use this skill when creating a new Convex component, extracting reusable backend logic into a component, building a third-party integration that owns its own tables, packaging Convex functionality for reuse, or when the user mentions defineComponent, app.use, ComponentApi, ctx.runQuery/runMutation across component boundaries, or wants to separate concerns into isolated Convex modules.
worktree-manager-skill
Comprehensive git worktree management. Use when the user wants to create, remove, list, or manage worktrees. Handles all worktree operations including creation, deletion, and status checking.
create-new-skills
Creates new Agent Skills for Claude Code following best practices and documentation. Use when the user wants to create a new skill, extend Claude's capabilities, or package domain expertise into a reusable skill.
create-subagent
This skill should be used when creating custom subagents for Claude Code, configuring specialized AI assistants, or when the user asks about agent creation, agent configuration, or delegating tasks to subagents. Covers both file-based agents and Task tool invocation.
create-plan
Create comprehensive implementation plan in .plans directory based on analysis or report. Use when user asks to create a plan, plan implementation, design a solution, or structure work for a feature/refactor/fix.
create-mcp-skill
Create a new skill that uses an MCP server, following best practices from the MCP CLI guide. Use when user wants to create a skill for a new MCP server or integrate MCP functionality into a skill.