managing-context-worktree

Create git worktrees on new branches when task contexts diverge.

1|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/Open330/agt --skill managing-context-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: managing-context-worktree
Source: https://github.com/Open330/agt/tree/main/development/context-worktree
Command: npx skills add https://github.com/Open330/agt --skill managing-context-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

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.

Core Features & Use Cases

  • Context-aware worktree creation to isolate unrelated tasks.
  • Automatic branch creation and worktree setup based on task similarity.
  • Activation on new feature work, issue switch, or scope change to keep work organized.

Quick Start

Run the context-worktree.sh create -b feature/new to start a new worktree.

Frequently Asked Questions about managing-context-worktree

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I isolate unrelated git work when switching issues?

Git worktrees isolate unrelated work by spawning a separate working directory on a new branch. This Skill evaluates context similarity between tasks and automatically creates a worktree when it detects diverging scopes, keeping feature work organized without stashing.

What is context similarity evaluation for automatic worktree creation?

Context similarity evaluation compares your new task against existing work to determine if they overlap. When tasks differ, the mechanism triggers conditional worktree creation, ensuring unrelated features or issue switches are reliably separated into isolated branches.

How do I create a new git worktree for a feature branch?

To create a git worktree, run the context-worktree.sh script with the create command and specify a branch name like -b feature/new. This sets up the worktree directory and automatically creates the branch for your isolated development context.

When should I use git worktrees instead of git stash for task switches?

Git worktrees are ideal for diverging project tasks, new feature implementation, or scope changes where you need persistent isolated contexts. Unlike stashing, worktrees keep branches checked out simultaneously, allowing seamless context isolation without losing your working directory state.

Do I need any dependencies to automate git worktree spawning?

No external dependencies are required. The Skill relies on standard git worktree commands and includes its own scripts to automate context evaluation, conditional branch creation, and clean-up, functioning independently within your existing git workflow.