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★ 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
- Scope the target: usually
HEAD, sometimes a short unpushed range, or a late change the human decided to commit. - 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 -20andgit 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. - 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.
- 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.
- Rebuild with the bundled script, run from this skill's folder (
scripts/rebuild.mjs), never withgit rebase: rebase makes you the committer of every commit and restamps each committer date to now, and--committer-date-is-author-dateerases the gap between the two dates instead. Write each new message to<dir>/<full-sha>.txt, then runnode scripts/rebuild.mjs messages --repo <path> --base <commit> --messages <dir>with--basethe parent of the oldest target,HEAD~1for your own tip. Input: the linear range<base>..HEADof 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 withgit commit-treeon 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-Sonly where the committer is the repository'suser.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--basethat is not an ancestor ofHEAD, or a message file naming a commit outside the range.signingreadingunavailablemeansuser.signingkeyis unset and your commits came out unsigned; stop and fix signing before moving the branch. - 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--baseolder 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 withgit 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), runnode scripts/rebuild.mjs drop --repo <path> --base <commit> --drop <sha>...with--baseolder than every dropped commit: it rebuilds every later commit on the tree its own diff makes without the dropped ones, prints the same JSON plusdropped, and moves no ref; a--dropoutside the range is exit 2. - Verify (below), then move the bran
Установить re0-git в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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 запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic