git-commit

A command for preparing and creating a Git commit using Conventional Commits, a format that labels changes such as features or fixes. Git is a system for tracking code changes, and the command also uses repository workflow guidance.

In plain words
What is it for?
Use it to inspect status and diffs, review recent commit style, check the .gitignore file, decide branch versus trunk, and create a properly described commit.
Why use it?
It checks the repository and change size before committing, helping catch missing ignore rules, sensitive files, unclear history, or changes that should be handled on a branch.

Command for Claude Code

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 commands/robconery/cassini-workshop/git-commit
Clone the repo
git clone --depth 1 https://github.com/robconery/cassini-workshop

Made for: Claude Code.

Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 925 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.00024 $0.00925
Opus 5 $0.00012 $0.00463
Sonnet 5 $0.00005 $0.00185
Haiku 4.5 $0.00002 $0.00093

Measured yesterday against content hash 8072a7d74274, 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 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

.claude/commands/git-commit.md · 74 lines

How it starts

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

commit

Create a clean, well-described commit for the current working changes. Defers to the github skill for branching and message format.

Behavior

  1. Inspect first. Run in parallel:
    • git status (no -uall)
    • git diff (staged + unstaged)
    • git log -n 10 --oneline to match the project's commit style
    • ls .gitignore to confirm a .gitignore exists
  2. Require a .gitignore. If one is missing, stop and offer to create one scaffolded to the project (Bun/Node/TS by default — node_modules/, dist/, .env*, .DS_Store, IDE folders, build artifacts). Do not proceed with the commit until the user accepts or provides their own. If .gitignore exists, glance at it and warn if anything obviously sensitive in the diff isn't covered.
  3. Check change size first. Roughly: count files changed and lines touched. If it looks like a lot (rule of thumb: >10 files OR

    300 lines OR touches >2 distinct concerns), stop and ask whether a short-lived branch would be better. Recommend a name in <type>/<slug> form derived from the diff (e.g. feat/order-fulfillment-tx). Wait for the user before continuing.

  4. Decide branch vs trunk per github skill:
    • Trunk → commit straight to main for tiny, obvious changes.
    • Branch → create <type>/<short-slug> if the change is non-trivial, spans multiple files meaningfully, or implements a story task.
  5. Stage everything with -am. Use git commit -am "<summary>" (with -F for the long body via a HEREDOC file when needed) so tracked modifications and deletions are all included — nothing gets left behind. For brand-new untracked files, git add <file> them explicitly first (since -a won't pick those up). Always re-scan for likely secrets (.env*, *.pem, *credentials*, API tokens in the diff) before staging — refuse the commit if any are found, name the file, and ask the user.
  6. Write the message per the github skill:
    • Conventional Commit summary (<type>(<scope>): <imperative>).
    • Detailed body: what changed, why, trade-offs. Wrap ~72 cols.
    • Footers: Refs <story-id> / Closes #<n> where applicable.
  7. Commit via HEREDOC so formatting is preserved. Append:
    Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
    
  8. Verify with git status after the commit. If a hook fails, fix the underlying issue and create a NEW commit — never --amend without being asked.

Read the full file on GitHub · 74 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. yesterday First seen · 74 lines · 24 tokens per session scan A 8072a7d74274

Subscribe to this mod's changes

git-commit is a command published in the GitHub repository robconery/cassini-workshop (1 stars, last pushed 2mo ago), licensed MIT. It adds 24 tokens to every session and 925 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.