commit

Generate and apply Conventional Commits messages from git diffs.

Updated Dec 21, 2018
One-click install
npx skills add https://github.com/dhnt/dhnt --skill commit-dhnt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit
Source: https://github.com/dhnt/dhnt/tree/main/catalog/md/commit/commit
Command: npx skills add https://github.com/dhnt/dhnt --skill commit-dhnt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill turns messy diffs into a clear Conventional Commits message that explains the change’s intent, reducing guesswork during reviews and changelog generation.

Core Features & Use Cases

  • Diff-informed conventional message writing: Surveys staged and unstaged changes and drafts a Conventional Commits subject (and an optional why-focused body).
  • Safe, scope-aware committing: Encourages staging only relevant files and selecting the smallest honest scope prefix (feat/fix/docs/refactor/test/chore/etc.).
  • Workflow-friendly verification: Commits the changes using a heredoc and then verifies by re-checking repository status.

Use Case: You changed a handful of files while fixing a regression—this Skill helps you write a proper fix: message (with a short why) and then performs the git commit.

Quick Start

Ask the AI to commit your current working changes with a Conventional Commits message that reflects the smallest correct scope and explains why the change was made.

Frequently Asked Questions about commit

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

FAQPage Schema
How do I generate a conventional commit message from my current git diff?

To generate a conventional commit message from a git diff, the working tree changes are surveyed to draft an imperative subject under 72 characters and an optional why-focused body. This process scopes the changes accurately and stages only relevant files before applying the commit.

What is the best way to write a conventional commit message for a complex working tree with staged and unstaged changes?

Writing a conventional commit message for mixed staged and unstaged changes requires surveying both states to determine the smallest honest scope prefix. The system identifies relevant files, stages them by name, and applies a formatted commit without bypassing hooks or rewriting history.

How does automated diff review choose the correct commit scope for conventional commits?

Automated diff review selects the correct conventional commit scope by inspecting file changes and grouping them into the smallest accurate category like feat, fix, or refactor. It ensures the commit subject clearly explains the change intent for review and changelog readiness.

Can I automate git commit message generation without bypassing git hooks or rewriting repository history?

Yes, you can automate git commit message generation safely without bypassing hooks or rewriting history. The system stages files by name and commits using a heredoc, then verifies the repository status to ensure workflow-friendly and authorized changes.

Why should my git commit subject be limited to 72 characters in conventional commits?

A conventional commit subject should be limited to 72 characters to ensure readability across git interfaces and changelogs. This constraint forces a concise, imperative summary of the diff, reducing guesswork during code reviews.

When do I need to include a body paragraph in a conventional commit message?

You need to include a body paragraph in a conventional commit message when the diff requires explaining the motivation behind the change. This optional body focuses on the why, providing context that the code changes alone cannot convey for future review.