worktree-context

Detect, create, and generate context for Git worktrees.

Updated Jan 5, 2026
One-click install
npx skills add https://github.com/Marcus-Mok-GH/Claude-code-conductor --skill worktree-context-marcus-mok-gh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-context
Source: https://github.com/Marcus-Mok-GH/Claude-code-conductor/tree/main/.claude/skills/worktree-context
Command: npx skills add https://github.com/Marcus-Mok-GH/Claude-code-conductor --skill worktree-context-marcus-mok-gh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bash, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines parallel development by providing centralized worktree handling, eliminating the need for inline worktree code and enhancing workflow efficiency.

Core Features & Use Cases

  • Worktree Detection & Creation: Offers a single source of truth for worktree detection, creation, and context generation.
  • Compact Pattern: Replaces 50+ lines of inline worktree detection with a compact reference.
  • Task() Agent Context: Generates context blocks for Task() agents operating within worktrees.
  • Path Handling: Resolves path duplication issues and extracts slugs from any path format.
  • Use Case: When developing features in parallel, use this Skill to manage worktrees for each feature branch, ensuring a smooth and efficient workflow.

Quick Start

Use the worktree-context skill to check if you are in a worktree.

Frequently Asked Questions about worktree-context

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

FAQPage Schema
How do I manage git worktrees for parallel development without writing inline detection code?

Git worktree management is handled centrally by detecting, creating, and providing context for worktrees, replacing 50+ lines of inline detection code with a compact reference.

What is the best way to generate context for Task() agents operating in git worktrees?

Generating context for Task() agents is achieved by extracting worktree paths and slugs, resolving path duplication issues to provide accurate operational context blocks.

How do I set up my environment to use bash scripts for worktree management?

Worktree management requires a Bash environment to execute its scripts and references, utilizing Git worktree commands to streamline parallel branch workflows.

Can I extract slugs from any path format when managing parallel feature branches?

Slug extraction supports any path format, resolving path duplication issues to maintain a single source of truth for worktree detection and branch management.

Why does centralized worktree management improve feature development workflows over inline scripts?

Centralized worktree management eliminates inline code maintenance overhead, providing a single source of truth for detection and creation that ensures smooth parallel workflow efficiency.

When do I need centralized worktree handling in my git workflow?

Centralized worktree handling is needed when developing features in parallel, ensuring each feature branch has managed worktree context without inline code duplication.