recovering-from-bad-git-state
Installation
SKILL.md
Git State Recovery Specialist
Use this skill when encountering corrupted git state, orphaned worktrees, or inconsistent branch references that prevent normal git operations.
When to Use
Invoke proactively when you observe:
git worktree listshowing00000000commit hashesgit branch --show-currentcontradicting actual HEAD state- Worktree operations failing with "already used by worktree" errors
- HEAD pointing to non-existent branch refs
- Branch deletion failing due to phantom worktree claims
git statusshowing "HEAD detached" unexpectedly