git-commit-message

Generate conventional Git commit messages with branch-aware scope and safety gates.

2|Updated Jun 1, 2017
One-click install
npx skills add https://github.com/carlos-algms/dotfiles --skill git-commit-message-carlos-algms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit-message
Source: https://github.com/carlos-algms/dotfiles/tree/main/AI-configs/skills/git-commit-message
Command: npx skills add https://github.com/carlos-algms/dotfiles --skill git-commit-message-carlos-algms

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents inconsistent or unsafe Git commit messages by enforcing a strict commit format, flow, and guardrails before any commit is created.

Core Features & Use Cases

  • Conventional format enforcement: Uses type(scope): subject with an optional bullet-only body for the first commit on a branch, and requires bare one-liner subjects for subsequent commits.
  • Safety and workflow gates: Blocks commits unless the user explicitly requests committing, and forbids history-rewriting and undo/rollback commands.
  • Scope and intent clarity: Guides type/scope selection (including ticket-ID or branch-based scoping) by inspecting the diff and branch context rather than guessing.

Quick Start

When you want to commit your staged changes, ask the assistant to write a git commit message following the repository’s rules and visibility gate.

Frequently Asked Questions about git-commit-message

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

FAQPage Schema
How do I write conventional commit messages for a feature branch?

To write conventional commit messages for a feature branch, use the `type(scope): subject` format. The first commit requires a bullet-only body, while subsequent commits need bare one-liner subjects.

How does diff-informed scope inference work for git commit messages?

Diff-informed scope inference works by inspecting the staged diff and branch context to guide type and scope selection, such as using ticket-ID or branch-based scoping, rather than guessing the intent.

Can I use heredoc syntax to execute a git commit with a multi-line message?

Yes, you can use heredoc-based syntax to execute a git commit. This allows passing multi-line conventional commit messages with a body directly through the command line safely.

What are the safety rules for preventing history-rewriting during git commits?

Safety rules for git commits block execution unless explicitly requested and forbid history-rewriting or undo/rollback commands. This visibility gate prevents accidental destructive operations on the branch.

Does the .git/COMMIT_EDITMSG file trigger automated commit message generation?

Yes, when the selected file is .git/COMMIT_EDITMSG, it applies automated commit message generation. This enforces strict formatting and workflow constraints directly for the staged changes.