Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Worktree Support?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/dean0x-worktree-support)
---
name: worktree-support
description: Use when resolving or discovering worktree paths.
user-invocable: false
allowed-tools: Bash, Read
---
# Worktree Support
## Iron Law
> **WORKTREE_PATH IS A PREFIX, NOT A FLAG**
>
> When WORKTREE_PATH is provided, it replaces cwd as the root of ALL paths and commands.
## Agent Path Resolution
| Operation | Without WORKTREE_PATH | With WORKTREE_PATH |
|-----------|----------------------|-------------------|
| Git commands | `git ...` | `git -C {WORKTREE_PATH} ...` |
| .devflow/docs/ paths | `.devflow/docs/...` | `{WORKTREE_PATH}/.devflow/docs/...` |
| Source files | `{file}` | `{WORKTREE_PATH}/{file}` |
## Protected Branches (Canonical List)
`main`, `master`, `develop`, `integration`, `trunk`, `release/*`, `staging`, `production`
Every protected-branch check uses this exact list.
The HUD mirrors it in `TRUNK_BRANCHES`/`TRUNK_BRANCH_PREFIXES`/`isTrunkBranch()` in `src/core/git.ts`: update both together.
## Extended References
- `references/discovery.md` — the 7-step discovery algorithm and multi-worktree mode
- `references/roots.md` — project data roots and detached HEAD