# Worktree Flow

> Decide when and how to use git worktrees for isolated parallel work

- Skill: `lucassantana-dev/worktree-flow` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add lucassantana-dev/worktree-flow`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lucassantana-dev/worktree-flow/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: LucasSantana-Dev (https://skillmd.com/u/lucassantana-dev)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/lucassantana-dev/worktree-flow

---


# Worktree Flow

Decide whether a task deserves an isolated git worktree, create it with a proper branch name, and keep the original checkout clean.

## Steps

1. **Evaluate isolation need** — does this task risk conflicting with current work?
2. **Choose branch name** — use `feature/`, `fix/`, `chore/`, or `refactor/` prefix
3. **Create worktree** — `git worktree add ../<repo>-<branch> -b <branch>`
4. **Report** — branch name, worktree path, isolation reason

## Output

```text
Branch:    <prefix/short-name>
Path:      ../<repo>-<branch>
Reason:    <why isolation was needed>
```

## Rules

- Stop if the directory is not a git repo
- Never create throwaway branches without a clear reason
- Prefer worktrees over stashing for multi-day parallel work
- Keep the original checkout on its current branch

