context-worktree

Detect context mismatch and create a Git worktree for an isolated branch.

12|1|Updated Nov 23, 2025
One-click install
npx skills add https://github.com/jiunbae/agent-skills --skill context-worktree
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: context-worktree
Source: https://github.com/jiunbae/agent-skills/tree/main/development/context-worktree
Command: npx skills add https://github.com/jiunbae/agent-skills --skill context-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill requires git, and includes scripts (resource) components.

What problem does it solve?

์ƒˆ ์ž‘์—… ์š”์ฒญ์ด ๊ธฐ์กด ๋งฅ๋ฝ๊ณผ ๋‹ค๋ฅผ ๋•Œ ์ž๋™์œผ๋กœ Git worktree๋ฅผ ์ƒ์„ฑํ•˜์—ฌ ๋…๋ฆฝ๋œ ๋ธŒ๋žœ์น˜์—์„œ ์ž‘์—…ํ•˜๊ณ  ์ถฉ๋Œ ์œ„ํ—˜์„ ์ค„์ž…๋‹ˆ๋‹ค.

Core Features & Use Cases

  • ๋งฅ๋ฝ ์œ ์‚ฌ์„ฑ ํŒ๋‹จ: ํŒŒ์ผ ๊ฒฝ๋กœ, ์ปค๋ฐ‹ ํžˆ์Šคํ† ๋ฆฌ, ์˜๋ฏธ ๋ถ„์„์„ ์ด์šฉํ•œ ํŒ๋‹จ
  • ์ž๋™ worktree ์ƒ์„ฑ: ๋น„์œ ์‚ฌ ํŒ๋‹จ ์‹œ ์ƒˆ worktree/๋ธŒ๋žœ์น˜ ์ƒ์„ฑ
  • ์ž‘์—… ์ปจํ…์ŠคํŠธ ๋ถ„๋ฆฌ: ๋…๋ฆฝ์  ๊ณต๊ฐ„์—์„œ ์ž‘์—…
  • Git ์ €์žฅ์†Œ ๊ฒ€์ฆ: Git ์ €์žฅ์†Œ๊ฐ€ ์•„๋‹Œ ๊ฒฝ์šฐ ์ž๋™ ์Šคํ‚ต

Quick Start

context-worktree collect๋ฅผ ์‹คํ–‰ํ•ด ํ˜„์žฌ ์ปจํ…์ŠคํŠธ๋ฅผ ์ˆ˜์ง‘ํ•˜๊ณ , ์ƒˆ ์ž‘์—…์ด ๋น„์œ ์‚ฌํ•˜๋ฉด context-worktree create -b <branch> -d "<description>" ๋กœ ์ƒˆ worktree๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

Frequently Asked Questions about context-worktree

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

FAQPage Schema
How do I automatically create a git worktree when starting unrelated work?โ–ผ

context-worktree detects when a new task differs from your current work context and automatically creates an isolated git worktree with a new branch. Run context-worktree collect to analyze your current context, then context-worktree create to generate a worktree when similarity is low, preventing merge conflicts and keeping work separated.

When should I use git worktrees instead of switching branches?โ–ผ

Git worktrees let you work on multiple branches simultaneously without stashing changes. Use worktrees when context shifts significantlyโ€”switching to unrelated features, bug fixes, or experimentsโ€”so you maintain isolated directories and avoid losing local state or accidental cross-branch contamination.

How does context-worktree decide if a new task needs a separate worktree?โ–ผ

The Skill analyzes file paths touched, recent commit history, and semantic scope to measure similarity between the new task request and current work. When similarity is low, a new worktree is automatically created; when high, work continues in the current branch.

What are the requirements to use context-worktree?โ–ผ

You need Git 2.5 or newer (for worktree support) and must be inside a Git repository. The Skill automatically skips if outside a repo. No additional dependencies beyond Git itself are required.

Can I customize the branch name and path when creating a worktree?โ–ผ

Yes. Use the -b flag to specify a branch name and -d flag to set a descriptive path for the worktree directory, giving you full control over organization and naming conventions.