git-safe-workflow
Installation
SKILL.md
Git Safe Workflow
Core rules (always)
-
Collect repo context first (non-destructive):
- git rev-parse --show-toplevel
- git status --porcelain=v1 -b
- git log -1 --oneline
-
Collect worktree context when relevant (also non-destructive):
- git branch --show-current
- git worktree list --porcelain
Run worktree context when:
- branch name is unexpected
- you are in a nested folder and not sure which checkout you are in
- Git refuses checkout because branch is already checked out elsewhere
- status shows detached HEAD or unusual metadata