Get the FREE Ultimate OpenClaw Setup Guide →

git-commit-helper

Scanned
npx machina-cli add skill qyinm/agent-skills-archive/git-commit-helper --openclaw
Files (1)
SKILL.md
2.3 KB

Overview

Provides expert guidance for creating conventional commit messages that follow industry best practices. Helps generate clear, consistent commit messages by analyzing staged changes.

Conventional Commit Format

<type>(<scope>): <description>

[optional body]

[optional footer(s)]

Commit Types

  • feat: A new feature for the user
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that don't affect code meaning (white-space, formatting, missing semi-colons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit

Rules

  1. Type is mandatory: Choose the most appropriate type from the list above
  2. Scope is optional: Add in parentheses to specify what part of codebase (e.g., feat(auth):, fix(api):)
  3. Description:
    • Use imperative mood ("add" not "added" or "adds")
    • Don't capitalize first letter
    • No period at the end
    • Keep under 72 characters
  4. Body is optional: Provide context about what and why, not how
  5. Footer is optional: Reference issues, note breaking changes

Examples

Simple commit

feat: add user authentication

With scope

fix(auth): prevent token expiration on refresh

With body

refactor(api): restructure endpoint handlers

Move handler logic into separate service layer to improve
testability and maintain single responsibility principle.

Breaking change

feat(api): change authentication response format

BREAKING CHANGE: API now returns user object instead of just token.
Update all API consumers to handle new response structure.

Multiple footers

fix(database): resolve connection pool exhaustion

Fixes #123
Closes #456

Source

git clone https://github.com/qyinm/agent-skills-archive/blob/main/git-commit-helper/SKILL.mdView on GitHub

Overview

Provides expert guidance for creating conventional commit messages that follow industry best practices. It helps generate clear, consistent messages by analyzing staged changes and applying the standard <type>(<scope>): <description> format.

How This Skill Works

The skill analyzes the current staged changes to determine a suitable type and optional scope. It then formats the message according to the Conventional Commits standard, and suggests an optional body and footer when needed.

When to Use It

  • When creating a new commit that follows conventional formats
  • When editing an existing commit message to improve clarity
  • When aligning your commits with conventional commits for tooling and changelogs
  • When preparing commits for PRs, releases, or changelogs
  • When noting breaking changes or issue references in footers

Quick Start

  1. Step 1: Determine the commit type and optional scope
  2. Step 2: Write an imperative description under 72 characters
  3. Step 3: Add a concise body and optional footers if needed; commit using the conventional format

Best Practices

  • Always choose the most appropriate type from the allowed list
  • Add an optional scope to pinpoint the affected code area
  • Write the description in imperative mood, don't capitalize the first letter, and do not end with a period
  • Include a concise body explaining what and why, not how
  • Use footers to reference issues or signal breaking changes

Example Use Cases

  • feat: add user authentication
  • fix(auth): prevent token expiration on refresh
  • refactor(api): restructure endpoint handlers
  • feat(api): change authentication response format
  • fix(database): resolve connection pool exhaustion

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers