From worktree
Manage git worktrees using git gtr — create, copy files, list, remove, and navigate. Use when the user invokes /worktree.
npx claudepluginhub clemux/claude-code-plugins --plugin worktreeThis skill uses the workspace's default tool permissions.
The user has invoked `/worktree`. Help them manage git worktrees using the `git gtr` CLI (git worktree runner).
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Analyzes BMad project state from catalog CSV, configs, artifacts, and query to recommend next skills or answer questions. Useful for help requests, 'what next', or starting BMad.
git gtrThe user has invoked /worktree. Help them manage git worktrees using the git gtr CLI (git worktree runner).
Before running any git gtr command, verify it is installed:
git gtr version
If the command fails, tell the user:
git gtris not installed. Install it from https://github.com/coderabbitai/git-worktree-runner
Do NOT proceed with any worktree operations until git gtr is available.
Interpret the user's free-form input after /worktree and map it to one of these intents:
| User says | Intent |
|---|---|
/worktree my-feature | create a worktree for branch my-feature |
/worktree new my-feature --from-current | create with options |
/worktree copy my-feature -- ".env*" | copy files to a worktree |
/worktree list or /worktree ls | list worktrees |
/worktree rm my-feature or /worktree remove my-feature | remove a worktree |
/worktree go my-feature or /worktree navigate my-feature | navigate guidance |
If the intent is ambiguous, ask the user to clarify.
Run git gtr new <branch> with any options the user specified.
Common options:
--from <ref> — create from a specific branch/tag/commit--from-current — create from the current branch (for parallel variants)--no-copy — skip copying configured files to the new worktree--no-fetch — skip git fetch before creation-e, --editor — open in editor after creation-a, --ai — start AI tool after creationExample:
git gtr new my-feature
git gtr new my-feature --from-current
git gtr new my-feature --from main --no-copy
After successful creation, tell the user how to access the worktree:
git gtr editor my-featuregit gtr ai my-featurecd "$(git gtr go my-feature)"Use git gtr copy <target> [-- <pattern>...] to copy files from the main repo to a worktree.
Always preview first with --dry-run before copying, unless the user explicitly asks to skip the preview:
git gtr copy my-feature --dry-run -- ".env*"
Then run without --dry-run to execute:
git gtr copy my-feature -- ".env*"
Useful variations:
git gtr copy my-featuregit gtr copy my-feature -- ".env*" "*.json"git gtr copy --all -- ".env*"git gtr copy my-feature --from other-branchgit gtr list
Show the output to the user.
Always ask the user for confirmation before removing a worktree.
Present the command you will run:
git gtr rm my-feature
Optional flags (only use if the user requests):
--delete-branch — also delete the git branch--force — force removal of a dirty worktreeDo NOT use --force unless the user explicitly asks for it.
The agent cannot cd into a worktree — it is anchored to the current project directory. Instead, tell the user how to navigate:
cd "$(git gtr go my-feature)"git gtr editor my-featuregit gtr ai my-featuregit gtr run my-feature <command>If the user wants to run a one-off command in the worktree, use git gtr run:
git gtr run my-feature git status
git gtr run my-feature npm test
git gtr is installed before running commands--dry-run to preview copy operations before executinggit gtr rm--force on rm unless the user explicitly requests it--yes to skip confirmations — let the user review