/worktree-ops:list-worktreesfrom worktree-ops
Show a dashboard of every git worktree in this repo — branch, commits ahead/behind the base branch, uncommitted (dirty) file count, and open-PR status — with the current session's worktree marked, so all parallel sessions are visible at a glance. Use when the user asks to "list worktrees", "worktree status", "what worktrees do I have", "show my parallel sessions", "which branches am I working on", or wants an overview of in-flight worktree work before pulling, switching, or merging.
Ships in worktree-ops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill takes no required arguments (only optional --fetch), so there's nothing to confirm before it runs.
Run the helper and present a dashboard of all worktrees. By default it's offline (no fetch), so ahead/behind is measured against the last-known base — note that. Add --fetch when the user wants live numbers:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/wt-status.sh" # offline (fast)
bash "${CLAUDE_PLUGIN_ROOT}/scripts/wt-status.sh" --fetch # fetch first (live ahead/behind)
It prints a BASE<TAB><ref> line, a header, then one tab-separated row per worktree: cur, name, branch, ahead, behind, dirty, pr, path. cur is * for the worktree this session is in. Treat the output as ground truth — don't infer any field. (pr is - when GitHub CLI is unavailable or there's no PR; ahead/behind are ? if the base can't be resolved.)
Render a markdown table, naming the base in a lead-in and marking the current worktree (drop the full path unless asked):
Base: {base} · ahead/behind is from your last fetch (run with --fetch for live).
| Worktree | Branch | Ahead | Behind | Dirty | PR | |
|---|---|---|---|---|---|---|
| {▸ if cur} | {name} | {branch} | {ahead} | {behind} | {dirty} | {pr} |
Then a one-line takeaway plus the obvious next actions:
/worktree-ops:pull-worktree in that worktree (it fetches fresh)./worktree-ops:merge-worktree to tear it down.If only the main worktree exists, say so plainly instead of a one-row table.
What SKILL.md sets; muted values are Claude Code's defaults
sonnetmediumnpx claudepluginhub zakattack9/agentic-coding --plugin worktree-ops4 skills in this plugin
/create-worktreeCreate an isolated git worktree for a new task and switch this session straight into it — no restart, no manual cd. Branches fresh from the latest origin base, copies gitignored env files (.worktreeinclude), runs an optional per-project setup script, and can seed from a GitHub issue or PR. Use when the user wants to "create/start/spin up a worktree", "work on this in a separate branch/checkout", kick off isolated/parallel work for a feature or bugfix, or start a task from an issue or PR without disturbing the current checkout./merge-worktreeFinish a worktree — commit any remaining work, push, open or update its pull request, optionally merge into a target branch once checks are green, run an optional teardown script, then remove the worktree and switch this session back to the main checkout. Use when the user says a task is "done", wants to "finish", "wrap up", "ship", "merge", "merge and clean up", or "tear down" a worktree, or to close out parallel work and reclaim the checkout. The merge target is configurable; pairs with create-worktree./pull-worktreePull the latest changes from a base branch into the current worktree — fetch, then rebase (or merge) this worktree's branch onto the newest origin/main (or any branch you name), guiding conflict resolution. Use when the user says a worktree/branch is "behind", wants to "pull in the latest", "catch up", "update", "sync", or "rebase onto main/develop" a worktree before continuing or opening a PR. The base to pull from is configurable, unlike anything native.