commit

A command for turning current Git changes into separate, focused commits. Git is the version-control system used to record and share code changes.

In plain words
What is it for?
It reviews the branch, changes, recent history, and remote setup, then creates atomic commits and can push them when an upstream branch is available.
Why use it?
It prevents unrelated work from being bundled together and follows the repository's existing commit style.

Command

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/anilcancakir/claude-code/commit
Clone the repo
git clone --depth 1 https://github.com/anilcancakir/claude-code
Per session 130 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,989 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.00130 $0.01989
Opus 5 $0.00065 $0.00994
Sonnet 5 $0.00026 $0.00398
Haiku 4.5 $0.00013 $0.00199

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

plugins/ac/commands/commit.md · 118 lines

How it starts

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

/ac:commit

Commit the current working-tree changes as atomic commits using the ac:git-master skill.

Request: $ARGUMENTS

Phase 0: Parse arguments

  1. Scan $ARGUMENTS for --skip-preflightSKIP_PREFLIGHT = true | false.
  2. Scan $ARGUMENTS for --no-pushNO_PUSH = true | false.
  3. Treat any other tokens as free-form note; ignore for now (the commit-style detection in Phase 2 produces the actual message).

Phase 1: Context

Capture the current git state up front so the rest of the command works from real data, not assumptions.

  • Current branch: !git branch --show-current
  • Working-tree status: !git status --short
  • Staged diff stat: !git diff --staged --stat
  • Unstaged diff stat: !git diff --stat
  • Recent commits (30 for style detection): !git log -30 --pretty=format:"%h %s"
  • Upstream tracking: !git rev-parse --abbrev-ref @{upstream} 2>/dev/null || echo "NO_UPSTREAM"
  • Merge base with main/master: !git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null || echo "NO_BASE"
  • Local-only commits ahead of base: !git log --oneline $(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null)..HEAD 2>/dev/null || echo "NO_BASE"

If the working tree is clean (status output empty), stop with the message Nothing to commit. Working tree clean. and skip every remaining phase.

Phase 2: Preflight (skip if SKIP_PREFLIGHT)

Goal: Catch obvious breakage before writing history.

Skip this phase when SKIP_PREFLIGHT = true. /ac:execute Phase 4 sets this flag because it already ran the Final Verification Wave; running typecheck and tests a second time wastes time.

When SKIP_PREFLIGHT = false:

  1. Read CLAUDE.md and CLAUDE.local.md if present to find typecheck, test, and lint commands (sections labelled commands, scripts, or under a "Build / Test / Lint" header). Fall back to package.json scripts block when CLAUDE.md does not name the commands.
  2. Run typecheck, then tests, then linter in that order. Each one through Bash. Use the project's actual commands, not generic guesses.
  3. Pass: continue to Phase 3.
  4. Fail: stop. Print which preflight step failed and the first ~30 lines of the failure output. Do not commit. The user fixes the issue and re-invokes /ac:commit.

Read the full file on GitHub · 118 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 · 118 lines · 130 tokens per session scan A fa895f996199

Subscribe to this mod's changes

commit is a command published in the GitHub repository anilcancakir/claude-code (3 stars, last pushed 13d ago), licensed MIT. It adds 130 tokens to every session and 1,989 once invoked, about $0.0006 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.