🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Git Smart Commit

by @wusuiling-if

Analyze staged git changes and generate high-quality commit messages following Conventional Commits format. Use when: (1) user asks to commit changes, (2) us...

Versionv1.0.0
Installs1
πŸ’‘ Examples

Single file fix:

fix(auth): handle expired JWT tokens in refresh flow

Multi-file feature:

feat(api): add pagination support to list endpoints

Implement cursor-based pagination for /users, /posts, and /comments. Default page size is 20, max 100.

Breaking change:

feat(config)!: migrate from YAML to TOML configuration

BREAKING CHANGE: config.yaml is no longer supported. Run migrate-config to convert existing configs.

Chore:

chore(deps): bump express from 4.18.2 to 4.19.0

βš™οΈ Configuration

The user may specify preferences:

  • --no-body: Skip the body, subject only
  • --scope : Force a specific scope
  • --type : Force a specific type
  • --amend: Amend the previous commit instead
  • --dry-run: Generate message without committing
  • πŸ”’ Constraints

  • type: One of feat, fix, refactor, docs, chore, test, style, perf, ci, build
  • scope: Optional. Infer from changed files (e.g., auth, api, ui, db). Omit if changes span too many areas.
  • subject: Imperative mood, lowercase, no period, max 72 chars. Be specific β€” not "update files" but "add retry logic to HTTP client".
  • body: Add only when the "why" isn't obvious from the subject. Wrap at 72 chars.
  • breaking changes: Add ! after type/scope and BREAKING CHANGE: footer.
  • Multiple logical changes: If the diff contains clearly unrelated changes, suggest splitting into multiple commits with git add -p.
  • Type Selection Guide

    | Signal | Type | |--------|------| | New feature, new endpoint, new UI element | feat | | Bug fix, error correction, patch | fix | | Code restructure, no behavior change | refactor | | Comments, README, docs, JSDoc | docs | | Dependencies, configs, tooling | chore | | Test files added/modified | test | | Formatting, whitespace, linting | style | | Performance improvement | perf | | CI/CD pipeline changes | ci | | Build system, compilation | build |

    Quality Checklist

    Before presenting the message, verify:

  • [ ] Subject is specific and descriptive (someone reading git log --oneline can understand the change)
  • [ ] Type accurately reflects the change
  • [ ] Scope is correct or intentionally omitted
  • [ ] No vague words: "update", "change", "modify", "fix stuff", "misc"
  • [ ] Breaking changes are flagged if applicable
  • View on ClawHub
    TERMINAL
    clawhub install git-smart-commit

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’