git-commit

Generate a conventional commit message from the current git diff and staged/unstaged changes.

Updated Dec 26, 2025
One-click install
npx skills add https://github.com/yutaoshao/agent-skills --skill git-commit-yutaoshao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit
Source: https://github.com/yutaoshao/agent-skills/tree/main/git-commit
Command: npx skills add https://github.com/yutaoshao/agent-skills --skill git-commit-yutaoshao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Stage the right changes and craft a clear, conventional-commit style message that accurately reflects the actual diff.

Core Features & Use Cases

  • Inspect the current working tree and staged changes to understand the exact scope of a commit.
  • Generate a conventional commit subject and a multi-bullet body guided by real diffs, diff stats, and a commit guidelines reference.
  • Support non-interactive commit workflows by assembling context and applying changes via scripts.

Quick Start

Draft a precise conventional commit for the current diff and stage the selected changes non-interactively.

Frequently Asked Questions about git-commit

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

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

To generate a conventional commit message from a git diff, inspect staged and unstaged changes to understand the exact scope, then use diff stats and commit guidelines to craft an accurate subject and multi-bullet body.

What is the best way to write conventional commits for multiple files in a local repository?

Writing conventional commits for multiple files involves analyzing the working tree to identify real changes across the project, assembling contextual data via scripts, and applying formatting rules to produce a clear, multi-bullet commit message.

Can I stage changes and create a commit non-interactively?

Yes, you can stage changes and create a commit non-interactively by assembling context from the working tree and applying the selected changes through automated scripts without manual intervention.

Does this workflow support both staged and unstaged changes?

Yes, this workflow supports both staged and unstaged changes in a local repository, inspecting the current working tree to capture the real diff and ensure the commit message accurately reflects the actual modifications.

Why does my conventional commit message not match the actual git diff?

Conventional commit messages fail to match the actual git diff when context gathering is incomplete, making it necessary to analyze diff stats and reference commit guidelines to accurately describe the real changes instead of guessing.

When do I need to use a conventional commit format for my git workflow?

You need to use a conventional commit format for your git workflow when you want to enforce clear, structured commit history, requiring diff analysis and guidelines to craft messages that accurately describe real changes across multiple files.