agentleFS
inttegrointtegro/labor/skills/batch-commit/SKILL.md

batch-commit

Skill1 starsChanged 4 days agoMITView on GitHub

Groups uncommitted changes into logical batches, stages each batch with git add, and provides a one-liner commit message for each. Use when there are many changed files that should be committed as separate logical units.

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Run git status --short and git diff --stat HEAD to understand all pending changes.

    line 12
  2. Distinctive:

    Read the changed files and relevant repository instructions to understand what each change does.

    line 13
  3. Distinctive:

    NEVER run git commit yourself — only git add

    line 26
  4. Distinctive:

    NEVER stage files outside the agreed batch (no git add .

    line 27
  5. Distinctive:

    Prefer path-specific or patch-mode staging when a file contains unrelated changes.

    line 28
  6. Very specific:

    Keep commit messages concise: <scope>: <what changed> format

    line 30
  7. Distinctive:

    If a file has changes that belong to multiple batches, put it in the batch where its primary change belongs

    line 32
  8. Distinctive:

    If there are only 1-3 related files, just stage them all as one batch — don't over-split

    line 34
  9. Distinctive:

    Follow the project's existing commit style.

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Batch Commit

Groups uncommitted changes into logical batches and stages them one at a time, providing a commit message for each.

Process

  1. Run git status --short and git diff --stat HEAD to understand all pending changes.
  2. Read the changed files and relevant repository instructions to understand what each change does.
  3. Group related changes into logical batches (typically 3-7 batches). Group by:
    • Feature/purpose: files that work together for the same feature
    • Layer: infrastructure, services, UI, config, tests
    • Type of change: new files, bug fixes, refactors
  4. Present ALL batches as a numbered summary with:
    • The files in each batch
    • A one-liner commit message
  5. Stage the first batch with explicit paths or hunks.
  6. Show the staged diff and wait for the user to commit, then stage the next batch when asked.

Rules

  • NEVER run git commit yourself — only git add
  • NEVER stage files outside the agreed batch (no git add . or git add -A).
  • Prefer path-specific or patch-mode staging when a file contains unrelated changes.
  • Inspect git diff --cached --check and git diff --cached before handing off a batch.
  • Keep commit messages concise: <scope>: <what changed> format
  • Order batches so foundational changes come first (infra before features, libraries before consumers)
  • If a file has changes that belong to multiple batches, put it in the batch where its primary change belongs
  • Exclude files that look like they shouldn't be committed (.env, secrets, temp files) and flag them to the user
  • If there are only 1-3 related files, just stage them all as one batch — don't over-split

Commit Message Style

Follow the project's existing commit style. If no clear style exists, use:

<scope>: <short imperative description>

Examples:

  • api: add authenticated client token bridge
  • billing: fix invoice pagination response shape
  • docs: update deployment guide for new environment variables

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.