agentleFS
vladcheckvladcheck/agentic/skills/git-sequential/SKILL.md

git-sequential

Skill1 starsChanged 9 days agoMITView on GitHub

Use when a pile of uncommitted changes (or one big commit/diff) should become a clean sequence of logical commits.

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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
  1. Distinctive:

    Cross-dependent hunks in separate commits: If hunk B needs hunk A, put A's commit first or commit them together — otherwise the in-between …

    line 62
  2. Very specific:

    Faking a history that never built: If you care about bisectability, verify with --exec.

    line 64

≈ “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

git-sequential

Turn one undifferentiated blob of changes into an ordered sequence of small, coherent commits — as if the work had been done incrementally. Goal: a history that reads as a logical progression and (ideally) builds/passes at every step.

Purpose

You should use this skill when:

  • You wrote everything at once but want a reviewable, story-like history.
  • Splitting a big commit or diff before opening a PR.
  • Want each commit to be independently understandable / bisectable.

Skip for trivial single-purpose changes — one commit is correct.

Workflow

  1. Survey. git status and git diff (plus git diff --staged). Know every changed and untracked file.
  2. Plan the order. Sequence commits so each builds on the previous — dependencies/config first, then core/lib, then the feature that uses it, then tests, then docs. Write the list down before touching the index.
  3. Stage one step at a time:
    • Whole file: git add <file>
    • Selected hunks: git add -p (y/n per hunk, s to split, e to hand-edit a hunk)
    • Surgical splits -p can't make: git add -e (edit the raw patch)
    • Untracked file you need to split: git add -N <file> first (intent-to-add), then git add -p can offer its hunks.
  4. Commit the step with a message scoped to just that step. Repeat 3–4 until git status is clean.
  5. Verify: git log --oneline. To prove every commit builds: git rebase -i --exec "<test cmd>" <base> — it stops on the first commit that fails.

Splitting an existing single commit

git reset HEAD~          # keep changes, drop the commit; working tree now dirty
# ...then run the Workflow above

Mid-history commit: git rebase -i <base>, mark it edit, then git reset HEAD^ and recommit in pieces. Reorder/squash later with the same interactive rebase.

Quick reference

NeedCommand
Stage hunks interactively (needs user input)git add -p
Split a hunk furthers then e inside add -p
Stage part of an untracked filegit add -N <file> then git add -p
Hand-edit what gets stagedgit add -e
Undo last commit, keep changesgit reset HEAD~
Reorder / squash / edit historygit rebase -i <base>
Assert every commit buildsgit rebase -i --exec "<cmd>" <base>

Common mistakes

  • Cross-dependent hunks in separate commits. If hunk B needs hunk A, put A's commit first or commit them together — otherwise the in-between commit is broken.
  • Forgetting untracked files. git add -p ignores them until git add -N. Check git status is clean at the end.
  • Faking a history that never built. If you care about bisectability, verify with --exec. If you don't, say so and skip it.
  • Rebasing pushed/shared commits without coordinating — only rewrite history that's still local.

Troubleshooting

Limitations

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.