worktree-detection

Official

Find the right Git worktree instantly.

Authormarmelab
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill solves the problem of locating a specific Git worktree for a given task number without relying on hardcoded directory paths.

Core Features & Use Cases

  • Worktree discovery by task identifier: Locates the correct worktree path by matching the task number embedded in git worktree list output.
  • Hook/script friendly behavior: Exits cleanly with a skip message when no matching worktree exists, avoiding failures during automated runs.
  • Flexible task number extraction: Derives TASK_NUM from TASK_OWNER and TASK_SUBJECT using a TASK-\d+ pattern so it works across varying agent variable formats.

Quick Start

In your hook or automation script, set TASK_NUM to the task you want (for example TASK-005) and run the detection snippet to resolve the matching worktree path or skip if none exists.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: worktree-detection
Download link: https://github.com/marmelab/crm-builder/archive/main.zip#worktree-detection

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.