create-pr · tartinerlabs — скилл для Claude Code: что делает и как установить
Скилл проверяет миграции, пушит ветку и создаёт PR в GitHub через gh или MR в GitLab через glab с автоназначением на автора.
npx skills add tartinerlabs/skills --skill create-pr -a claude-codeЧто делает create-pr
Скилл координирует оформление пуллреквестов и мердж-реквестов. Сначала он проверяет статус репозитория: если текущая ветка совпадает с базовой, создаёт новую через скилл create-branch, а незакоммиченные файлы сохраняет через commit. Перед отправкой кода запускается проверка расхождения схемы базы данных: если схема изменилась без файла миграции, процесс останавливается для подтверждения.
После пуша ветки скрипт определяет хостинг через git remote get-url origin. Для GitHub вызывается CLI gh, а для GitLab — glab. На GitHub скилл умеет связывать зависимые ветки в стеки с помощью флага --base <parent-branch> и обновлять заголовки после gh stack submit. Описание запроса формируется кратким списком тезисов, исключая служебные секции вроде ## Summary или чек-листов.
Без авторизованных утилит gh или glab скилл не сможет сформировать запрос. Если у вашей учётной записи нет прав коллаборатора в репозитории, запрос создастся, но без назначения исполнителя.
Какие задачи решает
- оформить пуллреквест в GitHub через CLI
gh - создать мердж-реквест в GitLab через утилиту
glab - проверить схему базы данных на отсутствие миграции перед пушем
- связать зависимые ветки в стек пуллреквестов на GitHub
Примеры запросов агенту
- Сделай пуллреквест с текущими изменениями
- Опубликуй ветку и создай PR в main с назначением на меня
- Создай мердж-реквест в GitLab для этой ветки
Как установить create-pr
1Через Skills CLI (Vercel)
npx skills add tartinerlabs/skills --skill create-pr -a claude-code2Вручную: положить файлы
~/.claude/skills/create-pr/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/create-pr/
1Через Skills CLI (Vercel)
npx skills add tartinerlabs/skills --skill create-pr -a codex2Вручную: положить файлы
.agents/skills/create-pr/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add tartinerlabs/skills --skill create-pr -a cursor2Вручную: положить файлы
.cursor/skills/create-pr/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install tartinerlabs/skills create-pr2Вручную: положить файлы
.github/skills/create-pr/SKILL.md1Через Skills CLI (Vercel)
npx skills add tartinerlabs/skills --skill create-pr -a gemini-cli2Командой платформы
gemini skills install https://github.com/tartinerlabs/skills --path plugins/workflow/skills/create-prВручную: положить файлы
.devin/skills/create-pr/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add tartinerlabs/skills --skill create-pr -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о create-pr
Как установить create-pr в Claude Code?
Выполните команду npx skills add tartinerlabs/skills --skill create-pr -a claude-code. Также файл скилла можно сохранить вручную по пути ~/.claude/skills/create-pr/SKILL.md.
Что делает create-pr?
Скилл пушит ветку и открывает pull request в GitHub или merge request в GitLab. Он сверяет миграции базы данных, генерирует описание из коммитов и назначает автора исполнителем.
Что нужно подготовить перед запуском create-pr?
В системе должны быть установлены git и консольный клиент gh для GitHub либо glab для GitLab с настроенной авторизацией. Для навигации по цепочкам веток поддерживается расширение gh stack.
Исходный текст
SKILL.md · MIT
---
name: create-pr
description: Use when opening a PR, submitting for review, pushing a branch, or creating a pull request. Pushes and creates GitHub PRs with auto-assignment and description.
license: MIT
allowed-tools: Read Skill Bash(git:*) Bash(gh:*) Bash(glab:*)
model: haiku
effort: medium
compatibility: Requires git and a GitHub (gh) or GitLab (glab) remote
metadata:
short-description: Push a branch and open a pull request.
---
You push branches and create pull/merge requests.
## Rules Overview
| Rule | Impact | File |
|------|--------|------|
| PR title | HIGH | `rules/pr-title.md` |
| Migration drift | HIGH | `rules/migration-drift.md` |
| PR description | MEDIUM | `rules/pr-description.md` |
## Workflow
1. Check current git status and branch, and determine the base: the one the user names (e.g. a release branch for a hotfix), otherwise the default branch
- If on the base branch, create a branch first via the `create-branch` skill
- If there are uncommitted changes, commit them via the `commit` skill — never with a raw `git commit` here. Ask first only if some changes look unrelated to the rest
2. Run the migration drift pre-flight per `rules/migration-drift.md`. If a schema changed without a migration, stop and ask before pushing
3. Push current branch to remote (with `-u` flag if needed)
4. Analyse recent commits to generate PR title and description
5. Detect the remote host from `git remote get-url origin` (github.com → gh, gitlab.com → glab; default GitHub) and create the PR/MR with the matching CLI. The body is concise bullet points only (no `## Summary`, `## Test Plan`, checklists, or other heading sections):
- **GitHub**: `gh pr create --assignee @me` (`@me` resolves to the authenticated user).
- **Base selection**: use the base from step 1. If the branch was cut from a non-default branch that itself has an open PR (check the merge base, then `gh pr list --head <parent>`), create with `--base <parent-branch>` — the diff stays scoped to this layer, and GitHub links the PRs into a stack (public preview) automatically. Stacks are same-repository only; on repos where the preview has not rolled out this degrades to a plain dependent PR, which is the correct base regardless.
- If the `gh stack` extension is installed (`gh extension list`), it may be used for stack navigation and local cascading rebases. Do not install it, and defer stack management (rebase order, merging layers) to it rather than retargeting branches manually — GitHub rebases and retargets upper layers itself when a lower one merges.
- PRs opened by `gh stack submit` carry auto-generated titles and bodies that will not match the rules. After submitting, rewrite only the PRs that submit just created with `gh pr edit <number> --title "..." --body "..."` following `rules/pr-title.md` and `rules/pr-description.md`, scoping each title and description to that layer's diff (its commits against its base), not the whole stack. Leave pre-existing layers untouched — submit does not regenerate their copy, and it may have been edited in review.
- **GitLab**: `@me` is a list filter, not valid for MR creation — resolve the username first with `glab api user --jq .username`, then `glab mr create --assignee <username> --target-branch <base>` with the base from step 1.
Auto-assign to the current user. If assignment fails (user not a collaborator/member), the PR/MR is still created without assignment.
© tartinerlabs · MIT · tartinerlabs/skills
Похожие скиллы
Все скиллы по теме «Git и GitHub» →Сначала — create-pr от других авторов.