git-commit-message

Draft a why-focused git commit message from staged changes without committing.

1|Updated May 4, 2023
One-click install
npx skills add https://github.com/usabarashi/nix-config --skill git-commit-message-usabarashi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit-message
Source: https://github.com/usabarashi/nix-config/tree/main/config/agents/skills/git-commit-message
Command: npx skills add https://github.com/usabarashi/nix-config --skill git-commit-message-usabarashi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Draft a concise, rationale-first commit message from your staged changes without performing the commit, helping teams understand why changes were made.

Core Features & Use Cases

  • Generates a subject line under 72 characters that conveys rationale.
  • Produces a bullet-point body highlighting multiple logical changes when needed.
  • Writes the final draft to /tmp/commit-message.md and can copy it to the clipboard without running git commit.

Quick Start

With staged changes in your repository, generate a draft commit message and save it to /tmp/commit-message.md.

Frequently Asked Questions about git-commit-message

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

FAQPage Schema
How do I generate a commit message from staged changes without committing?

To generate a commit message from staged changes without committing, this Skill reads your git diff --staged and drafts a why-focused message to /tmp/commit-message.md. It can also copy the draft directly to your clipboard.

What is a why-focused commit message and how does it help?

A why-focused commit message conveys the rationale behind code changes rather than just describing what changed. It helps teams maintain consistent messaging and understand the reasoning for each modification across the repository.

Can I draft commit messages for multiple logical changes in one staged diff?

Yes, you can draft commit messages for multiple logical changes. The Skill generates a subject line under 72 characters and includes an optional bullet-point body to highlight distinct logical units within the staged changes.

Does this Skill read recent git history when formatting commit messages?

Yes, the Skill reads recent git history alongside the staged diff. This context helps it format a subject line under 72 characters that aligns with your repository's existing messaging conventions.

How to automate commit message drafting for consistent git workflows?

Automate commit message drafting by staging changes and letting the Skill generate a rationale-first draft. It formats the message, writes it to /tmp/commit-message.md, and optionally copies it to your clipboard for review.

What are the limitations of automating commit message drafts from git diff?

The limitation is that the Skill only drafts the message and does not perform the actual git commit. It outputs the text to /tmp/commit-message.md or your clipboard, requiring you to manually execute the commit.