smart-commit — скилл для Claude Code: что делает и как установить
Скилл smart-commit гоняет линт, тайпчек и тесты перед коммитом, просматривает стейдж на мусор и собирает сообщение в формате conventional commits.
MIT ★ 2 966 обновлён 2026-09-29
/plugin marketplace add rohitg00/pro-workflow
/plugin install pro-workflow@pro-workflowЧто делает smart-commit
Скилл ведёт коммит по шагам: смотрит git status и git diff --stat, запускает проверки, читает стейдж, пишет сообщение и коммитит только те файлы, которые вы назвали. В конце спрашивает, что из этой правки стоит запомнить.
Перед коммитом он смотрит продакшн-код в стейдже, а не тесты: ищет console.log и debugger, TODO/FIXME/HACK без номера тикета, захардкоженные ключи и остатки тестового кода. Сообщение собирается по шаблону <type>(<scope>): <summary>, тело объясняет причину правки; типы — feat, fix, refactor, test, docs, chore, perf, ci, style. Сводка короче 72 символов, git add -A и git add . запрещены, так что лишний файл в коммит не попадёт.
Проверки — это npm run lint, npm run typecheck и npm test -- --changed --passWithNoTests, поэтому в проекте с другим тулчейном эти строки придётся переписать. Часть изменений скилл намеренно пропускает: правки порогов и фича-флагов, перестановку импортов, чистое форматирование, console.log в тестах.
Какие задачи решает
- прогнать линт, тайпчек и тесты перед коммитом
- вычистить
console.logиdebuggerиз продакшн-кода в стейдже - поймать захардкоженный API-ключ до пуша
- сформулировать сообщение коммита по диффу в conventional-формате
- закоммитить только нужные файлы, не зацепив случайные
Примеры запросов агенту
- Закоммить правки в
src/auth.ts - Сохрани изменения и сделай коммит
- Проверь стейдж перед коммитом и предложи сообщение
Как установить smart-commit
1Через маркетплейс плагинов
/plugin marketplace add rohitg00/pro-workflow/plugin install pro-workflow@pro-workflowКоманда ставит плагин pro-workflow целиком, со всеми его скиллами
2Через Skills CLI (Vercel)
npx skills add rohitg00/pro-workflow --skill smart-commit -a claude-code3Вручную: положить файлы
~/.claude/skills/smart-commit/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/smart-commit/
1Через Skills CLI (Vercel)
npx skills add rohitg00/pro-workflow --skill smart-commit -a codex2Вручную: положить файлы
.agents/skills/smart-commit/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add rohitg00/pro-workflow --skill smart-commit -a cursor2Вручную: положить файлы
.cursor/skills/smart-commit/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install rohitg00/pro-workflow skills/smart-commit2Вручную: положить файлы
.github/skills/smart-commit/SKILL.md1Через Skills CLI (Vercel)
npx skills add rohitg00/pro-workflow --skill smart-commit -a gemini-cli2Командой платформы
gemini skills install https://github.com/rohitg00/pro-workflow --path skills/smart-commitВручную: положить файлы
.devin/skills/smart-commit/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о smart-commit
Как установить smart-commit в Claude Code?
Добавьте маркетплейс командой /plugin marketplace add rohitg00/pro-workflow, потом поставьте плагин: /plugin install pro-workflow@pro-workflow. Скилл приходит вместе с ним.
Что делает smart-commit?
Прогоняет проверки, просматривает стейдж на мусор и собирает сообщение в формате conventional commits, после чего коммитит названные файлы. В конце спрашивает, чему научила эта правка.
Можно ли пропустить проверки качества?
Только если вы прямо об этом попросите: иначе гейты запускаются всегда. Стейджинг по именам файлов остаётся правилом, git add -A скилл не делает.
Исходный текст
SKILL.md · MIT
---
name: smart-commit
description: Run quality gates, review staged changes for issues, and create a well-crafted conventional commit. Use when saying "commit", "git commit", "save my changes", or ready to commit after making changes.
user-invocable: true
---
# Smart Commit
## Trigger
Use when saying "commit", "save changes", or ready to commit after making changes.
## Workflow
1. Check current state and identify what to commit.
2. Run quality gates (lint, typecheck, tests on affected files).
3. Scan staged changes for issues.
4. Draft a conventional commit message from the diff.
5. Stage specific files, create the commit.
6. Prompt for learnings from this change.
## Commands
```bash
git status
git diff --stat
npm run lint 2>&1 | tail -5
npm run typecheck 2>&1 | tail -5
npm test -- --changed --passWithNoTests 2>&1 | tail -10
git add <specific files>
git commit -m "<type>(<scope>): <summary>"
```
## Code Review Scan
Before committing, check staged changes in **production code** (not test files) for:
- `console.log` / `debugger` statements (suppressed in test files — see Review Suppressions)
- TODO/FIXME/HACK comments without ticket references (e.g., `TODO(JIRA-123)` is fine)
- Hardcoded secrets or API keys
- Leftover test-only code
Flag any issues before proceeding.
## Commit Message Format
```
<type>(<scope>): <short summary>
<body - what changed and why>
```
**Types:** feat, fix, refactor, test, docs, chore, perf, ci, style
## Guardrails
- Never skip quality gates unless user explicitly says to.
- Stage specific files by name. Never `git add -A` or `git add .`.
- Summary under 72 characters. Body explains *why*, not *what*.
- No generic messages ("fix bug", "update code").
- Reference issue numbers when applicable.
## Output
- Quality gate results (pass/fail)
- Issues found in staged changes
- Suggested commit message
- Commit hash after committing
- Prompt: any learnings to capture?
## Review Suppressions
Do NOT flag these during the pre-commit scan. They add noise without catching real bugs:
- Threshold, config value, or feature flag changes (limits, timeouts, retry counts)
- Import reordering that does not change runtime behavior
- Whitespace-only or formatting-only changes
- Adding or removing `console.log` in test files
- TODO/FIXME comments (tracked separately in issue trackers)
- Variable or parameter renames that do not change behavior
© Rohit Ghumare · MIT · rohitg00/pro-workflow