Worktree status

From phenobarbital/navigator · View interactive version

Worktree status is an AI agent skill from the GitHub repository phenobarbital/navigator. Use to inspect the current git worktree setup, show the active/likely-active worktree, verify cleanliness, and remind the agent to work only inside the worktree (keywords: worktree status, which worktree, where am I, sanity check, active branch).

How to use this skill

Skill file

Goal

Show the current worktree situation and prevent accidental edits in the primary working directory.

Rules

Steps

1) Confirm git repo

2) Show worktrees

3) Determine the active / likely-active worktree

1) Prefer a worktree whose path starts with .worktrees/ (repo-local convention).

2) Among those, prefer one whose branch name matches common feature patterns:

3) If still multiple, pick the one that appears last in git worktree list output (often newest).

4) Verify cleanliness (active or likely-active)

5) Guardrail reminder

Output format

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.