git-commit-discipline

Enforce consistent git commit messages and clean branch history.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/bennybennison/agent-toolkit --skill git-commit-discipline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit-discipline
Source: https://github.com/bennybennison/agent-toolkit/tree/main/skills/git-commit-discipline
Command: npx skills add https://github.com/bennybennison/agent-toolkit --skill git-commit-discipline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers often create inconsistent or noisy git histories, making code review, bisect, and rollback difficult. This Skill provides disciplined guidelines for writing clear commits, cleaning up history before merging, and investigating past changes.

Core Features & Use Cases

  • Commit Architect: Guides you through detecting project commit style and crafting conventional or imperative commit messages for each logical change.
  • Rebase Surgeon: Offers step‑by‑step instructions for interactive rebasing, squashing, and ordering commits to produce a clean, reviewable history.
  • History Archaeologist: Supplies search and bisect strategies to locate when a bug was introduced or trace the evolution of a line of code.

Quick Start

Ask the skill to walk you through creating a conventional commit for the current staged changes.

Frequently Asked Questions about git-commit-discipline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write consistent git commit messages for staged changes?

To write conventional git commits, detect the project's existing commit style and craft imperative messages for each logical change. This ensures a clean, reviewable history by guiding you through structuring commits based on staged changes.

What is the best way to squash and reorder commits before merging?

The best way to squash and reorder commits is through interactive rebasing. Step-by-step instructions for squashing and ordering commits produce a clean, reviewable branch history before merging, ensuring logical changes are grouped effectively.

How do I use git bisect to locate when a bug was introduced?

To use git bisect to locate when a bug was introduced, apply search and bisect strategies to trace the evolution of code lines. This history investigation pinpoints the specific commit that caused the regression for root-cause analysis.

Do I need a local git repository to clean up branch history?

Yes, you need a local git repository to clean up branch history. Enforcing consistent commit messages and maintaining clean history requires access to staged changes and the ability to run interactive rebase commands locally.

Why does noisy git history make code review and rollback difficult?

Noisy git history makes code review and rollback difficult because inconsistent or messy commits obscure logical changes. Disciplined guidelines for writing clear commits and cleaning up history before merging resolve this by producing a reviewable log.