smithery.ai

git-worktrees

>- Isolates feature work in a dedicated git worktree with directory selection, gitignore checks, setup, and baseline tests. Use this skill when starting isolated feature work, before multi-task plans, parallel branches, or discardable experiments. Do not use when/for finishing and merging work (use branch-completion) or dispatching parallel agents without a worktree need (use parallel-agent-dispatch).

First seen Mar 26, 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.

Version1.2.0
Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,176 B
  • docs SUMMARY.md 196 B

History

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

SKILL.md

Git Worktrees

Critical rules

  • Prefer the bundled script over hand-rolled commands.
  • Project-local worktree dirs must be git-ignored before use.
  • Run baseline tests before starting work; ask before proceeding on failure.
  • Directory priority: existing .worktrees/ > worktrees/ > CLAUDE.md > ask. Never guess.
  • Always report the worktree path when ready.
  • Before manual flows or directory edge cases, read [references/directory-and-setup.md](references/directory-and-setup.md).

Workflow

  1. Prefer: scripts/create-worktree.sh <branch-name> [base-dir] (from this skill). Exit 2 = not ignored; exit 3 = baseline tests failed.
  2. If the script cannot run or you must deviate: follow directory priority, gitignore check, create branch worktree, project setup, baseline tests (see reference).
  3. Report location and baseline status; only then implement.
  4. Cleanup via git worktree remove (or branch-completion for land/discard options).

Resources

  • [scripts/create-worktree.sh](scripts/create-worktree.sh) — deterministic create + setup + baseline. Run when creating a worktree; use --help for usage and exit codes.
  • [references/directory-and-setup.md](references/directory-and-setup.md) — directory priority, gitignore, manual steps, cleanup. Read when not using the script or on edge cases.

Validation

  • Directory chosen by priority order
  • Project-local dir git-ignored
  • Setup ran; baseline tests pass (or failures reported and approved)
  • Worktree path reported

Constraints

  • Skip for trivial one-line fixes on the current branch.
  • Related: design-exploration, implementation-planning, parallel-agent-dispatch, branch-completion.