agentleFS
tejastn10tejastn10/workbench/skills/quality/split-commit/SKILL.md

split-commit

Skill1 starsChanged 2 months agoMITView on GitHub

Turn a messy working tree or a fat WIP commit into a clean series of conventional commits — one logical change each, each one building and passing tests, subjects in the right type. Use when asked to "split this commit", "clean up before the PR", "these changes should be separate commits", or when a diff mixes a refactor with a feature.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never split commits that are already pushed and shared without agreeing first.

    line 32
  2. Distinctive:

    Commit as the configured git user, no AI trailers.

    line 33
  3. Distinctive:

    If two changes are genuinely entangled and can't be separated cleanly, one commit is fine — say so in the body.

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Split into conventional commits

House rule: one logical change per commit, Conventional Commits, imperative subject, no trailing period, enforced by commitlint. Prefactoring and refactors come before the change that needed them.

From an uncommitted working tree

  1. Group the diff. List the hunks and bucket them: the prefactor, the feature, the test, the unrelated fix you noticed. Each bucket is a commit.
  2. Stage a bucket — git add -p for hunk-level, or by file. Order: refactor/prefactor first, then the feature, then tests, then docs.
  3. Commit with the right type: refactor:, feat:, fix:, test:, chore:, docs: (or whatever a repo's commitlint.config.* defines).
  4. Verify each commit builds — git stash the rest, run the build/tests, git stash pop. A commit that doesn't build breaks quality/bisect later.
  5. Repeat until the tree is clean.

From an existing fat commit (not yet pushed)

  • git reset --soft HEAD~1 to put it all back in the index, then follow the working-tree flow above.
  • Or git rebase -i and mark it edit, then git reset HEAD^ at the stop.

Rules

  • Never split commits that are already pushed and shared without agreeing first.
  • Commit as the configured git user, no AI trailers.
  • If two changes are genuinely entangled and can't be separated cleanly, one commit is fine — say so in the body.

Anti-patterns

  • ❌ A commit that doesn't build on its own.
  • ❌ "wip", "fixes", "stuff" subjects.
  • ❌ A refactor and the feature it enabled in one commit.
  • ❌ Splitting shared history nobody agreed to rewrite.

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.