re0-git — скилл для Claude Code: правка сообщений коммитов
Переписывает сообщение готового коммита в стиле локального журнала Git. Запускайте после коммита, когда git log должен объяснять изменения без просмотра diff.
npx skills add LilMGenius/paperthin --skill re0-git -a claude-codeЧто делает re0-git
re0-git анализирует git show --stat, git diff, правила проекта и соседние сообщения, затем сокращает текст до устойчивых фактов передачи работы. Для HEAD он меняет сообщение через подписанный GPG amend и обновляет обе даты; содержимое дерева при этом остаётся тем же.
Для старого коммита скилл сохраняет даты, пересобирает его и переносит потомков. Историю, уже отправленную или общую с другими, он не переписывает без явного подтверждения. Это повод проверить статус ветки до запуска: изменение старого коммита требует rebase, иначе потомки окажутся отсоединены.
Скилл не создаёт коммиты и не предлагает их делать. После правки он проверяет пустой git diff между старой и новой вершиной, GPG-подпись и читабельность git log.
Какие задачи решает
- сократить раздутый текст готового коммита
- привести сообщение к стилю соседних записей Git
- сохранить только факты, нужные для передачи работы
- переписать сообщение
HEADбез изменения файлов - проверить GPG-подпись и даты после amend
Примеры запросов агенту
- Запусти re0-git для последнего коммита.
- Перепиши сообщение
HEADчерез re0-git, не меняя содержимое. - Приведи сообщения в коротком неотправленном диапазоне к стилю журнала Git. Используй re0-git.
Как установить re0-git
1Через Skills CLI (Vercel)
npx skills add LilMGenius/paperthin --skill re0-git -a claude-code2Вручную: положить файлы
~/.claude/skills/re0-git/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/re0-git/
1Через Skills CLI (Vercel)
npx skills add LilMGenius/paperthin --skill re0-git -a codex2Вручную: положить файлы
.agents/skills/re0-git/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add LilMGenius/paperthin --skill re0-git -a cursor2Вручную: положить файлы
.cursor/skills/re0-git/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install LilMGenius/paperthin re0-git2Вручную: положить файлы
.github/skills/re0-git/SKILL.md1Через Skills CLI (Vercel)
npx skills add LilMGenius/paperthin --skill re0-git -a gemini-cli2Командой платформы
gemini skills install https://github.com/LilMGenius/paperthin --path skills/depth/re0-gitВручную: положить файлы
.devin/skills/re0-git/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add LilMGenius/paperthin --skill re0-git -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о re0-git
Как установить re0-git в Claude Code?
Выполните npx skills add LilMGenius/paperthin --skill re0-git -a claude-code.
Что делает re0-git?
Скилл переписывает сообщение уже существующего коммита так, чтобы журнал Git содержал краткие факты об изменении. Он ориентируется на правила проекта и стиль соседних коммитов.
Меняет ли re0-git файлы в коммите?
Нет. Скилл меняет только сообщение и даты по правилам позиции коммита, а затем проверяет, что git diff между старой и новой вершиной пуст.
Исходный текст
SKILL.md · MIT
--- name: re0-git disable-model-invocation: true description: "Rewrite a finished commit's message into a clean, handoff-ready form in your own log style, so `git log` alone tells the story. User-invoked: run it after a commit." --- Rewrite a finished commit message so the log hands off on its own — in the author's own voice, not an imposed one. ## Goal Repeated amends and momentum commits leave a message bloated, stale, or padded with trivia. `re0-git` rewrites the message into a clean version that lets a fresh session continue from `git log` alone, without reading the diff. It refines what the author already writes. Only the message moves — and timestamps, per the date rule below; the tree never changes. It is **user-invoked** — run it once you've decided to commit. A commit-cleanup tool in the agent's reach would bias it toward committing when it shouldn't. ## Workflow 1. Scope the target — usually `HEAD`, sometimes a short unpushed range. 2. Read the change (`git show --stat`, `git diff`) and any documented commit rules. Then sample nearby non-target messages: start with 10, stop earlier if the convention is obvious, or expand only until the convention is clear. 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. 4. Rewrite the message to the **commit-economy** (below): keep only durable handoff facts, fold supporting edits into the change they serve, and cut anything the diff or tag already proves. Give trivia no bullet of its own. 5. Re-commit signed, dates per the rule below. For the tip (`HEAD`): `git commit --amend -S --date=now` — the `--date=now` is what moves the author date to now; a bare `--amend` resets only the committer date and leaves the author date stale. For an older commit, keeping its dates: rebuild it — `GIT_AUTHOR_DATE`/`GIT_COMMITTER_DATE git commit-tree <tree> -p <parent> -S -m "<new message>"` — then replay every descendant onto the rebuilt commit (a non-tip rewrite is a rebase, not a ref move), or you orphan them. 6. Verify and report. ## Rules - **Never create or suggest a commit** — re0-git only rewrites the message of a commit that already exists. Using it is never a reason to commit. - **Message only** — the tree must stay byte-identical (`git diff <old> <new>` empty); never edit content in a re0-git pass. - **commit-economy** — the commit-message standard this skill enforces: one bullet per real, durable change with supporting edits folded in, nothing the diff or version already proves, no co-author tags, matched to the local log's own shape (sampled above). Where that sampling finds no settled shape, fall back to a subject line, a blank line, then one `-` bullet per change on a single unwrapped line — never prose paragraphs, which explain where a log should list. A step a documented checklist already mandates for any change of this shape (registering a new skill, syncing translated docs after a source edit) is proof the process ran, not a fact about this change — fold it as a trailing clause on the bullet it serves, or drop it if that bullet already implies it; it earns a bullet of its own only when something about *how* it was done is itself non-obvious. The same bar governs the first draft; re0-git only enforces it on a message that already drifted past it. - **Dates by position; always gpg-signed.** The commit you're finalizing — `HEAD` — takes both author and committer date = now, because re-cleaning the latest commit is itself continued work. Every older commit (`HEAD~1` and back) keeps its original author + committer dates; never restamp the past. - **Never rewrite pushed or shared history** without explicit confirmation — it forces a force-push. ## Verification 1. `git diff <old-tip> <new-tip>` is empty — content unchanged. 2. Each rewritten commit is gpg-signed (`%G?` = `G`) with dates as intended. 3. Re-read `git log` alone, diff hidden — if any cut line turns out to be needed to follow the change, restore it.
© LilMGenius · MIT · LilMGenius/paperthin