commit-smart

A guide for writing Git commit messages that explain why a change was made. Git commits are saved snapshots of code, and clear messages help developers understand changes later, including during bug investigation.

In plain words
What is it for?
Use it when staging and committing changes to choose a conventional commit type, write a concise subject, and add context about the reason for non-obvious work.
Why use it?
It keeps commit history useful by recording the problem, constraints, and reasoning instead of only listing changed files.

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/orlando-japan/claude-code-setting/commit-smart
Any agent
npx skills add orlando-japan/claude-code-setting --skill commit-smart
Clone the repo
git clone --depth 1 https://github.com/orlando-japan/claude-code-setting

Made for: Claude Code, Codex.

Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 672 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.00031 $0.00672
Opus 5 $0.00015 $0.00336
Sonnet 5 $0.00006 $0.00134
Haiku 4.5 $0.00003 $0.00067

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

Security

Grade A, and why

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 2d 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.

templates/extra/skills/commit-smart/SKILL.md · 87 lines

How it starts

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

Commit smart

The commit message is the one artifact a future bisector will read. Make it earn its keep.

Format

Conventional Commits, lightweight:

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

<body: why, not what>

<footer: refs, breaking notes>

Types: feat, fix, refactor, test, docs, chore, perf, build, ci.

Subject rules: imperative mood, lowercase, no trailing period, ≤72 chars.

The subject

  • Good: fix(auth): redirect logged-out users with return_to
  • Good: refactor(db): extract connection pooling into pool.ts
  • Bad: Fixed a bug (vague, past tense)
  • Bad: Update auth.ts (what file, not what change)
  • Bad: Fix: fix the fix for the auth issue (noise)

The body — why, not what

The diff shows what changed. The body answers:

  • What was the problem this solves?
  • What constraint forced this particular solution?
  • What alternative did you consider and reject, and why?

Skip the body for obvious changes: typo, dep bump, version tag.

Example:

fix(auth): redirect logged-out users with return_to

Users who bookmarked /settings and were logged out were landing
on /login with no path back. They had to navigate manually after
logging in, and ~15% bounced.

Alternative considered: store return_to in a cookie on the 401.
Rejected because cookies persist across sessions and can leak
stale redirects.

One logical change per commit

  • Bug fix + its test: one commit (they prove each other).
  • Feature + unrelated refactor: two commits.
  • Rename + functional change: two commits (the rename comes first, makes the second reviewable).

If git diff --staged shows changes that don't belong together, unstage and split.

What never goes in a commit

  • Secrets. Check git diff --staged | grep -iE '(token|secret|key|password)' before every commit.
  • Large binaries. Use LFS or a bucket.
  • Generated files your build produces.
  • console.log, print(), binding.pry left over from debugging.
  • Commented-out code.

Read the full file on GitHub · 87 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. 2d ago First seen · 87 lines · 31 tokens per session scan A c07d1ded8fb0

Subscribe to this mod's changes

commit-smart is a skill published in the GitHub repository orlando-japan/claude-code-setting (2 stars, last pushed 3mo ago), licensed MIT. It adds 31 tokens to every session and 672 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-31.

Related

Other skills, from other repositories

conventional-commit-message

Generate high-quality Conventional Commit messages for repositories using conventional-changelog-conventionalcommits.

conventional-changelog/conventional-changelog · 23 tokens

git-commit

Creates git commits following Conventional Commits format with type/scope/subject. Use when user wants to commit changes, create commit, save work, or stage and commit. Enforces project-specific conventions from CLAUDE.md.

fvadicamo/dev-agent-skills · 49 tokens

git-commit

Safely orchestrate Conventional Commits for staged Git changes, or all working-tree changes when the user explicitly asks to include everything. Use when asked to write a commit message, split staged or working-tree changes, organize a messy index, or draft commit text without pushing. Auto-detects commit language…

bahayonghang/my-ai-cli-toolkit · 203 tokens

git-authoring

Authors and executes git work end to end — Conventional Commits messages, pull-request content, release notes, and pull-request review, plus the repository operations an engineer runs daily: branching, rebasing, squashing, cherry-picking, reverting, merge-conflict resolution, stashes, tags, remotes, and recovery…

n-shadloo/git-authoring · 220 tokens

Git Commit Writer

Generates conventional commit messages from staged changes or a diff.

Notysoty/openagentskills · 16 tokens

stage

Use when committing work from the current session to stage ONLY hunks the session touched, not the entire file. Prevents accidentally staging unrelated uncommitted changes from other work.

photostructure/coding-skills · 37 tokens