worktree-detection
OfficialFind 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 listoutput. - 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_NUMfromTASK_OWNERandTASK_SUBJECTusing aTASK-\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 requiredComponents
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.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.