Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

re0-git

БесплатноЗапускает вложенные скриптыНе проверен

Rewrite a finished commit's message into a clean, handoff-ready form in your own log style, place a late commit in time order on a linear history, and take a…

LilMGeniusот LilMGenius★ 1 486 звёзд на GitHub

Об этом скилле

Rewrite a finished commit message so the log supports handoff in the author's voice, place a late commit where its time falls, and drop a commit that should not stay.

Goal

Repeated amends and momentum commits leave messages bloated, stale, or padded with trivia, a change committed late lands out of time order, and a commit the human rejected or a bot duplicated stays in the log as noise. 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, and whether a rejected or duplicate commit stays; every other commit's own change and every date already written stay put.

It is user-invoked: run it once you've decided to commit. Giving an agent autonomous access to commit cleanup would bias it toward committing when it shouldn't.

Workflow

  1. Scope the target: usually HEAD, sometimes a short unpushed range, or a late change the human decided to commit.
  2. Read the change (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.
  3. Resolve mixed logs in this order: documented project rules, nearby commits touching the same area, then same-author commits within that convention. Do not average incompatible styles or let one author's habits override the repo. If no convention is documented, report the one the sample shows (subject form, scope, language, body shape) and propose it for the contributor guide as a separate change the human commits.
  4. Rewrite to the commit-economy below: keep durable handoff facts, fold supporting edits into the change they serve, and cut what the diff or tag already proves. Give trivia no bullet of its own. Then set the draft beside the nearest non-target commits of the same type, fix every difference in form, and run the repository's message checker if it has one.
  5. Rebuild with the bundled script, run from this skill's folder (scripts/rebuild.mjs), never with 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. Write each new message to <dir>/<full-sha>.txt, then run node scripts/rebuild.mjs messages --repo <path> --base <commit> --messages <dir> with --base the parent of the oldest target, HEAD~1 for your own tip. Input: the linear range <base>..HEAD of the checked-out branch and the message files. Output: JSON with the old tip (old), the new tip (new), the old-to-new id map (map) and the signing outcome (signing). It rebuilds every commit in the range oldest first with git commit-tree on its own tree, the new message where a file names it and its own message elsewhere, under that commit's own author and committer names, emails and raw dates, adding -S only where the committer is the repository's user.email, and leaves a commit that changed nothing under its old id. It moves no ref. Exit 0 means built, 1 means a git call failed, 2 means a usage error or refused input: a merge in range, a --base that is not an ancestor of HEAD, or a message file naming a commit outside the range. signing reading unavailable means user.signingkey is unset and your commits came out unsigned; stop and fix signing before moving the branch.
  6. Place a late commit by time. Date it at the newest modification time among the files it changes, read before a stash, checkout, or rebase rewrites them; 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 older than every commit it may pass. 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 dated 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, and a diff that does not apply at the new point is exit 1. To take a commit out (one the human rejected, or a duplicate a bot left), run node scripts/rebuild.mjs drop --repo <path> --base <commit> --drop <sha>... 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.
  7. Verify (below), then move the bran
Полный SKILL.md на GitHub

Установить re0-git в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

agents/openai.yamlscripts/rebuild.mjsscripts/rebuild.test.mjs

FAQ

Что делает скилл re0-git?

Rewrite a finished commit's message into a clean, handoff-ready form in your own log style, place a late commit in time order on a linear history, and take a rejected or duplicate commit out of a range, so `git log` alone tells the story. User-invoked: run it once you've decided to commit.

Как установить скилл re0-git?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл re0-git запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить re0-git с