git-commit-conventions

Write and sequence git commits using Conventional Commit prefixes and reviewable history rules.

Updated Jun 25, 2026
One-click install
npx skills add https://github.com/oriddd/ai-toolkit --skill git-commit-conventions-oriddd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit-conventions
Source: https://github.com/oriddd/ai-toolkit/tree/main/copilot/public/skills/git-commit-conventions
Command: npx skills add https://github.com/oriddd/ai-toolkit --skill git-commit-conventions-oriddd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Messy commit histories with vague messages like "wip" or "fix stuff" make code reviews painful, break git bisect, and hide the reasoning behind changes. This Skill enforces Conventional Commit prefixes, single-purpose commits, and the rule that every commit compiles independently. ## Core Features & Use Cases - Standard Prefix Taxonomy: Applies feat, fix, docs, style, refactor, perf, test, build, ci, chore, and revert prefixes with a decision tree for choosing the right one. - Commit Sequencing & Hygiene: Plans logical commit order, stages changes incrementally, verifies each commit compiles, and cleans up history with interactive rebase before review. - Enforcement Tooling: Provides a commit-msg git hook script that rejects messages without a valid prefix, plus a squash-vs-preserve policy for pull requests. - Use Case: When preparing a feature branch for review, split bundled changes into focused commits (feature, tests, docs), reword vague messages, and squash typo fixes so reviewers see a clean, bisectable history. ## Quick Start Apply the git-commit-conventions skill to split my current uncommitted changes into properly prefixed, independently compiling commits.

Frequently Asked Questions about git-commit-conventions

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

FAQPage Schema
How do I write a good git commit message?

Start with a Conventional Commit prefix like feat, fix, or refactor, followed by an imperative-mood subject of 50-72 characters in lowercase with no trailing period. Add a blank line, then a body explaining why the change was made, wrapped at 72 characters.

What are the Conventional Commit prefixes and when do I use each?

Use feat for new features, fix for bug fixes, docs for documentation, style for formatting, refactor for restructuring without behavior change, perf for performance, test for tests, build for dependencies, ci for pipelines, chore for maintenance, and revert for rollbacks.

How do I split a large change into multiple git commits?

Plan the logical sequence first (model, repository, service, controller, tests, docs), then stage only the files for each step with git add and commit separately. Verify each commit compiles on its own before moving to the next.

How do I enforce commit message format with a git hook?

Add a commit-msg hook in .git/hooks that greps the message against the pattern ^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert): and exits with an error if it does not match. The skill provides a ready-to-use shell script.

When should I squash commits versus preserving them in a pull request?

Preserve commits when each tells a coherent story and could be cherry-picked individually. Squash when commits are tiny work-in-progress steps or fixes to earlier commits in the same pull request, using git rebase -i to clean up before review.

Why does every commit need to compile independently?

Independently compiling commits keep git bisect working and let reviewers check out any point in history safely. A commit may depend on earlier commits but never on future ones; verify with git rebase -i --exec running your build command.