git-commit

A command for making a Git commit after the user explicitly runs /commit. A Git commit records a set of project changes in version history.

In plain words
What is it for?
Use it to review changes, optionally update a project version, stage files, and create a commit that respects repository hooks and signing settings.
Why use it?
It helps check the working tree, avoid committing common secrets and generated files, and preserve the configured author information.

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/hackermanishackerman/claude-skills-vault/git-commit
Clone the repo
git clone --depth 1 https://github.com/hackermanishackerman/claude-skills-vault

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 946 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.00000 $0.00946
Opus 5 $0.00000 $0.00473
Sonnet 5 $0.00000 $0.00189
Haiku 4.5 $0.00000 $0.00095

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

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

How it starts

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

Commit Command

IMPORTANT: This command ONLY runs when explicitly invoked via /commit. Do NOT auto-commit after code modifications. Wait for user to explicitly run /commit.

Goal: Safe, attributed git commit for the configured git user.

1. Identity & Attribution

  • Author: Use git config user.name & git config user.email (linked GitHub account)
  • Credit: No co-authors/AI attribution unless requested

2. Safety Protocols

Forbidden Files:

  • Secrets: .env, .env.*, *.pem, *.key, id_rsa, secrets.*, credentials.*
  • Logs: *.log, npm-debug.log, yarn-error.log
  • System: .DS_Store, node_modules/, dist/, build/, __pycache__/, .venv/

Critical Flags:

  • No --no-verify (hooks must pass)
  • No --no-gpg-sign (sign if GPG configured)
  • No --amend (unless fixing immediate prev commit)

3. Version Control (Interactive)

Prompt: "Update project version?"

If YES:

  1. Detect: package.json | pyproject.toml | setup.py | Cargo.toml | VERSION
  2. Bump: Major (+1.0.0) | Minor (+0.1.0) | Patch (+0.0.1)
  3. Execute: Update file → Stage → Commit

4. Execution Flow

  1. git status - check state
  2. git diff - review (stop if secrets/debug found)
  3. Version check (above)
  4. Stage: git add <file> (use -p for mixed changes, avoid git add . w/ junk)
  5. Construct message (Conventional Commits)
  6. git commit -m "..."
  7. git status - verify

5. Commit Message Standard

Format: <type>(<scope>): <description>

Type Desc
feat new feature
fix bug fix
docs docs only
style formatting
refactor no fix/feat
perf performance
test tests
build build/deps
ci CI config
chore other
revert revert commit

Rules: Imperative mood, no period, max 72 chars, scope opt but recommended

6. Grouping

  • Atomic: Split unrelated changes into separate commits
  • Ask: "Changes in X & Y. Separate commits?"

Read the full file on GitHub · 131 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 · 131 lines · 0 tokens per session scan A dad69435e0cf

Subscribe to this mod's changes

git-commit is a command published in the GitHub repository hackermanishackerman/claude-skills-vault (2 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 946 tokens. 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.