smithery.ai

worktree

Use when user says "/worktree", asks to create a worktree, switch worktrees, list worktrees, check worktree status, or work on a GitHub issue in isolation.

First seen Mar 21, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsBash(git:*), Bash(ls:*), Bash(mkdir:*), Bash(rm:*), Bash(gh:*), Bash(code:*), Bash(.claude/scripts/worktree-status.sh), Glob, Read, AskUserQuestion
Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,143 B
  • docs SUMMARY.md 171 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 7 installs

SKILL.md

Git Worktree Manager

Manage git worktrees with all worktrees stored in a sibling directory.

Directory Convention

Given a repository at /path/to/repo, worktrees are stored at:

/path/to/repo.worktrees/<branch-name>/

Modes

Mode Triggers Description
Add /worktree add <branch>, /worktree <branch>, /worktree #<issue> Create worktree
Status /worktree status Show PR/CI status table
List /worktree, /worktree list List and select worktrees
Remove /worktree remove <branch>, /worktree rm <branch> Remove worktree
Prune /worktree prune Clean stale references

Mode Detection

When this skill is invoked, arguments follow the skill name (e.g., /worktree status passes "status" as arguments).

IMPORTANT: Before doing anything else, identify the mode from the invocation arguments:

Arguments Mode Instructions
(none) or list List Read list.md
status Status Read status.md
#<number> or just a number Add (from issue) Read add.md
add <branch> or just <branch> Add (branch) Read add.md
remove <branch> or rm <branch> Remove Read remove.md
prune Prune Read prune.md

First action: Read the appropriate .md file for your detected mode, then follow those instructions exactly.

Important Notes

  1. Always use the sibling directory convention (repo.worktrees/)
  2. Branch names can contain slashes (e.g., feat/new-feature)
  3. Run commands separately - Don't use compound commands with && or variable assignment