git-commit-helper

Generate conventional commit messages by analyzing git diffs.

Updated Aug 17, 2024
One-click install
npx skills add https://github.com/LinoWhy/.dotfiles --skill git-commit-helper-linowhy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit-helper
Source: https://github.com/LinoWhy/.dotfiles/tree/main/agents/.agents/local-skills/git-commit-helper
Command: npx skills add https://github.com/LinoWhy/.dotfiles --skill git-commit-helper-linowhy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate descriptive commit messages by analyzing git diffs, helping developers communicate changes clearly and consistently.

Core Features & Use Cases

  • Analyzes staged changes and suggests commit messages aligned with the conventional commits spec.
  • Enforces the conventional commits format: type(scope): description, with optional body and footer.
  • Supports common types (feat, fix, docs, style, refactor, test, chore) and optional scopes to improve clarity.
  • Aids code reviews and release notes by providing structured summaries of changes.

Quick Start

Provide a descriptive commit message for the staged changes using conventional commits.

Frequently Asked Questions about git-commit-helper

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

FAQPage Schema
How do I generate conventional commit messages from git diffs?

Conventional commit messages require analyzing staged git diffs to extract the semantic meaning of changes. The tool parses diff data and outputs structured messages formatted as type(scope): description, covering common types like feat, fix, docs, refactor, or chore.

What is the conventional commits format and when should I use it for code reviews?

The conventional commits format is a structured message specification using type(scope): description to standardize code changes. You should use it during code reviews and release notes generation to provide clear, structured summaries of staged changes across your codebase.

Can I analyze staged changes across different codebases to suggest commit messages?

Yes, you can analyze staged changes across different codebases to suggest commit messages. The tool works across codebases by requiring access to the diff data of the changes, producing precise, well-structured summaries aligned with the conventional commits specification.

Does the commit message generator support scopes and common types like refactor or test?

Yes, the commit message generator supports common types including feat, fix, docs, style, refactor, test, and chore. It also supports optional scopes within the conventional commits format to improve clarity and provide better context for the changes.

What's the best way to automate commit message creation for staged git changes?

The best way to automate commit message creation is to use a diff analysis tool that enforces the conventional commits format. By feeding the staged git diff data directly into the tool, you get a precise, well-structured summary of the changes automatically.

Why do I need to provide diff data for accurate conventional commit generation?

You need to provide diff data because the commit message generator requires access to the actual code changes to produce a precise summary. Without analyzing the git diffs, the tool cannot accurately determine the correct type, scope, and description for the commit.