git-commit

git-commit is a skill for Claude Code, Codex from onsager-ai/dev-skills. It costs 92 tokens per session (1,046 once invoked), scanned A, original, MIT.

A guide for creating clean Git commits, which are saved groups of project changes with messages explaining their purpose.

In plain words
What is it for?
It helps decide what to stage together, write commit messages, amend unpublished commits, respond to hook failures, and avoid bypassing verification.
Why use it?
It helps keep history understandable and provides a process for handling related changes and failed checks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps decide what to stage together, write commit messages, amend unpublished commits, respond to hook failures, and avoid bypassing verification.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/onsager-ai/dev-skills/git-commit
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.

Any agent
npx skills add onsager-ai/dev-skills --skill git-commit
Clone the repo
git clone --depth 1 https://github.com/onsager-ai/dev-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-commit

README.md
[![agentmods](https://agentmods.dev/badge/skills/onsager-ai/dev-skills/git-commit/github.svg)](https://agentmods.dev/skills/onsager-ai/dev-skills/git-commit)
Your own site
<a href="https://agentmods.dev/skills/onsager-ai/dev-skills/git-commit"><img src="https://agentmods.dev/badge/skills/onsager-ai/dev-skills/git-commit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git-commit

Your own site · 80×15
<a href="https://agentmods.dev/skills/onsager-ai/dev-skills/git-commit"><img src="https://agentmods.dev/badge/skills/onsager-ai/dev-skills/git-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,046 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00092 $0.01046
Opus 5.5 $0.00037 $0.00418
Sonnet 5.5 $0.00018 $0.00209
Haiku 4.5 $0.00009 $0.00105

Measured 1mo ago against content hash 2398ae0359a8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

git-commit 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 1mo 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/SKILL.md · 144 lines

How it starts

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

Git Commit

Write clean, atomic commits that communicate intent clearly.

When to Use This Skill

Activate when any of the following are true:

  • User asks to "commit", "make a commit", "stage changes", or "write a commit message"
  • User says "commit my changes" or "commit this"
  • A logical unit of work is complete and ready to land
  • User asks about git add, git commit, or git amend

Decision Tree

What does the user need?

Stage + commit changes?
  → Check what changed: git status + git diff --staged
  → Group related changes (atomic commit rule below)
  → Write message in conventional format
  → If hook fails: fix root cause, re-stage, new commit

Amend the last commit?
  → ONLY if NOT yet pushed to remote
  → OK for: missing file, minor message fix, small oversight
  → New commit instead: substantial change, already pushed

Write a commit message only?
  → Follow conventional format below
  → Lead with "why", not "what"

Hook failure?
  → Read the full hook output
  → Fix the root cause — never use --no-verify

Conventional Commits Format

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

<body>      ← optional; explain *why*, not *what*
<footer>    ← optional; breaking changes, refs

Types

Type When
feat New feature or capability
fix Bug fix
refactor Code restructure, no behavior change
docs Documentation only
test Adding or fixing tests
chore Build, tooling, dependency updates
perf Performance improvement
ci CI/CD workflow changes

Rules

  • Subject: ≤ 72 chars, imperative mood ("add" not "added"), no trailing period
  • Body: wrap at 72 chars; explain motivation, not mechanics
  • Breaking change: BREAKING CHANGE: footer, or ! after type (feat!:)

Atomic Commits

One commit = one logical change. A reviewer should understand it without other commits.

Group together: all files for a single feature or fix; tests with the code they cover.

Keep separate: refactors from behavior changes; unrelated fixes; half-done work.

Read the full file on GitHub · 144 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. 1mo ago First seen · 144 lines · 92 tokens per session scan A 2398ae0359a8

Subscribe to this mod's changes

git-commit is a skill published in the GitHub repository onsager-ai/dev-skills (6 stars, last pushed 7d ago), licensed MIT. It adds 92 tokens to every session and 1,046 once invoked, about $0.0004 per session on Opus 5.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.