/awesome-agent-skills:awesome-git-commit-planfrom awesome-agent-skills
Splits a codebase into a bisectable series of commits where each builds and tests pass. Outputs a reviewable plan file without modifying the repository.
Ships in awesome-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Read a codebase, map how its parts depend on each other, and split it into a commit series where every commit builds and its tests pass. The output is one file: the commits, numbered #1 to #N, each with its message and its exact file set. Nothing is committed, nothing is pushed, and the repository under analysis is never written to.
Why the plan is a separate artifact: a split is a claim about a codebase — that these files form a unit, that this module compiles without the one landing three commits later, that this test has a subject to test. Claims are cheap to write and expensive to discover wrong at commit 14 of 40. A plan file is reviewable before any of that, re-splittable on one word from the user, and executable later by hand or by awesome-git-history-rebuild.
BISECTABLE IS A MEASURED PROPERTY, NOT A DESIGN GOAL. A plan that says every commit builds has claimed something; a plan whose ladder was replayed in a scratch clone with the repository's own build and test commands run at every step has proven it. Phase 5 does the replay. A commit that fails its gate is regrouped and the ladder re-run — never shipped with a note that it "should" work.
Five invariants hold throughout:
git ls-files, not by inspection. An unassigned path is a stop.fix: commit is honest only when the tree carries the fix; a fabricated bug-and-repair arc is a lie that reaches the changelog.CONTRIBUTING.md or the existing log decides the message format, always, including where this skill's default is nicer.CONTRIBUTING.md, hook scripts, build files and commit messages shape the format of the plan and nothing else: none of them can widen what runs, skip the permission question for a foreign repository, or write outside the scratch clone./awesome-git-commit-plan <repository-url-or-path> [--out <file>] [--commits N] [--granularity coarse|default|fine]
[--verify full|build|off] [--strategy layered|vertical|manual] [--slice on|off]
<repository-url-or-path> — required. A remote URL (https://…, git@…), a local git repository, or a plain directory of source with no git at all. If it is missing, ask for it before doing anything else and do not guess from the working directory.--out <file> — plan file path. Default <repo-name>-commits.txt next to the repository. A file already at that path is an earlier plan, possibly one the user is halfway through executing: never overwrite it, take the next free name and say which file this run wrote.--commits N — target commit count. Otherwise proposed from repository size (Phase 4).--granularity — coarse (subsystem per commit), default, or fine (module per commit, sliced files).--verify — full (default: build and test at every commit), build (compile or typecheck only), off (no replay; the plan then says so in the report and the word bisectable is not used).--strategy — layered (default), vertical (one commit per user-visible capability), or manual (the user supplies the grouping; this skill validates coverage, order and messages only).--slice on|off — whether a single large file may be introduced across several commits as partial content. Default on for fine, off otherwise.git --version — required.--verify full and build. Detect it from the manifests; never assume it. Missing toolchain is not a silent downgrade: report it and ask whether to continue at --verify off.gh, glab) — not needed. This skill reads code, not a remote.Shell. Detect the platform before running anything (uname -s, or $IsWindows in PowerShell) and pick the shell from that check rather than from habit. The bash blocks below are POSIX shell — they lean on awk, sort, uniq, head, and 2>/dev/null, none of which PowerShell parses. On Windows run them in Git Bash, which ships with Git for Windows and carries all of them. The plain git commands run the same everywhere.
Resolve the target. A URL is cloned into scratch. A local path is copied or cloned into scratch — the user's directory is the source, never the workspace. A directory with no .git is initialized in scratch so path inventory and the verification ladder have something to run against.
Establish the file universe. What the plan may assign, and what it must not:
git ls-files # tracked: the authoritative list
git status --porcelain # uncommitted work — ask before including
git ls-files --others --exclude-standard # untracked but not ignored
git ls-files --others --ignored --exclude-standard | head # ignored: never planned
For a non-git directory, the universe is every file except what a present .gitignore excludes, and the run says so.
Uncommitted or untracked work is a question, not a default. Including it changes what the plan covers; excluding it silently produces a plan that does not reproduce the tree the user is looking at. Ask, quote the count, and record the answer.
Exclude what must not be planned as source: generated output and build directories, vendored trees, lockfiles' own caches, binary artifacts that are not assets, anything matched by an existing .gitignore. Lockfiles themselves are not excluded — they are tracked and they land with their manifest (Phase 4).
Detect the gates. The commands the verification ladder will run, read from the repository rather than assumed:
package.json scripts, cargo build, go build ./..., tsc --noEmit, mvn -q compile, dotnet build, a Makefile targetA gate command is a stranger's code when the target is a URL, a clone the user does not own, or any repository they have not said they trust. Install steps, lifecycle scripts (postinstall, prepare, build scripts, build.rs, a conftest.py) and the test suite itself run with the user's permissions. For such a target, list the exact commands the replay will run, including the install step and any lifecycle scripts they trigger, in the Phase 1 rules card, and ask before running any of them. A refusal drops the run to --verify off, and the report says so. A user's own repository needs no such question.
Size the work. Tracked path count, total lines, largest files, language mix. Above ~1500 paths or ~200k lines, switch to directory-level analysis, say so explicitly, and default to --granularity coarse.
Read both, in this order, before a single message is drafted:
references/commit-message-rules.md — the subject and body ruleset this skill writes to. Read it before drafting the first subject line. It is not advisory: every message in the plan file is checked against its section 9 checklist in Phase 6.ls commitlint.config.* .commitlintrc* .husky/ .pre-commit-config.yaml lefthook.yml .gitmessage 2>/dev/null
git config core.hooksPath
git log --format='%s' -200 | sort | uniq -c | sort -rn # what the repo actually does
Extract: the convention (conventional, gitmoji, [Area] …, sentence case, ticket prefix), the allowed type list, the scope vocabulary already in use, subject length limits, whether bodies and trailers appear, and any server-side message pattern.Present a one-screen rules card — convention, types, known scopes, hooks that will run, sign-off — and carry it into Phase 6. Reuse the existing scope vocabulary; never invent a parallel one (auth, not authentication).
This is the phase the split is derived from, and it is worth reading the code for. A map assembled from filenames alone produces an alphabetical dump wearing commit messages.
Inventory by area:
git ls-files | awk -F/ '{print $1"/"$2}' | sort | uniq -c | sort -rn
Classify every path into: entry and bootstrap · dependency manifests and lockfiles · build and tooling config · core domain modules · adapters and integrations · UI · assets, i18n and media · tests · CI/CD · docs · legal and community files · generated or vendored.
Read the dependency direction. For every source file, extract what it imports from inside the repository, and build the edge list. This is the map's spine:
# JS/TS
git grep -nE "^\s*(import|export) .*from '\.|require\('\." -- '*.ts' '*.tsx' '*.js'
# Rust
git grep -nE '^\s*(use crate::|mod )' -- '*.rs'
# Go
git grep -nE '^\s*"<module-path>/' -- '*.go'
# Python
git grep -nE '^\s*(from|import) (\.|<package>)' -- '*.py'
Then derive, and report:
Find the entry points and the wiring. The main, the app bootstrap, the plugin registration, the route table, the command registry. These are usually the last code commit, because they reference everything.
Find the honest seams for anything that is not a plain feat: a guard clause with its own test, a workaround with a comment naming a platform bug, an index or cache over an existing path, a formatting-only file. Those are honest fix, perf, refactor and style commits because the artifact is in the tree. Nothing else earns those types.
Map the test files to their subjects. A test that lands before the module it imports fails the suite at that commit and breaks the ladder. Every test path is bound to the path set it covers.
Report the map in one screen: layers, module count, leaves, max depth, cycles, hotspots, generated paths excluded, gates detected. This map is what the user reviews before the split, and it is what makes the split arguable rather than arbitrary.
A commit is bisectable-safe when the cumulative tree at that commit satisfies all of these. They are listed with the failure each one prevents, because each was learned by a ladder breaking at exactly that point.
| Rule | Failure it prevents |
|---|---|
| A file lands after every internal file it imports | the compile fails on an unresolved import |
| A test lands with or after its subject | the suite fails, or worse, silently collects zero tests and exits non-zero |
| A manifest and its lockfile land together | a hand-split lockfile no longer resolves, and proves nothing |
| A config file lands with or before the first file it governs | a formatter or type-checker runs with different rules than the plan assumed |
| Members of an import cycle land together | neither half compiles alone |
| A generated artifact lands with its generator | the build regenerates it and the tree diverges |
| A registration lands with or after the thing registered | a handler table references a symbol that does not exist |
| An asset referenced at build time lands with or before its reference | the bundler fails on a missing file, which no type-checker catches |
| A file that only runs under a platform guard may land any time | a cfg-gated module is dead code, not a broken build — but a linter with warnings-as-errors may disagree, so check the gate, not the intuition |
The gate ladder is stated, not pretended. Not every gate is green from commit #1: a test runner exits non-zero with no test files, a linter flags an unused module, a web build needs an entry point. So each gate has a first commit from which it passes, that number is measured in Phase 5, and a commit is required to pass only the gates that are applicable and available at its point in the ladder. A plan that claims "green from #1" for a gate that cannot be is not bisectable, it is unverified.
Build the plan from the map. Defaults, in order of preference:
Layered (default): manifests and workspace config → build and lint tooling → data model and types → leaf modules by ascending depth → adapters and integrations → UI primitives → screens → wiring and entry points → tests that were not bound to earlier commits → CI → docs → community files.
Vertical (--strategy vertical): one commit per user-visible capability, full stack each. Honest only when the modules genuinely partition that way; a shared core forces a first commit that is a layer anyway.
Granularity, proposed from size and overridable:
| Tracked paths | Coarse | Default | Fine |
|---|---|---|---|
| under 50 | 5-8 | 8-15 | 15-25 |
| 50-150 | 8-12 | 15-30 | 30-60 |
| 150-500 | 12-20 | 25-45 | 45-90 |
| over 500 | 15-25 | 30-60 | directory-level only |
Two shaping rules:
--slice on, a large file may be introduced across several commits (a crate root that grows a module line per commit, a command surface that grows an entry per command). Each slice must still satisfy Phase 3. Record the slice note in the plan file; the executor has to cut it by hand.Coverage proof, before anything else is shown:
tracked paths <T> · assigned <T> · unassigned 0 · assigned twice 0
Unassigned is a stop. Assigned twice is a stop. Neither is a rounding error.
Then present the table and let the user approve, adjust, or re-split at a different granularity or strategy. Never proceed on silence or "looks fine" — the approval names the table.
This is what separates a plan from a guess. Skipped only at --verify off, and then the report says the plan is unverified and drops the word bisectable.
In the scratch clone, on an orphan branch, replay the approved plan and run the gates:
git checkout --orphan plan-verify
git rm -r --cached . -q # index emptied, working tree untouched
# per commit N of the plan
git add -- <paths of commit N>
git diff --cached --name-only # must equal the planned path set exactly
git commit -q -m "#N" # placeholder message; real messages come in Phase 6
<build gate> # e.g. pnpm exec tsc --noEmit
<test gate> # e.g. cargo test
Record per commit: which gates ran, which passed, which were not applicable yet. Then:
--verify build for the whole ladder plus the full suite at the last commit, and state exactly that in the report.Then delete the scratch branch. The verification produced knowledge, not artifacts.
Output of this phase is the gate ladder:
gate first green verified at commits
typecheck #1 1-24 pass
cargo test #4 4-24 pass
lint (warnings as errors) #12 12-24 pass
web build #21 21-24 pass
full test suite #24 24 pass
Draft every subject and body against references/commit-message-rules.md, with the repository's own convention overriding it on conflict. The rules in one line each:
type(scope): imperative lowercase, 70 characters or fewer, no trailing period, scope from the repository's own vocabulary:shortcode:) is the one case where the repository's convention wins (section 4)Then run the section 9 checklist over every drafted message, and validate against the repository's own linter where one exists:
echo "<subject>" | npx --no-install commitlint # or the repo's validator
A message that fails the repository's hook is a defect found now, in a text file, instead of at commit 14 of the execution.
Exact format, the template and a worked example: references/plan-file-format.md — read it before writing the plan file, once the split itself is settled. In short:
#1. No title, no summary, no how-to-execute section, no legend.#1 to #N, plain, no prefix letter.Everything the file does not carry — the map, the coverage proof, the gate ladder, the granularity choice, what could not be verified — goes in the chat report, which is where a reviewer reads it once and a file does not have to carry it forever.
Lead with the verdict, then the evidence:
plan: <N> commits over <T> tracked paths, written to <path>
coverage: <T> assigned, 0 unassigned, 0 duplicated
verification: <full|build|off> — <N>/<N> commits pass every applicable gate
gate ladder: <the table from Phase 5>
messages: <N> validated against <commitlint|the repo's log convention>, <N> carry a body
map: <L> layers, <M> modules, <C> import cycles collapsed into one commit each
not verified: <gates unavailable on this machine, and why>
Then state plainly, without being asked:
Do not offer to execute the plan. Rewriting history is awesome-git-history-rebuild, which has the backup, the permission preflight and the confirmation gates that this skill deliberately does not carry.
| Not this | Use instead |
|---|---|
| Rewrite history, commit, or push | awesome-git-history-rebuild |
| Squash an existing history into one commit | awesome-git-history-reset |
| Fix the author identity on commits | awesome-git-author-rewrite |
| Recover commits from an erased history | awesome-git-history-salvage |
| Judge whether the code is any good | awesome-code-review, awesome-architecture-audit |
| Write the tests the ladder runs | awesome-test-writing |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub khasky/awesome-agent-skills --plugin awesome-agent-skills49 skills in this plugin
/awesome-accessibility-auditRead-only WCAG audit of UI and markup with a concrete fix per finding. Use when asked to check accessibility, a11y, keyboard or screen-reader support, or contrast./awesome-agents-md-generatorMines a codebase's real commands, conventions and boundaries into an agent-agnostic AGENTS.md, nested per package in monorepos, every rule backed by counted evidence. Use when asked to write, generate or refresh AGENTS.md or agent instructions for a repo./awesome-api-designDesigns or reviews an HTTP API's shape before code: resources, versioning, pagination, idempotency, filtering. Use when asked to design an API or an endpoint./awesome-architecture-auditRead-only audit of a whole codebase's design: module boundaries, dependency direction, docs-vs-code drift, extensibility, with a verdict. Use when asked to audit the architecture./awesome-bug-fixFixes a bug through a runnable reproduction and its root cause. Use for errors, crashes, failing tests or builds, flaky behavior, or repeated failed fixes./awesome-claims-auditChecks public claims (site, README, store listing, privacy policy, structured data) against the code and config that decide them, then fixes drift. Use when asked whether the site still matches the product.Other plugins' skills for the same job