commit-push-pr · dyoshikawa — скилл для Claude Code: установка и PR
Скилл коммитит текущие изменения, отправляет ветку в remote и создаёт или обновляет pull request. Подходит для отправки готовой работы через GitHub.
npx skills add dyoshikawa/rulesync --skill commit-push-pr -a claude-codeЧто делает commit-push-pr
Скилл проверяет текущую ветку, состояние репозитория и изменения. На main и master он сначала создаёт новую ветку через git checkout -b, затем добавляет изменения командой git add ., формирует сообщение коммита и выполняет git commit.
После этого скилл отправляет ветку через git push -u origin <branch-name>. Командой gh pr view --json number,title,body он проверяет существующий pull request: новый создаётся через gh pr create, а заголовок и описание уже открытого PR обновляются через gh api. В описание входят сводка изменений и план тестирования, если он нужен. В конце скилл выводит URL PR и краткий отчёт о действиях.
Какие задачи решает
- создать ветку для текущих изменений
- добавить файлы и сделать осмысленный коммит
- отправить ветку в remote с upstream
- открыть pull request из текущей ветки
- обновить заголовок и описание существующего PR
Примеры запросов агенту
- Закоммить текущие изменения, отправь ветку в remote и создай pull request.
- Проверь текущую ветку, подготовь коммит и открой PR с описанием изменений и планом тестирования.
- Сравни существующий PR с текущими изменениями и обнови его, если заголовок или описание устарели.
Как установить commit-push-pr
1Через Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --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 dyoshikawa/rulesync --skill commit-push-pr -a codex2Вручную: положить файлы
.agents/skills/commit-push-pr/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill commit-push-pr -a cursor2Вручную: положить файлы
.cursor/skills/commit-push-pr/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install dyoshikawa/rulesync commit-push-pr2Вручную: положить файлы
.github/skills/commit-push-pr/SKILL.md1Через Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill commit-push-pr -a gemini-cli2Командой платформы
gemini skills install https://github.com/dyoshikawa/rulesync --path .rulesync/skills/commit-push-prВручную: положить файлы
.devin/skills/commit-push-pr/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill commit-push-pr -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о commit-push-pr
Как установить commit-push-pr в Claude Code?
Выполните npx skills add dyoshikawa/rulesync --skill commit-push-pr -a claude-code. Файл скилла появится по пути ~/.claude/skills/commit-push-pr/SKILL.md.
Что делает commit-push-pr?
Скилл проходит путь от проверки ветки и коммита до отправки изменений и создания или обновления pull request. В конце он показывает URL PR и краткий отчёт.
Что произойдёт, если pull request для ветки уже существует?
Скилл сравнит его заголовок и описание с текущими изменениями. При необходимости он обновит PR через gh api, а если правки не нужны, пропустит этот шаг.
Исходный текст
SKILL.md · MIT
--- name: commit-push-pr description: >- Commit current changes, push to remote, and create or update a pull request. Use when the user wants to commit and create a PR, push changes and open a pull request, or ship their current work as a PR. targets: - "*" --- # Commit, Push, and PR Management ## Step 1: Check Current Branch Run `git branch --show-current` to get the current branch name. If the current branch is `main` or `master`: 1. Generate a descriptive branch name based on the staged/unstaged changes 2. Create and switch to the new branch: `git checkout -b <new-branch-name>` ## Step 2: Stage and Commit Changes 1. Run `git status` to check for changes 2. If there are unstaged changes, stage them: `git add .` 3. Analyze the changes and create a meaningful commit message 4. Commit with: `git commit -m "<commit-message>"` ## Step 3: Push to Remote Push the branch to remote with upstream tracking: ```bash git push -u origin <branch-name> ``` ## Step 4: Handle Pull Request Check if a PR already exists for this branch: ```bash gh pr view --json number,title,body 2>/dev/null ``` ### If PR does NOT exist: Create a new PR: ```bash gh pr create --title "<title>" --body "<description>" ``` The PR description should include: - Summary of changes - Test plan (if applicable) ### If PR already exists: 1. Compare the current PR title and description with the actual changes 2. If updates are needed (e.g., scope of changes has expanded), update the PR using GitHub API: ```bash gh api repos/<owner>/<repo>/pulls/<pr-number> -X PATCH -f title="<new-title>" -f body="<new-description>" ``` Note: Use `gh api` instead of `gh pr edit` to avoid GraphQL deprecation warnings. 3. If no updates are needed, skip this step ## Step 5: Report Result Output the PR URL and a summary of actions taken.
© dyoshikawa · MIT · dyoshikawa/rulesync
Похожие скиллы
Все скиллы по теме «Git и GitHub» →Сначала — commit-push-pr от других авторов.