git-safe-workflow

Installation
SKILL.md

Git Safe Workflow

Core rules (always)

  1. Collect repo context first (non-destructive):

    • git rev-parse --show-toplevel
    • git status --porcelain=v1 -b
    • git log -1 --oneline
  2. 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
Related skills

More from regenrek/agent-skills

Installs
4
GitHub Stars
98
First Seen
Apr 13, 2026