smithery.ai

context-worktree

Evaluates context similarity between new and existing work, automatically creating git worktree on a new branch when tasks differ. Activates on task start, new feature implementation, or switching to different issues.

First seen Mar 25, 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 Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,703 B
  • docs SUMMARY.md 250 B

History

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

SKILL.md

Context Worktree

Auto-separate unrelated work into git worktrees.

When to Activate

  • Starting new feature while another is in progress
  • Switching to different issue/task
  • Requested work differs from current branch context

Workflow

Step 1: Evaluate Similarity

Compare new request against current branch:

  • File paths involved
  • Feature/module overlap
  • Related issues/PRs

Similar: Continue on current branch Different: Create new worktree

Step 2: Create Worktree (if different)

# Create worktree with new branch
git worktree add ../project-feature feature/new-feature

# Switch to worktree
cd ../project-feature

Step 3: Work in Isolation

  • Changes in worktree don't affect main workspace
  • Can switch back anytime: cd ../project-main

Commands

# List worktrees
git worktree list

# Add worktree
git worktree add <path> <branch>

# Remove worktree
git worktree remove <path>

# Prune stale worktrees
git worktree prune

Decision Matrix

Current Work New Request Action
Feature A Bug in Feature A Continue
Feature A Feature B New worktree
Feature A Hotfix New worktree
None Any Continue

Best Practices

DO:

  • Use descriptive worktree paths: ../project-{feature}
  • Clean up finished worktrees

DON'T:

  • Create worktree for tiny tasks
  • Forget to push before removing worktree