/paperthin:re0-gitfrom paperthin
Rewrites commit messages, reorders commits, drops unwanted commits, folds fixups, and splits commits by paths, then moves all refs to the rewritten history. User-invoked only.
Ships in paperthin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Rewrite a finished commit message so the log supports handoff in the author's voice, place a late commit where its time falls, drop a commit that should not stay, fold a fixup into the commit it fixes, split a commit that holds two changes, and bring every ref onto the rewritten line.
Repeated amends and momentum commits leave messages bloated, stale, or padded with trivia, a change committed late lands out of time order, a commit the human rejected or a bot duplicated stays in the log as noise, a fixup splits one change across two commits, one commit holds two changes, and a ref the rewrite did not follow keeps the old line alive. re0-git refines the author's message so a fresh session can continue from git log alone, without the diff. It changes only messages, where a late commit sits, whether a rejected or duplicate commit stays, which commit a fixup's diff belongs to, where one commit's diff divides, and where refs point; every other commit's own change and every date already written stay put.
It is user-invoked: run it on commits the human has decided on. Giving an agent autonomous access to commit cleanup would bias it toward committing when it shouldn't.
HEAD, sometimes a short unpushed range, or a late change the human decided to commit.git show --stat, git diff), then the commit convention the repository documents (AGENTS.md, CONTRIBUTING.md, or its equivalent) and the log it describes: git log -20 and git log -5 -- <changed-paths>, bodies as well as subjects. Read them on every run, before drafting; a convention remembered from another repository or an earlier session is not a reading.git rebase. Rebase makes you the committer of every commit and restamps each committer date to now, and --committer-date-is-author-date erases the gap between the two dates instead. The script (scripts/rebuild.mjs, run from this skill's folder) rebuilds every commit in the range oldest first with git commit-tree on its own tree, under that commit's own author and committer names, emails and raw dates, adding -S to each commit Rules has you sign, and moves no ref.
<dir>/<full-sha>.txt, <dir> a temporary directory outside the work tree so the run leaves nothing in the repository, each file holding the message exactly as it should read and ending in one newline, since the script takes its bytes as they are. Then run node scripts/rebuild.mjs messages --repo <path> --base <commit> --messages <dir> with --base the parent of the oldest target, HEAD~1 when the only target is HEAD.<base>..HEAD of the checked-out branch and the message files. A commit with a file takes the new message, every other keeps its own, and one that changed nothing keeps its old id unless you committed it unsigned and can sign it now.--tip <new>, the new the first run printed, which each rebuild mode of steps 5 to 9 takes in place of HEAD; the second run keeps the same --base or an older one, rebuilds <base>..<new>, names commits by the first run's new ids, and no ref moves between the runs. Steps 10 and 11 run once, over every run's output.ambiguous. Where it does cite that commit, write that message's file citing the commit by its id in the range the run reads (in a chained run, the id the earlier run gave it), lengthened until it holds a letter from a to f, and redo the run from the same --base, and the same --tip if it had one; the run then rewrites that id to the new one. place takes no message files, so after place make this fix in a messages run chained by --tip.old), the new tip (new), the old-to-new id map (map), the citations it rewrote (cited), the digit-only ones it left (ambiguous), the messages that still name a commit that left (mentions, step 7) and the signing outcome (signing), which reads unavailable when user.signingkey is unset and your commits came out unsigned.HEAD without --tip, an empty range, a merge in range, a --base that is not an ancestor of the tip, a commit whose message encoding is not UTF-8, or a message file naming a commit outside the range.git status lists before it is committed), read before a stash, checkout, or rebase rewrites them, as Unix seconds with the machine's local zone; if those times were already reset, ask the human for the time. Once the late change is committed on the branch, run node scripts/rebuild.mjs place --repo <path> --base <commit> --late <commit> --date "<unix-seconds> <+zone>" with --base the parent of the oldest commit on the branch, the late one included, whose committer date falls after --date, or any older commit. Input: the range, the late commit and its time. Output: the same JSON plus the new id of the placed commit (placed). It builds the late commit on the last commit whose committer date is at or before --date, its own diff replayed there with git merge-tree --write-tree --merge-base=<old-parent> <new-parent> <commit>, sets both its dates to --date, and rebuilds every later commit as in step 5 on the tree its own diff makes over its new parent. It moves no ref. Exit codes are as in step 5, a --base whose committer date falls after --date is exit 2, and a diff that does not apply at the new point is exit 1.node scripts/rebuild.mjs drop --repo <path> --base <commit> --drop <sha>... [--messages <dir>] with --base older than every dropped commit. It rebuilds every later commit on the tree its own diff makes without the dropped ones, prints the same JSON plus dropped, and moves no ref; a --drop outside the range is exit 2. The dropped change leaves no trace: each kept message that still names a dropped commit, by its id or by a subject of more than one word that no kept commit shares, quoted or on a line of its own, is listed under mentions, so reword each one that does refer to the dropped change and run drop again from the same --base, and the same --tip if it had one, with --messages <dir> (files as in step 5; one naming a dropped commit is exit 2). A ref on a dropped commit has no new id to follow and map holds no entry for that commit: step 10 lists it under left, and it moves or goes only on the human's word.node scripts/rebuild.mjs fold --repo <path> --base <commit> --into <sha> --fold <sha>... [--messages <dir>] with --base older than every named commit. The --into commit keeps its place, its author, its committer and both dates, and takes each folded commit's diff after its own; the folded commits leave history, and every later commit is rebuilt on the tree its own diff makes there. A message file in <dir> sets a kept commit's message as in step 5; one naming a folded commit is exit 2, since that commit leaves. The run prints the same JSON plus into (the kept commit's new id), folded, and authors, each folded author other than the kept commit's: the kept commit names only its own, so credit each human there with a closing Co-authored-by trailer by commit-economy. It moves no ref. An --into someone else committed takes only diffs that same committer made, since that committer would be recorded for diffs they did not commit: anything else is exit 2. A diff that no longer applies where the fold puts it is exit 1 and names that commit: a fixup moved back past the commit that added its file, or a commit that needed an earlier diff now moved forward past it; choose an --into on the other side of the named commit. A ref on a folded commit is handled as in step 7.node scripts/rebuild.mjs split --repo <path> --base <commit> --at <sha> --path <path>... --message <file> [--messages <dir>] with --base older than --at and each --path a git pathspec relative to --repo (a file or a directory). A new commit just before --at takes its diff at the named paths under the message in <file>, written as in step 5; --at keeps the rest under its own message or a message file's; both carry the split commit's author, committer and both dates, and every later commit is rebuilt on the tree its own diff makes. It prints the same JSON plus first (the new commit's id), and moves no ref. A path the commit does not change, or paths that take every change it makes, is exit 2.refs finds every ref, note and record citation on an old id and plans its move; it moves no ref.
map from old to new ids, a null new id or a dropped or folded list naming a commit that left), and run node scripts/rebuild.mjs refs --repo <path> --map <file>... [--remote <name>] [--keep <ref>...] [--cites <file>...], one --map per run in the order the runs were made; a run redone from the same --base and --tip (steps 5 and 7) replaces the run it redoes.refs/heads/<name>), and each record file (a ledger, a handoff note) that may cite an old id.git arguments, git itself left out): checkout is {ref, old, new} for the checked-out branch, or null when it is kept, left or untouched. stdin holds the update-ref lines for every other ref, another tagger's annotated tag remade on its new id included. sign holds your own annotated tags with the git tag -s arguments and tagger environment that remake each. notes holds the commands that copy each note to the new id and then remove it from the old. cleanup names the folder the sign messages were written to.carried holds the commits a ref, or the remote, has on top of a rewritten commit, rebuilt onto its new id by step 5's rules, each entry with its own cited, ambiguous and mentions for the report. push holds one leased push per remote ref, and is empty without --remote. left names each ref it could not move with the reason, a detached HEAD on the old line included, and each notes ref holding a note on a commit that left, a note that stays until the human has it removed (git notes --ref <ref> remove <old-id>) or kept; kept names each --keep ref, a notes ref included, that holds the old line. cites holds each record line citing an old id with the new id to write, or null for a commit that left. ambiguous holds each such citation of digits alone, which step 11 rewrites only where it does cite that commit.carried someone else pushed, which the moves make part of your rewrite. The files move first and every ref after them in one transaction, so a refusal at either point leaves no ref moved.
git status --porcelain lists, the local edits Verification 6 compares against.checkout is set: run git update-index -q --refresh so a file whose timestamp alone changed reads as unchanged, then git read-tree -m -u <old> <new> with checkout's old and new. update-ref alone moves the branch but not its index or files, so a change the rebuild took out would stay staged for the next commit to bring back; read-tree brings both to the new tip, keeps any local edit, and refuses with nothing moved when a local edit touches a file the rebuild changes, which the human settles before this step runs again.checkout's line when it is set, update <ref> <new> <old>, to stdin and pipe the whole to git update-ref --stdin, which moves every ref or none. When it refuses because a ref moved since the plan, git names that ref and every ref still stands where it stood: when checkout is set, run git read-tree -m -u <new> HEAD to bring the files back to the commit the branch holds; delete each cleanup folder, report the ref that moved, and plan again only on the human's word.git with each sign entry's arguments under its environment, then with each notes entry in order, skipping the remove after a copy that failed so the note is not lost. Rewrite each cites line in its record, rewording a null one so it no longer names the commit, and treat each ambiguous line that does cite its commit the same way, and name every left and kept ref in the report.remove after its copy; until then Verification 7 fails on the tag or note it left on an old id.sign entry has passed, since each reads its message from a cleanup folder: delete the message folder of steps 5 to 9, the --message file of step 9 and each cleanup folder.git with each push entry whose ref the human confirmed under Rules; its lease is what the remote held when refs read it. Never bare --force or --mirror, and never git rebase (step 5). A failed lease means someone pushed that ref after the plan: stop and report the ref, the id you leased on and the id the remote holds now, and plan again only on the human's word.re0-git works only on commits the human already decided: rewriting a message, placing a late commit, dropping one the human rejected, folding a fixup or splitting one. Using it is never a reason to commit.git diff <old> <new> empty); a placed late commit carries exactly its own diff, a drop removes exactly the dropped commits' diffs, a fold moves its diff into the commit it folds into and a split divides one commit's diff between two, each leaving the tip's tree byte-identical, and every later commit keeps its own. Never edit content in a re0-git pass.Co-authored-by trailer that credits a human contributor on a squashed or carried contribution. A subject that ends with (#n) keeps it, since that number ties a landed commit to the pull request it came through. Match the local log's sampled shape. If none is settled, use a subject line, a blank line, then one - bullet per change on a single unwrapped line, never prose paragraphs. A required checklist step, such as registering a new skill or syncing translations after a source edit, proves the process ran. Fold it into the bullet it serves as a trailing clause, or omit it if that bullet already implies it. Give it a separate bullet only when how it was done is itself non-obvious.HEAD included: a message edit changes neither when the work was done nor when it landed, so never restamp the past. A gap between the two dates records a rebase, a cherry-pick or a later push and is not a defect; no check reads it, and no commit is rewritten or moved to close one. A late commit takes the time its work was done as both dates. Sign every commit you are the committer of and every tag you are the tagger of, as the repository's user.email; one someone else made stays theirs and unsigned, since your signature would claim it. Signing that cannot run (user.signingkey unset) is a failure to fix before any ref moves, never a pass.git ls-remote <remote>: a branch or tag listed there is pushed, and each pushed ref needs its own confirmation, so a pushed tag on a never-pushed range still asks for one. Placing a late commit behind a pushed commit is such a rewrite.node scripts/rebuild.mjs verify --repo <path> --old <old-tip> --new <new-tip> [--placed <new-sha>...] [--dropped <old-sha>...] [--folded <old-sha>...] [--split <new-sha>...], passing each id place printed under placed, each id drop printed under dropped, each id fold printed under folded and each id split printed under first. Input: the two tips and the placed, dropped, folded or split commits. Output: JSON with ok, a checks entry per check below and each named failure under failures. Exit 0 means every check passed, 1 means a named failure, 2 a usage error or an id outside the range it names (the new one for --placed and --split, the old one for --dropped and --folded). Its first check: the two tips' trees are equal, or differ by exactly the dropped commits' diffs. After two runs chained by --tip, one verify spans both: --old is the first run's old and --new the last run's new; a --placed or --split id is the one its run printed, followed through each later run's map, and a --dropped or --folded id is the original commit, the first run's map key that led to it.%an %ae %ad %cn %ce %cd line of every commit in the old range appears unchanged and in order over the new range, the placed, dropped and folded commits aside; each placed commit carries one time as both dates; each split's first commit carries the line of the commit after it; and each commit the repository user committed shows %G? = G. With user.signingkey unset this check reads unavailable, lists those commits under unsigned, and fails.git log <new-tip> with the diff hidden. Restore any cut line needed to follow the change.git status --porcelain lists only the local edits step 11 recorded before it moved anything and the record files it rewrote for cites, nothing the rebuild added or removed.verify again with the same arguments plus --refs, one --keep <ref> per kept or left ref the human leaves where it is, and one --tag <name>:<old-id> per moved tag, <old-id> the old id its stdin line or sign entry holds; when refs carried the remote's commits, --old is the id the remote held and --new the checked-out branch's new tip. It fails while any tag still points at an old id that has a new one, any other ref outside refs/remotes still holds the old line, or a notes ref not kept still holds a note on an old id that has a new one, and unless each named tag keeps its kind, resolves to its commit's new id and, when annotated, keeps every header line but object and its message byte for byte, signed or unsigned as Rules has it. Under left it lists the tags on dropped or folded commits, which stay for the human; name them in the report.git ls-remote <remote> lists each push ref at the id git rev-parse <ref> gives here, since verify --refs reads no ref under refs/remotes; a ref the remote holds at any other id is a failed push to report. Once item 7 passes and any push is confirmed here, delete the map files step 10 read, which held the old ids until now.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub lilmgenius/paperthin --plugin paperthin45 skills in this plugin
/aimWhen data lands with a thin ask (files, a repo, a paste, a chat scrollback), read it and propose what the user is trying to do with it for them to confirm. Use the moment material arrives without a fully-formed ask, or when the ask reads thinner than the data suggests./autobahnCarve guardrail-adjacent items out of scope with safe alternatives before risk-adjacent work starts, then run the safe remainder at full strength in a fresh subagent that only ever sees the carved prompt, never the risky input. Use when a task includes stealth, scraping, privacy, IP, policy, licensing, security, or other safety-adjacent material that could be silently dropped, over-elaborated, or needlessly diluted. Fires on the impulse, not only the topic: the moment you notice yourself about to hedge, soften, silently skip, or brace for a refusal, carve before you execute./Other plugins' skills for the same job