git-commit-smart

A helper for creating Git commit messages from staged code changes. It formats messages using the Conventional Commits style, such as feat, fix, or docs.

In plain words
What is it for?
Reviewing staged changes and drafting commit messages with a type, optional scope, short subject, explanation, breaking-change notes, and issue references.
Why use it?
Writing a clear commit message requires understanding what changed and why, while also following project conventions. This uses the staged diff to produce a consistent message.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/majiayu000/spellbook/git-commit-smart
Any agent
npx skills add majiayu000/spellbook --skill git-commit-smart
Clone the repo
git clone --depth 1 https://github.com/majiayu000/spellbook

Made for: Claude Code, Codex.

Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,027 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.01027
Opus 5 $0.00016 $0.00513
Sonnet 5 $0.00006 $0.00205
Haiku 4.5 $0.00003 $0.00103

Measured 3d ago against content hash d0f421be1460, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

git-commit-smart scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/git-commit-smart/SKILL.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Smart Git Commit

Inspired by claude-code-plugins-plus

Purpose

Automatically generate meaningful commit messages by analyzing staged changes, following conventional commit format.

Commit Message Format

<type>(<scope>): <subject>

<body>

<footer>

Types

Type Description
feat New feature
fix Bug fix
docs Documentation only
style Formatting, no code change
refactor Code change, no new feature or fix
perf Performance improvement
test Adding/updating tests
chore Maintenance tasks
ci CI/CD changes
build Build system changes

Scope

Optional, indicates the section of codebase:

  • auth, api, ui, db, config, etc.

Subject

  • Imperative mood ("add" not "added")
  • No period at end
  • Max 50 characters
  • Lowercase

Body

  • Explain WHAT and WHY, not HOW
  • Wrap at 72 characters
  • Separate from subject with blank line

Footer

  • Breaking changes: BREAKING CHANGE: description
  • Issue references: Closes #123, Fixes #456

Workflow

1. Analyze Changes

# View staged changes
git diff --staged

# View changed files
git diff --staged --name-only

# View stats
git diff --staged --stat

2. Determine Type

Based on changes:

  • New files with features → feat
  • Modified files fixing issues → fix
  • Only .md files → docs
  • Only test files → test
  • package.json, configs → chore or build

3. Identify Scope

Look at file paths:

  • src/auth/* → scope: auth
  • src/api/* → scope: api
  • tests/* → scope: test
  • Multiple areas → omit scope or use broader term

4. Write Subject

Summarize the change:

feat(auth): add OAuth2 login support
fix(api): handle null response in user endpoint
docs: update README with installation steps
refactor(db): extract query builder to separate module

5. Write Body (if needed)

For complex changes:

feat(auth): add OAuth2 login support

Implement OAuth2 authentication flow with support for
Google and GitHub providers. This allows users to sign
in without creating a separate account.

- Add OAuth2 client configuration
- Implement callback handlers
- Store OAuth tokens securely
- Add provider selection UI

Read the full file on GitHub · 197 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 197 lines · 32 tokens per session scan A d0f421be1460

Subscribe to this mod's changes

git-commit-smart is a skill published in the GitHub repository majiayu000/spellbook (263 stars, last pushed 3d ago), licensed MIT. It adds 32 tokens to every session and 1,027 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.