用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill create-worktree命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | create-worktree |
| description | >- Use when this capability is needed. |
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.
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.
First, use the Write tool to create a temporary prompt file at /tmp/workmux-prompt-BRANCH_NAME.md with the composed prompt from step 2. Using the Write tool avoids shell escaping issues with special characters in the prompt text.
Important: Do not delete the prompt file immediately after launching. workmux runs asynchronously and may not read the file for several seconds. Wait and verify success before cleaning up.
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" "/tmp/workmux-prompt-BRANCH_NAME.md"
If the user requested a specific base branch:
bash "SCRIPTS_DIR/launch-workmux" "BRANCH_NAME" "/tmp/workmux-prompt-BRANCH_NAME.md" --base "BASE_BRANCH"
The script outputs the workmux log directly and cleans up its own log file. Verify success:
git worktree list
If the log shows success and the worktree appears in the list, clean up the prompt file:
rm -f /tmp/workmux-prompt-BRANCH_NAME.md
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 creationSource: cboone/cboone-cc-plugins — distributed by TomeVault.