commit

Generate conventional Git commit messages with issue references from branch names.

Updated Dec 1, 2023
One-click install
npx skills add https://github.com/garyj/dotfiles --skill commit-garyj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit
Source: https://github.com/garyj/dotfiles/tree/main/home/dot_agents/skills/commit
Command: npx skills add https://github.com/garyj/dotfiles --skill commit-garyj

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers avoid poorly structured commits by enforcing conventional commit formats and by automatically incorporating issue references detected from branch names.

Core Features & Use Cases

  • Enforces conventional commit messages and supports emoji annotations for readability.
  • Detects and appends issue references from branch names (e.g., ABC-123, GH-456) to commit messages.
  • Analyzes diffs to identify multiple logical changes and suggests splitting into smaller commits; integrates with pre-commit checks to run linting and tests.

Quick Start

Provide changes to Git with a conventional commit message, optionally including detected issue references.

Frequently Asked Questions about commit

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

FAQPage Schema
How do I automate conventional git commit messages?

Automating conventional git commits requires parsing staged diffs to generate formatted messages, validating commit types, and optionally appending issue references detected from branch names to ensure structured history.

Can I extract issue IDs from a git branch name and append them to commits?

Yes, extracting issue IDs from branch names automatically appends references like ABC-123 or GH-456 to your commit messages, linking code changes directly to tracked issues without manual entry.

How do I split multiple logical changes in a single git diff into atomic commits?

Splitting multiple logical changes in a git diff involves analyzing the staged files to identify distinct modifications, then suggesting multiple smaller, atomic commits with individual conventional commit messages.

Does conventional commit automation run pre-commit checks for linting and tests?

Conventional commit automation integrates with pre-commit checks to run linting and tests before finalizing the commit, ensuring code quality validation passes prior to writing the formatted message.

What is the best way to enforce conventional commit formats in a Git workflow?

Enforcing conventional commit formats in a Git workflow uses an automation tool to validate commit message structure, apply emoji annotations for readability, and stage changes atomically before committing.

When should I split large changes into multiple conventional commits?

You should split large changes into multiple conventional commits when diff analysis identifies multiple logical modifications, allowing you to create smaller, atomic commits that clarify project history.