commit-batching

Instructions for splitting changes in a Git working folder into separate commits, where each commit contains one related change. Git is a tool for tracking code changes and commits are saved checkpoints.

In plain words
What is it for?
Checking changed files, grouping them by purpose, creating focused commits, and optionally pushing them when requested.
Why use it?
It prevents unrelated edits from being bundled together, making the history easier to review and undo.

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/dgilford/ai-science-toolkit/commit-batching
Any agent
npx skills add dgilford/ai-science-toolkit --skill commit-batching
Clone the repo
git clone --depth 1 https://github.com/dgilford/ai-science-toolkit

Made for: Claude Code, Codex.

Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,208 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.00072 $0.01208
Opus 5 $0.00036 $0.00604
Sonnet 5 $0.00014 $0.00242
Haiku 4.5 $0.00007 $0.00121

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

Security

Grade A, and why

commit-batching 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.

skills/commit-batching/SKILL.md · 63 lines

How it starts

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

You are about to commit. Do not git add -A && git commit the whole tree at once. Group the pending changes into logical, single-concern commits first.

Current working tree

git status --short 2>/dev/null || echo "(not a git repo)"
echo "--- branch ---"; git rev-parse --abbrev-ref HEAD 2>/dev/null || true
echo "--- staged/unstaged stat ---"; git diff --stat HEAD 2>/dev/null || true
echo "--- untracked ---"; git ls-files --others --exclude-standard 2>/dev/null || true

Method

  1. Survey — run git status (staged, unstaged, and untracked) and read enough of git diff to understand each change's intent. Never stage what you haven't looked at.
  2. Plan — group changed paths into single-concern batches and draft a one-line message for each. Present the plan as a compact list before executing.
  3. Execute per groupgit add <explicit paths> → confirm git diff --cached --stat matches the intended group → commit with a focused message. Repeat for the next group.
  4. Verify tree — after the loop, git status should be clean (or leave only paths you deliberately chose not to commit).
  5. Push — only if the original request asked you to push. Respect the repo's branching convention (branch first unless the project says commit straight to main).

Grouping principles

  • One concern per commit. A feature, a bugfix, a refactor, and a config/dependency bump are separate commits even when touched in the same working session.
  • Documentation folds in. A README or doc update that documents a specific batch belongs inside that batch's commit, not a standalone "update docs" commit. If one doc file's edits span several batches and can't be cleanly split, fold the whole doc change into the last batch you commit.
  • Generated/mechanical changes (lockfiles, formatting sweeps, generated tables) go either with the change that caused them or in their own clearly-labeled commit — never silently folded into a feature commit.
  • Order for coherence. Put prerequisites (a helper, a rename, a refactor) before the change that consumes them, so each commit stands on its own.
  • Don't over-split. One logical change spread across N files is one commit, not N.

Read the full file on GitHub · 63 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. 2d ago First seen · 63 lines · 72 tokens per session scan A 28d8e93ca3ce

Subscribe to this mod's changes

commit-batching is a skill published in the GitHub repository dgilford/ai-science-toolkit (62 stars, last pushed 13d ago), licensed MIT. It adds 72 tokens to every session and 1,208 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

git-wrapup

Land working-tree changes as logical commits — the work grouped by concern, topped by a release commit (version bump, changelog, regenerated artifacts) and an annotated tag. Verify, commit, tag. Stops at "committed and tagged locally" — no push, no publish. The release-and-publish skill picks up from here. Distilled…

cyanheads/obsidian-mcp-server · 82 tokens

wrap

Session end - document updates, commit.

mag123c/toktrack · 9 tokens

ship

Commit, push, create PR, then after approval check CI and merge. Use when work is done and ready to ship.

dlupiak/claude-session-dashboard · 27 tokens

campaign-commit

Choose the correct commit command in a campaign workspace. Use when you are about to commit and need to select camp commit, camp p commit, fest commit, or intentional root pointer sync via camp refs-sync.

Obedience-Corp/festival · 49 tokens

close

The "wrap" verb of the loop — end the session by writing the journal entry, updating touched project READMEs, committing, and pushing. Auto-invoked as the tail of /spec and /implement (the producer verbs) on clean completion, so "wrap" is not a verb the user types; also runnable directly. Dispatches /implement-audit…

Ashkaan/contextium · 121 tokens

git-commit-helper

Generates meaningful git commit messages for Spec-Driven Development workflows. Use when creating commits, suggesting commit messages, or helping with task-based version control. Automatically links commits to work packages.

korjwl1/toki-monitor · 42 tokens