create-pr
БесплатноЗапускает вложенные скриптыНе проверенOpens a PR after pre-flight checks (tests, lint, types, security) with a conventional title and body. Use only when asked for this skill; an everyday gh pr…
от yonatangross★ 312 звёзд на GitHubОб этом скилле
Create Pull Request
Comprehensive PR creation with validation. All output goes directly to GitHub PR.
Quick Start
create-pr
create-pr "Add user authentication"
CC ≥ 2.1.119 multi-host note (M122): PR creation works against GitHub, GitLab, Bitbucket, and GitHub Enterprise. Detect the target host from the configured remote (
git remote -v) and branch on the host family for the right CLI:
Host family CLI github / github-enterprise gh pr create(withGH_HOST=<host>for GHE)gitlab / gitlab-self glab mr createbitbucket bb pr createCustom enterprise URLs:
prUrlTemplatesetting (seesrc/skills/configure/andsrc/skills/chain-patterns/references/pr-from-platform.md).
Argument Resolution
TITLE = "$ARGUMENTS" # Optional PR title, e.g., "Add user authentication"
# If provided, use as PR title. If empty, generate from branch/commits.
# $ARGUMENTS[0] is the first token (CC 2.1.59 indexed access)
Base Branch Resolution
Derive the base branch from the remote. Never hardcode dev or main; repos differ.
BASE=$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')
BASE=${BASE:-main} # ref missing (fresh/shallow clone)? run: git remote set-head origin -a
Every $BASE below refers to this value.
Stacked on another open PR
When the work depends on an open PR ("a PR that depends on PR #50"), that PR's head branch is
the base, not $BASE:
PARENT=50
PARENT_BRANCH=$(gh pr view "$PARENT" --json headRefName -q .headRefName)
git fetch origin && git rebase "origin/$PARENT_BRANCH" # pre-flight: sync with the parent
gh pr create --base "$PARENT_BRANCH" --title "$TYPE(#$ISSUE): ... [2/3]" \
--body "Stacked on #$PARENT. Do not merge into the parent branch."
Phase 1's guard still applies: never open from main or dev, never with a dirty tree. Record
git rev-parse "origin/$PARENT_BRANCH" in the body; after the parent is squash-merged that sha
is the upstream argument that git rebase --onto "origin/$BASE" <that-sha> <branch> needs, and
the branch itself is gone. Squash recovery, depth cap, draft trap: Read("references/stacked-pr.md").
STEP 0: Verify User Intent
BEFORE creating tasks, clarify PR type:
AskUserQuestion(
questions=[{
"question": "What type of PR is this?",
"header": "PR Type",
"options": [
{"label": "Feature (Recommended)", "description": "Full validation: security + quality + tests"},
{"label": "Bug fix", "description": "Focus on test verification"},
{"label": "Refactor", "description": "Code quality review, skip security"},
{"label": "Quick", "description": "Skip validation, just create PR"}
],
"multiSelect": false
}]
)
Based on answer, adjust workflow:
- Feature: Full Phase 2 with 3 parallel agents + local tests
- Bug fix: Phase 2 with test-generator only + local tests
- Refactor: Phase 2 with code-quality-reviewer only + local tests
- Quick: Skip Phase 2, jump to Phase 3
Optional pre-flight: claude ultrareview (CC 2.1.120+, #1542)
If claude ultrareview --help succeeds, optionally run it before opening the PR and surface findings in the PR body's ## Pre-flight section. The CLI subcommand returns structured --json output that can be filtered to high/medium severity for the body and full results posted as a follow-up comment.
if claude ultrareview --help >/dev/null 2>&1; then
claude ultrareview "origin/$BASE..HEAD" --json > /tmp/ultra.json
# Bucket by severity, put HIGH in PR body, MEDIUM/LOW as comment
fi
Skip on CC < 2.1.120 (the subcommand doesn't exist there). The .github/workflows/ultrareview.yml workflow runs the same command on PR open as a backstop, so this pre-flight is purely a feedback-loop accelerant.
Progressive Output (CC 2.1.76)
Output results incrementally during PR creation:
| After Step | Show User |
|---|---|
| Pre-flight | Branch status, remote sync result |
| Each agent | Agent validation result as it returns |
| Tests | Test results, lint/typecheck status |
| PR created | PR URL, CI status link |
For feature PRs with 3 parallel agents, show each agent's result as it returns — don't wait for all agents before running local tests.
STEP 1: Create Tasks (MANDATORY)
BEFORE doing ANYTHING else, create tasks to track progress:
# 1. Create main task IMMEDIATELY
TaskCreate(subject="Create PR for {branch}", description="PR creation with validation", activeForm="Creating pull request")
# 2. Create subtasks for each phase
TaskCreate(subject="Pre-flight checks", activeForm="Running pre-flight checks") # id=2
TaskCreate(subject="Run validation agents", activeForm="Validating with agents") # id=3
TaskCreate(subject="Run local tests", activeForm="Running local tests") # id=4
TaskCreate(subject="Create PR on G
Установить create-pr в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
AskUserQuestionBashReadWriteAgentTaskCreateTaskUpdateSkillmcp__memory__search_nodesCronCreateCronDeleteВложенные файлы
FAQ
Что делает скилл create-pr?
Opens a PR after pre-flight checks (tests, lint, types, security) with a conventional title and body. Use only when asked for this skill; an everyday gh pr create stays plain tooling.
Как установить скилл create-pr?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл create-pr запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic