smart-commit-gen

Analyze git diffs to generate Conventional Commits with inferred type and scope.

12|2|Updated Apr 21, 2026
One-click install
npx skills add https://github.com/haomingz/kimi-skills --skill smart-commit-gen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smart-commit-gen
Source: https://github.com/haomingz/kimi-skills/tree/main/skills/smart-commit-gen
Command: npx skills add https://github.com/haomingz/kimi-skills --skill smart-commit-gen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Manual commit messages are error-prone and inconsistent across teams; this Skill automates the generation of conventional commit messages from diffs.

Core Features & Use Cases

  • Inferred commit type (feat, fix, refactor, etc.) from modified, added, or renamed files.
  • Automatic scope detection from touched modules or paths to provide contextual scope.
  • Output includes a ready-to-use commit_message, plus a file-level summary of changes for review.
  • Use cases: when preparing commits for feature work, bug fixes, or refactors to ensure standardized history.

Quick Start

Run the tool to analyze the current git diff and generate a Conventional Commit message.

Frequently Asked Questions about smart-commit-gen

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

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

To generate a conventional commit message from a git diff, the Skill analyzes your staged or unstaged changes to infer the commit type, detect the scope from modified paths, and return a ready-to-use message with a changed file summary.

Can conventional commit scopes be detected automatically from modified file paths?

Yes, conventional commit scopes can be detected automatically by parsing the git diff to identify touched modules or file paths, providing accurate contextual scope for the generated commit message without manual input.

What's the best way to enforce consistent conventional commits across a development team?

The best way to enforce consistent conventional commits is to automate commit message generation from diffs, standardizing the type, scope, and summary format for feature work, bug fixes, and refactoring tasks across the team.

Does this conventional commit generator require external dependencies or libraries?

No, this conventional commit generator does not require external dependencies, as it uses only Python's standard library to parse diffs, detect scope, and assemble compliant commit messages.

How are commit types like feat or fix inferred from staged and unstaged changes?

Commit types like feat or fix are inferred by analyzing the git diff to evaluate whether modified, added, or renamed files correspond to new features, bug fixes, or refactoring tasks, ensuring accurate conventional commit classification.