commit-and-push — скилл для Claude Code: атомные коммиты и push
Скилл commit-and-push для Claude Code, Codex, Cursor и других платформ создаёт автоматические коммиты по стандарту Conventional Commits с помощью git-agent и отправляет их на удалённый репозиторий.
MIT 126 установок ★ 597 обновлён 2026-11-06
npx skills add FradSer/dotclaude --skill commit-and-push -a claude-codeЧто делает commit-and-push
Скилл берёт описание ваших изменений (intent), передаёт его в git-agent, который генерирует структурированное сообщение коммита по стандарту Conventional Commits, и затем пушит ветку в удалённый репозиторий.
Внутри: автоматическое определение активной модели ИИ из переменных окружения, поддержка параметра --co-author для указания соавтора, опция --no-stage если файлы уже в staging area. При ошибке авторизации скилл переходит на режим --free. Если git-agent не установлен, скилл сообщает об ошибке и предлагает установить инструмент или выполнить команды вручную.
Для детерминированного сообщения коммита (например, chore: bump version to 0.11.0) передайте полное сообщение как intent — оно будет использовано дословно.
Какие задачи решает
- создать атомный коммит с автоматическим сообщением по Conventional Commits
- запустить commit и push одной командой с учётом текущей модели ИИ
- добавить соавтора к коммиту через параметр --co-author
- переквалифицировать коммит, когда файлы уже в staging area
Примеры запросов агенту
- Сделай commit и push этих изменений
- Создай атомный коммит с интентом «добавить кэширование API запросов» и push
- Commit with co-author John Doe и отправь в удалённый репозиторий
Как установить commit-and-push
1Через Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill commit-and-push -a claude-code2Вручную: положить файлы
~/.claude/skills/commit-and-push/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/commit-and-push/
1Через Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill commit-and-push -a codex2Вручную: положить файлы
.agents/skills/commit-and-push/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill commit-and-push -a cursor2Вручную: положить файлы
.cursor/skills/commit-and-push/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install FradSer/dotclaude git-agent/skills/commit-and-push2Вручную: положить файлы
.github/skills/commit-and-push/SKILL.md1Через Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill commit-and-push -a gemini-cli2Командой платформы
gemini skills install https://github.com/FradSer/dotclaude --path git-agent/skills/commit-and-pushВручную: положить файлы
.devin/skills/commit-and-push/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill commit-and-push -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о commit-and-push
Как установить commit-and-push в Claude Code?
Выполните команду npx skills add FradSer/dotclaude --skill commit-and-push -a claude-code, затем откройте файл ~/.claude/skills/commit-and-push/SKILL.md.
Что делает commit-and-push?
Скилл создаёт структурированный коммит через git-agent на основе вашего описания (intent), затем пушит ветку в удалённый репозиторий. Сообщение коммита автоматически форматируется по стандарту Conventional Commits.
Что нужно, чтобы скилл работал?
Необходим установленный git-agent версии 0.7.0 или выше. Скилл автоматически определяет модель ИИ из переменных окружения (PI_MODEL и др.). Если git-agent не найден, скилл сообщит об ошибке и предложит установить инструмент вручную.
Исходный текст
SKILL.md · MIT
--- name: commit-and-push description: Creates atomic conventional git commits using git-agent and pushes changes to the remote repository. Use when the user asks to "commit and push", "commit with git-agent", or wants an atomic AI-generated commit followed by a push. user-invocable: true argument-hint: "[intent or --co-author]" allowed-tools: ["Bash(git-agent:*)", "Bash(git:*)"] --- CRITICAL: - Do NOT run `git status`, `git diff`, `git log`, or any other read commands before `git-agent commit`. - Execute `git-agent commit` directly. `git-agent` (v0.7.0+) automatically detects active model attribution from session environment variables (`PI_MODEL`, etc.). ## Execution 1. Derive a concise one-sentence intent from the conversation or `$ARGUMENTS`. 2. Pass `--co-author "<co-author>"` if explicitly specified in `$ARGUMENTS` or user instructions. 3. Run primary commit command: ```bash git-agent commit --intent "<intent>" ``` 4. If specific files are already staged, pass `--no-stage`: ```bash git-agent commit --no-stage --intent "<intent>" ``` 5. On auth error (401), retry with `--free`: ```bash git-agent commit --free --intent "<intent>" ``` 6. **Fallback** (if `git-agent` binary is not found): report the error and ask the user to install git-agent or run git commands manually. 7. Push to remote repository: ```bash git push ``` (If upstream is not set, use `git push -u origin <branch>`). CLI Reference: `../../references/cli.md` Attribution & retry-ladder reference: `../../references/coauthor-attribution.md` (covers `--no-attribution` and the `--free` retry) > **Deterministic messages:** When an exact commit message is required (e.g. version bump `chore: bump version to 0.11.0`), pass the full conventional message as the `--intent` value. The intent is used as the commit subject verbatim.
© FradSer · MIT · FradSer/dotclaude