skills/create-worktree/SKILL.md
Create an isolated worktree for a new branch, existing branch, or PR review. Prefer repo-local worktree commands when they exist, and fall back to vanilla git worktrees otherwise.
npx skillsauth add soyio-id/skills create-worktreeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when you need one isolated worktree in the current repo.
Good fits:
Default behavior: create only. Do not start the runtime unless the user asks, or unless you ask after creation and the user opts in.
Announce at start: "I'm using the create-worktree skill to set up an isolated worktree for this repo."
Accepted forms:
<branch-name>branch:<branch-name>pr:<number>If the target is missing, ask the user what they want:
New branchExisting branchPR reviewIf the harness offers a structured question tool, use it. Only fall back to plain text questions when the harness question tool is unavailable.
After creation, if the repo has bin/worktree-up, ask one follow-up question:
Create only (Recommended)Upstart nowUse the harness question tool for this follow-up when available.
If the repo uses portless by default, treat bin/worktree-up as responsible for auto-starting the proxy when needed. Do not ask the user to start the proxy manually unless the repo scripts fail and explicitly require intervention.
git rev-parse --show-toplevel
ls bin/worktree-add bin/worktree-up bin/worktree-down bin/worktree-rm bin/worktree-env bin/worktree-run 2>/dev/null
bin/worktree-add existsbin/worktree-add does not existHEAD.bin/worktree-add <branch-name>
mkdir -p .worktrees
slug=$(printf '%s' "<branch-name>" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-')
slug=${slug#-}
slug=${slug%-}
git worktree add ".worktrees/${slug}" -b "<branch-name>" HEAD
git worktree add --force so the isolated review/setup still succeeds.origin, fetch it first:git fetch origin "<branch-name>:<branch-name>"
review-pr-<number>.git fetch origin "pull/<number>/head:review-pr-<number>"
review-pr-<number>.If the fetch fails, report it and stop. Do not guess a fallback branch name.
When bin/worktree-add exists:
bin/worktree-env exists, run it and capture the key env values.Upstart now and bin/worktree-up exists, run it.bin/worktree-rm exists, mention it in the final output as the cleanup path.Example commands:
bin/worktree-add review-pr-215
bin/worktree-env
bin/worktree-up
Only use this mode when repo-local helpers are absent.
.worktrees/ when it exists..worktrees/ does not exist, verify it is ignored before creating it:git check-ignore -q .worktrees/
.worktrees/ is not ignored, add it to .gitignore and stop to let the user review that repo change separately.git worktree add.Upstart now.Report:
Example final output:
Worktree ready at /path/to/repo/.worktrees/review-pr-215
Branch: review-pr-215
Runtime: not started
Cleanup: bin/worktree-rm review-pr-215
review-pr-<number> over using the PR head branch name directly.Inside the Soyio multi-repo workspace, prefer this skill for one repo at a time.
tools
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
tools
Create or reuse a coordinated Soyio parity workspace across soyio, soyio-dashboard, and soyio-embeds, then start the matching local runtimes.
testing
Triage and prepare automated dependency security PRs for merge with minimal risk. Identify bot PRs that need intervention, resolve required issues only, refresh stale branches safely, detect superseded PRs, and keep diffs dependency-focused.
testing
Fix multiple dependency vulnerabilities across multiple repos. Parses Vanta-style vulnerability entries, groups by repo, creates a single fix branch per repo, applies all fixes, verifies compatibility, and creates PRs after user approval. Use when the user says '/fix-vulnerabilities' or asks to fix vulnerabilities across repos.