commit-chunks

A Git command that divides local code changes into several logical commits. A commit is a saved checkpoint in a Git repository.

In plain words
What is it for?
Use it to inspect staged and unstaged changes, propose commit groups with file lists, wait for approval, and create the approved commits.
Why use it?
It keeps unrelated changes separate, making the history easier to review and individual changes easier to manage.

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/motlin/claude-code-plugins/commit-chunks
Clone the repo
git clone --depth 1 https://github.com/motlin/claude-code-plugins
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 378 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.00007 $0.00378
Opus 5 $0.00003 $0.00189
Sonnet 5 $0.00001 $0.00076
Haiku 4.5 $0.00001 $0.00038

Measured 2d ago against content hash 25168bb36d16, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

commit-chunks 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 2d 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.

plugins/git/commands/commit-chunks.md · 46 lines

What it actually says

📝 Commit the local changes to git. Analyze my local changes and propose splitting them into multiple logical commits.

For each proposed commit, show me the message and the list of files. Show all proposals at once. Wait for my confirmation, then commit all.

ALWAYS use the code:cli skill.

Context

  • Current git status: !git status
  • Current git diff (staged changes): !git diff --cached
  • Current git diff (unstaged changes): !git diff
  • Current branch: !git branch --show-current
  • Recent commits: !git log --oneline -10

Task

  1. File Staging
  • 📦 Stage files individually using git add <file1> <file2> ...
  • NEVER use commands like git add ., git add -A, or git commit -am which stage all changes
  • Only stage files that were explicitly modified for the current task
  1. Commit Message Creation
  • 🐛 If the user pasted a compiler or linter error, create a fixup commit using git commit --fixup <sha>
  • Otherwise commit messages should:
  • Start with a present-tense verb (Fix, Add, Implement, etc.)
  • Be concise (60-120 characters)
  • Be a single line
  • End with a period.
  • Borrow language from the original prompt
  • Avoid praise adjectives (comprehensive, robust, essential, best practices)
  • Echo exactly this: Running: git commit --message "<message>"
  1. Pre-commit hooks

When pre-commit hooks fail:

  • Stage the files modified by the hooks individually
  • Retry the commit
  • Never use git commit --no-verify
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. 2d ago First seen · 46 lines · 7 tokens per session scan A 25168bb36d16

Subscribe to this mod's changes

commit-chunks is a command published in the GitHub repository motlin/claude-code-plugins (15 stars, last pushed 3d ago), licensed Apache-2.0. It adds 7 tokens to every session and 378 once invoked, about $0.0000 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-30.