commit

A Git workflow for creating a commit, which is a saved set of project changes with a message describing its purpose. It checks the staged files, branch, and message before saving the changes.

In plain words
What is it for?
Use it when saving work to Git, creating a checkpoint, or writing a commit message. It verifies the proposed change set and follows the project's commit-message rules.
Why use it?
It helps prevent unrelated files, leftover staged changes, or work on the wrong branch from entering a commit. It also accounts for changes made by automated checks during the commit.

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/jhostalek/dotclaude/commit
Any agent
npx skills add JHostalek/dotclaude --skill commit
Clone the repo
git clone --depth 1 https://github.com/JHostalek/dotclaude

Made for: Claude Code, Codex.

Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 300 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.00029 $0.00300
Opus 5 $0.00015 $0.00150
Sonnet 5 $0.00006 $0.00060
Haiku 4.5 $0.00003 $0.00030

Measured yesterday against content hash 53b8d102e422, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 yesterday.

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/commit/SKILL.md · 21 lines

What it actually says

Invoking this skill is the authorization to commit. What it adds is the check that the staged set, branch, and message are intentional first.

Verify the staged set first

Check git diff --cached (staged) against git diff HEAD (full worktree) before composing the message. When they diverge, the pre-existing index is likely residue from an aborted hook, rebase leftover, or another agent's partial stage — treat it as suspect, not yours, until confirmed. Stage whole files (git add <path>); partial-hunk staging orphans fixer output into the index if the commit is aborted later. One gotcha: a path-scoped git commit -- <paths> (git's --only mode) restores the pre-hook index on success and drops any fixer re-staging — follow such commits with git reset -q -- <paths> to clear it.

Wrong-branch check

Changes don't match branch name (auth changes on feature/geo-optimization) → likely wrong branch, confirm w/ user before committing.

Commit Format

!cat "${CLAUDE_SKILL_DIR}/../conventional-commits.md"

Capture intent, not implementation. Can't write a focused message → the commit spans unrelated changes, split it.

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. yesterday First seen · 21 lines · 29 tokens per session scan A 53b8d102e422

Subscribe to this mod's changes

commit is a skill published in the GitHub repository JHostalek/dotclaude (10 stars, last pushed 27d ago), licensed CC0-1.0. It adds 29 tokens to every session and 300 once invoked, about $0.0001 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.