From create-worktree
Create a new git worktree, branch, and tmux window using workmux, with a task prompt injected into the new session. Use when the user says "create worktree", "new worktree", "start working on", "spin up a worktree", or asks to create a worktree for a general task (not tied to a specific GitHub issue -- use create-worktree-from-issue for that). Requires workmux to be installed.
How this skill is triggered — by the user, by Claude, or both
Slash command
/create-worktree:create-worktreeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create a dedicated worktree + tmux window via `workmux add`, with a task prompt injected into the new agent session.
Create a dedicated worktree + tmux window via workmux add, with a task prompt injected into the new agent session.
The user provides either:
TYPE/SLUG formatBranch naming rules (TYPE/SLUG):
fix if the user mentions "fix", "bug", "patch", or similar. Use feature for everything else.Examples:
feature/adding-dark-modefix/auth-timeoutfeature/refactor-config (used as-is)Build a prompt string that gives the new agent context about its task:
Work on: [user's task description]
Branch: [BRANCH_NAME]
Keep the prompt concise -- a few sentences at most. Use the user's own description of the task as the core content.
If the user provided only a branch name with no description, derive a human-readable description from the branch name (e.g., feature/add-dark-mode becomes "Work on: add dark mode").
Important: The workmux add command must be fully detached from the Claude Code process. workmux creates tmux windows and spawns new Claude sessions, which cannot initialize while the parent Claude Code process is alive. The launch-workmux script handles backgrounding, detaching, waiting, and outputting the log.
Template escaping: workmux renders the prompt body through MiniJinja, so any literal {{, {%, or {# token in the task description (e.g. GitHub Actions ${{ inputs.x }} expressions, Jinja/Liquid/Tera/Helm/Vue templates, Handlebars-style snippets) would otherwise be parsed as a template variable reference and rejected with Template uses undefined variables. The launch-workmux script reads the prompt from stdin, writes an escaped temporary prompt file for workmux add -P, and removes that temporary file after workmux add exits. Each escaped delimiter renders back to the literal characters, so the prompt stored at <worktree>/.workmux/PROMPT-*.md matches the original input.
Locating the script: At the start of your session, locate the script by searching for **/create-worktree/scripts/launch-workmux. Note the absolute path and use it with bash as the command prefix in all subsequent invocations. Do not use a shell variable, since shell state does not persist between commands.
In the example below, SCRIPTS_DIR/launch-workmux is a placeholder for the script's quoted absolute path (e.g., "/absolute/path/to/plugins/create-worktree/scripts/launch-workmux"). Always invoke via bash followed by the quoted path. This ensures the command token is bash, which matches stable allowlist patterns regardless of the plugin's installed path or version.
Do not specify --base. Let workmux use its default. Only pass --base BRANCH if the user explicitly requests a specific base branch.
Then launch the worktree:
bash "SCRIPTS_DIR/launch-workmux" "BRANCH_NAME" <<'WORKMUX_PROMPT'
Work on: [user's task description]
Branch: [BRANCH_NAME]
WORKMUX_PROMPT
If the user requested a specific base branch:
bash "SCRIPTS_DIR/launch-workmux" "BRANCH_NAME" --base "BASE_BRANCH" <<'WORKMUX_PROMPT'
Work on: [user's task description]
Branch: [BRANCH_NAME]
WORKMUX_PROMPT
The script outputs the workmux log directly and cleans up its own log file. Verify success:
git worktree list
After confirming the worktree exists in git worktree list, report:
workmux is not installed, inform the user and suggest installing it--open-if-exists opens it, note that the prompt is only injected on initial creationCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub cboone/agent-harness-plugins