SuperAPI AI Directory

git-discipline

General & other

View repository

Updated 10-15 20:13

About this skill

Git Discipline

Never let agentic speed destroy repository hygiene.

Mandatory Steps

  1. Stage intentionally — only the files that belong in this logical change.
  2. Write a Conventional Commit message:
    • feat:, fix:, refactor:, docs:, test:, chore:, perf:
    • Scope when useful: feat(api): ...
    • Body that explains why, not just what.
  3. Create or update branch following feature/, fix/, etc.
  4. Never commit directly to main.
  5. Rebase or merge cleanly before opening PR.
  6. PR description should reference the plan or relevant skills used.

Agent Behavior

  • After edits, offer to run git diff --staged and propose a commit.
  • If history is messy, propose a rebase plan (never force-push without confirmation).
  • When multiple logical changes are staged together, split them.

Verification

  • git log --oneline -10 should tell a clear story.
  • Each commit should be buildable/testable in isolation where practical.