commit-push-pr · sneg55 — скилл для Claude Code: что делает и как установить
Автоматизирует Git-рутину: создаёт ветку, делает осмысленный коммит, отправляет изменения на сервер и создаёт пулреквест с тест-планом.
npx skills add sneg55/agent-starter --skill commit-push-pr -a claude-codeЧто делает commit-push-pr
Скилл берёт на себя цепочку команд перед код-ревью. Сначала агент проверяет статус репозитория через git status, изучает диффы git diff main...HEAD и смотрит, нет ли уже открытого пулреквеста с помощью gh pr view. Если вы правили код прямо в main или master, создаётся отдельная ветка вида username/feature-name.
Далее формируется один коммит с фокусом на причине правок, код пушится в удалённый репозиторий, а затем через утилиту gh создаётся или дополняется пулреквест. В тело PR агент помещает резюме из одного-трёх пунктов и чек-лист для проверки. Встроены правила безопасности: скилл игнорирует файлы с секретами вроде .env, отклоняет интерактивные флаги, не перезаписывает конфиг Git и блокирует force push.
Без установленной и авторизованной консольной утилиты gh скилл прервётся на шаге работы с GitHub.
Какие задачи решает
- создать отдельную ветку под задачу без ручных переключений
- закоммитить изменения с пояснением причины правок
- отправить код в удалённый репозиторий
- открыть или обновить пулреквест с готовым чек-листом тестирования
Примеры запросов агенту
- Закоммить изменения и открой пулреквест
- Используй commit-push-pr, чтобы отправить ветку и составить тест-план
- Обнови код в текущей ветке и подтяни описание в открытый PR
Как установить commit-push-pr
1Через Skills CLI (Vercel)
npx skills add sneg55/agent-starter --skill commit-push-pr -a claude-code2Вручную: положить файлы
~/.claude/skills/commit-push-pr/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/commit-push-pr/
1Через Skills CLI (Vercel)
npx skills add sneg55/agent-starter --skill commit-push-pr -a codex2Вручную: положить файлы
.agents/skills/commit-push-pr/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add sneg55/agent-starter --skill commit-push-pr -a cursor2Вручную: положить файлы
.cursor/skills/commit-push-pr/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install sneg55/agent-starter commit-push-pr2Вручную: положить файлы
.github/skills/commit-push-pr/SKILL.md1Через Skills CLI (Vercel)
npx skills add sneg55/agent-starter --skill commit-push-pr -a gemini-cli2Командой платформы
gemini skills install https://github.com/sneg55/agent-starter --path skills/commit-push-prВручную: положить файлы
.devin/skills/commit-push-pr/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add sneg55/agent-starter --skill commit-push-pr -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о commit-push-pr
Как установить commit-push-pr в Claude Code?
Выполните команду npx skills add sneg55/agent-starter --skill commit-push-pr -a claude-code. Файл навыка сохранится в ~/.claude/skills/commit-push-pr/SKILL.md.
Что делает commit-push-pr?
Скилл анализирует изменения в рабочей директории, создаёт ветку, делает коммит, пушит код и через утилиту gh создаёт или обновляет пулреквест.
Что требуется для работы скилла?
В системе должны быть установлены Git и авторизованная консольная утилита GitHub CLI (gh).
Исходный текст
SKILL.md · MIT
--- name: commit-push-pr description: Full git workflow - creates branch, commits, pushes, and creates or updates a PR with summary and test plan. user_invocable: true allowed-tools: - Bash(git checkout --branch:*) - Bash(git checkout -b:*) - Bash(git add:*) - Bash(git status:*) - Bash(git push:*) - Bash(git commit:*) - Bash(gh pr create:*) - Bash(gh pr edit:*) - Bash(gh pr view:*) - Bash(gh pr merge:*) --- # Commit, Push, and Open PR ## Context Gather this context first: - `git status` - `git diff HEAD` - `git branch --show-current` - `git diff main...HEAD` (or default branch) - `gh pr view --json number 2>/dev/null || true` ## Git Safety Protocol - NEVER update the git config - NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them - NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it - NEVER run force push to main/master, warn the user if they request it - Do not commit files that likely contain secrets (.env, credentials.json, etc) - Never use git commands with the -i flag (like git rebase -i or git add -i) since they require interactive input which is not supported ## Task Analyze ALL changes that will be included in the pull request - look at ALL commits from `git diff main...HEAD`, not just the latest commit. Based on the changes: ### 1. Create branch (if on main/master) Use the format `username/feature-name`: ``` git checkout -b username/descriptive-feature-name ``` ### 2. Create a single commit Use heredoc syntax for the message: ``` git commit -m "$(cat <<'EOF' Commit message here. EOF )" ``` - Follow the repo's commit message style (check `git log --oneline -10`) - Focus on "why" not "what" - Keep it concise (1-2 sentences) ### 3. Push the branch ``` git push -u origin HEAD ``` ### 4. Create or update PR Check if a PR already exists (from the `gh pr view` output above). **If PR exists** - update it: ``` gh pr edit --title "Short title" --body "$(cat <<'EOF' ## Summary <1-3 bullet points> ## Test plan - [ ] Test item 1 - [ ] Test item 2 EOF )" ``` **If no PR** - create one: ``` gh pr create --title "Short, descriptive title" --body "$(cat <<'EOF' ## Summary <1-3 bullet points> ## Test plan - [ ] Test item 1 - [ ] Test item 2 EOF )" ``` **Rules:** - Keep PR titles under 70 characters. Use the body for details. - Summary should be 1-3 bullet points covering WHAT changed and WHY - Test plan should be a checklist of verification steps ### 5. Return the PR URL Do all of the above in a single message using multiple tool calls. Return the PR URL when done.
© sneg55 · MIT · sneg55/agent-starter
Похожие скиллы
Все скиллы по теме «Git и GitHub» →Сначала — commit-push-pr от других авторов.