commit-discipline

Generates Conventional Commits messages and enforces micro-commit discipline rules.

Updated May 21, 2026
One-click install
npx skills add https://github.com/CagesThrottleUs/private-ai-harness --skill commit-discipline-cagesthrottleus
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: commit-discipline
Source: https://github.com/CagesThrottleUs/private-ai-harness/tree/main/skills/commit-discipline
Command: npx skills add https://github.com/CagesThrottleUs/private-ai-harness --skill commit-discipline-cagesthrottleus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing consistent, meaningful commit messages is a common friction point: subjects run too long, bodies restate the diff, and unrelated changes get batched into one commit. This Skill produces terse, standards-compliant commit messages and PR titles that pass automated commit-msg hook validation. ## Core Features & Use Cases - Conventional Commits Generation: Produces type(scope): imperative summary subjects under 50 characters with the correct type vocabulary (feat, fix, refactor, perf, docs, test, chore, build, ci, style, revert). - WHY-Focused Bodies: Writes body text explaining motivation and consequences rather than listing changed files, required for multi-file commits, breaking changes, security fixes, migrations, and reverts. - Micro-Commit Discipline: Enforces one logical change per commit, never batching implementation with tests or docs with code. - Use Case: After staging a fix that guards empty log handles, ask for a commit message and receive a compliant subject plus a body explaining the spurious escalation the guard prevents, ready to paste and pass the commit-msg.sh hook check. ## Quick Start Ask the assistant to write a commit message for your staged changes using the commit-discipline rules.

Frequently Asked Questions about commit-discipline

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

FAQPage Schema
How do I write a good Conventional Commits message?▼

Use the format type(scope): imperative summary, keeping the subject under 50 characters with types like feat, fix, refactor, or docs. Add a body explaining why the change was made whenever the commit touches more than one file.

How to enforce commit message format with a git hook?▼

Install the commit-msg.sh script as a git hook by symlinking it to .git/hooks/commit-msg. The hook auto-rejects subjects over 72 characters, bad Conventional Commits format, missing bodies on multi-file commits, and body lines over 80 characters.

When does a commit message need a body?▼

A body is required when a commit touches more than one file, and always for breaking changes, security fixes, data migrations, and reverts. The body explains why the change was made, never a list of files changed.

What should never appear in a commit message?▼

Avoid phrases like "This commit does X", first-person pronouns, AI attribution, emoji, and restating what the diff already shows. File names should be omitted when the scope already conveys them.

Does this skill run git commit automatically?▼

No, it only generates the message text as a code block ready to paste. It does not run git commit, stage files, or amend existing commits.