commit · mitsuhiko — скилл для Claude Code: что делает и как установить
Скилл держит агента в рамках Conventional Commits при git commit и ограничивает стейджинг файлами, которые вы назвали.
Apache-2.0 1 установок ★ 3 224 обновлён 2026-09-27
npx skills add mitsuhiko/agent-stuff --skill commit -a claude-codeЧто делает commit
Скилл читается перед коммитом и задаёт жёсткую рамку для сообщения: <type>(<scope>): <summary>. Тип обязателен — feat для новой функциональности, fix для исправлений, плюс docs, refactor, chore, test, perf. Область в скобках необязательна. Тема короткая, в повелительном наклонении, до 72 знаков и без точки в конце.
Внутри обычный markdown-файл с шагами, не скрипт. Сначала агент разбирает аргументы: пути и globs сужают набор файлов, свободный текст влияет на область, тему и тело коммита. Потом смотрит git status и git diff, при желании прогоняет git log -n 50 --pretty=format:%s, чтобы подсмотреть уже принятые в проекте scope. Дальше стейджит нужное и вызывает git commit -m.
Пуш в список задач не входит. Подписи Signed-off-by и футеры с breaking change скилл тоже не пишет, поэтому в репозитории с обязательным DCO их придётся добавлять руками после каждого коммита. Если непонятно, входит ли посторонний файл в коммит, агент спросит.
Какие задачи решает
- собрать сообщение коммита в стиле Conventional Commits без подсказок агенту
- застейджить только файлы из указанного каталога
- посмотреть диф до коммита, а не разбирать его потом
- удержать агента от пуша в удалённый репозиторий
- подсмотреть, какие scope уже используются в проекте
Примеры запросов агенту
- Закоммить изменения в
src/parser.rsс типомfix. - Сделай коммит только по файлам из
docs/, остальное не трогай. - Закоммить всё, что сейчас в рабочем дереве, и добавь тело с пояснением, почему так.
Как установить commit
1Через Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill commit -a claude-code2Вручную: положить файлы
~/.claude/skills/commit/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/commit/
1Через Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill commit -a codex2Вручную: положить файлы
.agents/skills/commit/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill commit -a cursor2Вручную: положить файлы
.cursor/skills/commit/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install mitsuhiko/agent-stuff skills/commit2Вручную: положить файлы
.github/skills/commit/SKILL.md1Через Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill commit -a gemini-cli2Командой платформы
gemini skills install https://github.com/mitsuhiko/agent-stuff --path skills/commitВручную: положить файлы
.devin/skills/commit/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill commit -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о commit
Как установить commit в Claude Code?
Запустите npx skills add mitsuhiko/agent-stuff --skill commit -a claude-code. Файл скилла окажется в ~/.claude/skills/commit/SKILL.md.
Что делает commit?
Задаёт агенту формат сообщения <type>(<scope>): <summary> и порядок действий: разобрать аргументы, посмотреть диф, застейджить нужные файлы, сделать коммит.
Пишет ли скилл Signed-off-by?
Нет. Подписи и маркеры breaking change в сообщение не добавляются, так что при обязательном DCO строку придётся дописать самому.
Исходный текст
SKILL.md · Apache-2.0
--- name: commit description: "Read this skill before making git commits" --- Create a git commit for the current changes using a concise Conventional Commits-style subject. ## Format `<type>(<scope>): <summary>` - `type` REQUIRED. Use `feat` for new features, `fix` for bug fixes. Other common types: `docs`, `refactor`, `chore`, `test`, `perf`. - `scope` OPTIONAL. Short noun in parentheses for the affected area (e.g., `api`, `parser`, `ui`). - `summary` REQUIRED. Short, imperative, <= 72 chars, no trailing period. ## Notes - Body is OPTIONAL. If needed, add a blank line after the subject and write short paragraphs. - Do NOT include breaking-change markers or footers. - Do NOT add sign-offs (no `Signed-off-by`). - Only commit; do NOT push. - If it is unclear whether a file should be included, ask the user which files to commit. - Treat any caller-provided arguments as additional commit guidance. Common patterns: - Freeform instructions should influence scope, summary, and body. - File paths or globs should limit which files to commit. If files are specified, only stage/commit those unless the user explicitly asks otherwise. - If arguments combine files and instructions, honor both. ## Steps 1. Infer from the prompt if the user provided specific file paths/globs and/or additional instructions. 2. Review `git status` and `git diff` to understand the current changes (limit to argument-specified files if provided). 3. (Optional) Run `git log -n 50 --pretty=format:%s` to see commonly used scopes. 4. If there are ambiguous extra files, ask the user for clarification before committing. 5. Stage only the intended files (all changes if no files specified). 6. Run `git commit -m "<subject>"` (and `-m "<body>"` if needed).
© mitsuhiko · Apache-2.0 · mitsuhiko/agent-stuff
Похожие скиллы
Все скиллы по теме «Git и GitHub» →Сначала — commit от других авторов.