git-commit · ilteoood — скилл для Claude Code: коммиты по Conventional Commits
Скилл анализирует diff и собирает сообщение коммита по Conventional Commits: тип, scope, описание. Полезен, когда надоело писать однотипные fix и update.
npx skills add ilteoood/harness --skill git-commit -a claude-codeЧто делает git-commit
Скилл читает изменения в репозитории и сам определяет тип коммита: feat, fix, docs, refactor, perf, test, build, ci, chore, revert. Дальше он предлагает scope и однострочное описание в повелительном наклонении, короче 72 знаков. Ломающие изменения помечает восклицательным знаком после типа или scope либо футером BREAKING CHANGE.
Порядок работы такой. Сначала скилл смотрит git diff --staged, а если в индексе пусто — git diff по рабочему дереву, и заодно git status --porcelain. Если ничего не проиндексировано или изменения стоит разбить на группы, он делает git add по файлам, по маске вроде *.test.* или через git add -p. Потом собирает сообщение и вызывает git commit -m. Тип, scope и описание можно переопределить вручную.
Из инструментов скиллу разрешён только Bash. Внутри прописан протокол безопасности: не трогать конфиг git, не запускать --force и жёсткий reset без прямой просьбы, не пропускать хуки через --no-verify, не пушить силой в main и master. Секреты вроде .env, credentials.json и приватных ключей он коммитить не должен. Если коммит упал из-за хука, скилл чинит проблему и делает новый коммит, а не --amend.
Какие задачи решает
- написать сообщение коммита по Conventional Commits без ручного разбора diff
- разложить правки по нескольким логическим коммитам вместо одной кучи
- пометить ломающее изменение так, чтобы его подхватили инструменты релиза
- не закоммитить случайно
.envили приватный ключ - привести историю репозитория к одному стилю сообщений
Примеры запросов агенту
- закоммить изменения в src/components
- сделай коммит с типом feat и scope api
- закоммить только файлы тестов, остальное не трогай
Как установить git-commit
1Через Skills CLI (Vercel)
npx skills add ilteoood/harness --skill git-commit -a claude-code2Вручную: положить файлы
~/.claude/skills/git-commit/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/git-commit/
1Через Skills CLI (Vercel)
npx skills add ilteoood/harness --skill git-commit -a codex2Вручную: положить файлы
.agents/skills/git-commit/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add ilteoood/harness --skill git-commit -a cursor2Вручную: положить файлы
.cursor/skills/git-commit/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install ilteoood/harness git-commit2Вручную: положить файлы
.github/skills/git-commit/SKILL.md1Через Skills CLI (Vercel)
npx skills add ilteoood/harness --skill git-commit -a gemini-cli2Командой платформы
gemini skills install https://github.com/ilteoood/harness --path skills/core/git-commitВручную: положить файлы
.devin/skills/git-commit/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add ilteoood/harness --skill git-commit -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Другие версии git-commit
Похожие
Рядом в теме «Git и GitHub»
Всё по теме «Git и GitHub» →Вопросы о git-commit
Как установить git-commit в Claude?
Выполните npx skills add ilteoood/harness --skill git-commit -a claude-code. Скилл встанет по пути ~/.claude/skills/git-commit/SKILL.md.
Что делает git-commit?
Разбирает diff, определяет тип и scope изменения и генерирует сообщение по Conventional Commits. При необходимости сам индексирует файлы и выполняет git commit.
Какие типы коммитов он поддерживает?
feat, fix, docs, style, refactor, perf, test, build, ci, chore и revert. Ломающие изменения помечаются ! после типа или scope либо футером BREAKING CHANGE.
Исходный текст
SKILL.md · MIT
--- name: git-commit description: 'Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping' license: MIT allowed-tools: Bash --- # Git Commit with Conventional Commits ## Overview Create standardized, semantic git commits using the Conventional Commits specification. Analyze the actual diff to determine appropriate type, scope, and message. ## Conventional Commit Format ``` <type>[optional scope]: <description> [optional body] [optional footer(s)] ``` ## Commit Types | Type | Purpose | | ---------- | ------------------------------ | | `feat` | New feature | | `fix` | Bug fix | | `docs` | Documentation only | | `style` | Formatting/style (no logic) | | `refactor` | Code refactor (no feature/fix) | | `perf` | Performance improvement | | `test` | Add/update tests | | `build` | Build system/dependencies | | `ci` | CI/config changes | | `chore` | Maintenance/misc | | `revert` | Revert commit | ## Breaking Changes ``` # Exclamation mark after type/scope feat!: remove deprecated endpoint # BREAKING CHANGE footer feat: allow config to extend other configs BREAKING CHANGE: `extends` key behavior changed ``` ## Workflow ### 1. Analyze Diff ```bash # If files are staged, use staged diff git diff --staged # If nothing staged, use working tree diff git diff # Also check status git status --porcelain ``` ### 2. Stage Files (if needed) If nothing is staged or you want to group changes differently: ```bash # Stage specific files git add path/to/file1 path/to/file2 # Stage by pattern git add *.test.* git add src/components/* # Interactive staging git add -p ``` **Never commit secrets** (.env, credentials.json, private keys). ### 3. Generate Commit Message Analyze the diff to determine: - **Type**: What kind of change is this? - **Scope**: What area/module is affected? - **Description**: One-line summary of what changed (present tense, imperative mood, <72 chars) ### 4. Execute Commit ```bash # Single line git commit -m "<type>[scope]: <description>" # Multi-line with body/footer git commit -m "$(cat <<'EOF' <type>[scope]: <description> <optional body> <optional footer> EOF )" ``` ## Best Practices - One logical change per commit - Present tense: "add" not "added" - Imperative mood: "fix bug" not "fixes bug" - Reference issues: `Closes #123`, `Refs #456` - Keep description under 72 characters ## Git Safety Protocol - NEVER update git config - NEVER run destructive commands (--force, hard reset) without explicit request - NEVER skip hooks (--no-verify) unless user asks - NEVER force push to main/master - If commit fails due to hooks, fix and create NEW commit (don't amend)
© ilteoood · MIT · ilteoood/harness