Rework commits
Portable Agent Skills for test-first development, evidence-based debugging, code review, and reviewable Git history.
npx -y skills add himanshi-28/coding-agent-skills --skill rework-commitsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 23 days oldThe repository was created 23 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Explicit-invocation workflow for safely reorganizing completed branch work into small, dependency-ordered, semantic Git commits, proving the rewritten tree matches the original result, and optionally pushing the polished history. Use only when the user directly invokes the rework-commits skill.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
4.7 KB, 884 tokens by cl100k_base, as published. Nobody here has run it
Rework Commits
Optimize history for human review without changing the final code. Preserve a recovery path before rewriting anything.
Safety Rules
- Never rewrite a default, protected, or shared branch.
- Never use
git reset --hard, plaingit push --force, or automatic stashing. - Never include unrelated user changes, secrets, generated artifacts, or ignored files in a commit.
- Prefer non-interactive Git commands. Set
GIT_EDITOR=trueonly for commands that could otherwise open an editor. - Treat an explicit request to rework commits as authorization to rewrite local feature-branch history after creating the recovery point. Always obtain confirmation immediately before force-pushing previously published history.
Workflow
- Inspect repository state.
- Read applicable repository instructions.
- Identify the current branch, default branch, upstream, merge base, worktree status, in-progress Git operations, and commits unique to the branch.
- Stop on the default branch or during a merge, rebase, cherry-pick, or bisect.
- Require a clean, complete snapshot.
- Inventory staged, unstaged, and untracked files.
- If the worktree is dirty, do not stash or stage everything automatically. Ask the user to finish or scope the changes, or obtain approval for a temporary WIP snapshot containing explicitly listed in-scope files.
- Continue only when the intended final result is represented by a clean
HEAD.
- Establish the recovery point.
- Record the original branch name, commit hash, and tree hash.
- Create a uniquely named local backup branch under
backup/rework-commits-...pointing to the original tip and report its name. - Keep the backup until the rewritten branch is verified and any requested push succeeds.
- Determine the exact rewrite scope.
- Use the user-specified base when provided; otherwise derive the repository's default branch and merge base.
- Inspect the complete base-to-tip diff and every branch commit before planning.
- Exclude pre-existing upstream work and unrelated changes.
- Plan semantic commits before resetting.
- Give each commit one reviewable purpose and explain why it exists.
- Order prerequisites before dependents: schema and configuration, domain or backend behavior, API or integration, UI, then documentation or cleanup when applicable.
- Keep refactors separate from behavior changes unless separation would make either commit invalid.
- Pair tests with the behavior they verify, except for an intentionally protected test-first contract commit.
- Ensure each proposed commit leaves the repository coherent and is small enough to review independently.
- Rebuild the branch.
- Show the proposed commit sequence before rewriting.
- Reset the feature branch to the merge base with a non-destructive mixed reset so the final tree remains in the worktree.
- Stage explicit paths or hunks for one planned commit at a time; never use
git add .as a shortcut. - Inspect the staged diff, confirm it contains exactly one concern, then commit with a descriptive message that explains intent.
- Run focused verification for the commit when feasible before continuing.
- Prove content preservation.
- Confirm the worktree is clean.
- Compare the rewritten
HEADwith the original tip and require an empty diff; compare tree hashes when possible. - Review the new log and base-to-head diff to confirm every original change appears exactly once and no new content was introduced.
- If validation fails, stop and restore or offer recovery from the backup branch rather than improvising.
- Push only when requested.
- For an unpublished branch, push normally and set the upstream.
- If published history was rewritten, explain the impact and obtain confirmation immediately before using
git push --force-with-lease. - Never force-push a shared branch or use plain
--force.
- Finish the handoff.
- Keep the backup branch until push verification succeeds; remove it only with user approval.
- Use the
review-changesskill to run the final review and generate reviewer questions and pull-request context from the polished history.
Output
Report the merge base, recovery branch and original hash, final commit sequence, verification run per commit, proof that the final tree is unchanged, push status, and exact recovery instructions if anything failed.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most pr commit review skills give in 884 tokens
Counted across 888 of the 1,342 authors here whose files we hold, read 2026-08-07
- use conventional commits formatin 127 of 888, across 115 files
- keep subject line under 72 charactersin 62 of 888, across 48 files
- delete branches after mergein 51 of 888, across 38 files
- use imperative mood in subject linein 51 of 888, across 42 files
- use imperative mood in commit messagesin 44 of 888
- verify directory is ignored before creating worktreein 43 of 888, across 12 files
- generate a conventional commit messagein 43 of 888
- add unignored worktree directories to gitignorein 42 of 888, across 10 files
- make atomic commitsin 39 of 888, across 27 files
- run tests before committingin 36 of 888, across 25 files
- verify clean test baselinein 35 of 888, across 9 files
- split unrelated changes into separate commitsin 35 of 888, across 30 files
Said here and by no other author read
- stop if on default branch or during in-progress operations
- require clean HEAD before proceeding
- show proposed sequence before rewriting
- verify commit diff contains one concern
- require empty diff between rewritten and original tree
- run review-changes skill to generate PR context
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.