askill
git-safety-check

git-safety-checkSafety 80Repository

Protocol to ensure safe git operations and avoid detached HEAD or dirty commits.

2 stars
1.2k downloads
Updated 2/24/2026

Package Files

Loading files...
SKILL.md

Skill: Git Safety Check

Goal

Prevent destructive git states like detached HEAD or unintended commits on the wrong branch.

Use This Skill When

  • You are about to rebase, reset, or change branches.
  • You are unsure which branch is active.
  • You see merge conflicts or history divergence warnings.

Do Not Use This Skill When

  • You are only staging known changes and committing on the correct branch.

Steps

  1. Check Status: Run git status.
  2. Confirm Branch: Run git branch --show-current.
  3. Handle Detached HEAD:
    • Create a branch immediately to preserve work.
  4. Confirm Remotes:
    • Check git remote -v if you need to push.
  5. Submodule Awareness:
    • If a submodule is dirty, enter it and handle it separately.

Output

  • A clean working tree on the intended branch.

Strong Hints

  • Constraint: Never force push unless explicitly authorized.
  • Tip: Detached HEAD commits are easy to lose.

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

82/100Analyzed 3/2/2026

Well-structured git safety protocol skill with clear use cases, numbered steps, and safety constraints. Scores well on clarity and reusability. Minor gaps: missing tags, no https icon, and path suggests internal agent config. Generic enough to be widely reusable.

80
88
85
72
82

Metadata

Licenseunknown
Version-
Updated2/24/2026
Publisherriatzukiza

Tags

No tags yet.