askill
managing-context-worktree

managing-context-worktreeSafety 80Repository

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.

4 stars
1.2k downloads
Updated 2/7/2026

Package Files

Loading files...
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 WorkNew RequestAction
Feature ABug in Feature AContinue
Feature AFeature BNew worktree
Feature AHotfixNew worktree
NoneAnyContinue

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

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

88/100Analyzed 2/16/2026

Well-crafted skill for managing git worktrees with clear triggers, actionable workflow steps, command reference, and decision matrix. Highly reusable across any git-based project.

80
90
90
85
90

Metadata

Licenseunknown
Version-
Updated2/7/2026
Publisherjiunbae

Tags

ci-cdgithub-actions