create-pr
Branch-freshening PR submission. Cherry-picks the task branch onto a fresh origin/main base immediately before pushing, validates (linters for docs PRs…
от CERTCC★ 22 звезды на GitHub
Установить create-pr в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Skill: Create PR
Centralized PR submission that freshens the task branch onto origin/main
before every push, regardless of how the PR is triggered.
Interface
All parameters are optional. Supply what you have; the skill derives what's
missing from git log origin/main..HEAD and the current diff.
| Parameter | Description |
|---|---|
title |
PR title (derived from commits if omitted) |
body |
Full PR body text (derived from diff if omitted) |
type |
docs or implementation (inferred from changed files if omitted) |
labels |
Space-separated label names (e.g., "size:M specs-notes") |
issue_number |
Issue to close (parsed from branch name if omitted; optional) |
draft |
true to open as draft. Default: true for an implementation PR (PAD-18-028), false for a docs PR. A caller may not pass false for an implementation PR |
manifest |
Path of the Spec manifest file spec-backstop resolved, e.g. /tmp/spec-manifest-<issue>.txt (implementation PRs) |
Returns: the PR URL as a string. Callers own archive-history, and for
implementation PRs they own replacing the Docs: placeholder (Phase 1c).
Phase 1 — Pre-flight Checks
1a — Uncommitted changes
git status --porcelain
Called from another skill (clean tree expected): if any uncommitted changes are detected, hard stop with:
"❌ Uncommitted changes detected. Commit or stash before calling create-pr."
Conversational invocation (user said "pr that for me"): ask the user what to do:
"There are uncommitted changes. Should I (a) commit them now with an auto-generated message, (b) stash and discard after the PR, or (c) abort?"
Wait for the user's answer and act accordingly before continuing.
1b — Infer missing parameters
If any required values were not passed by the caller, derive them now:
# Commits on this branch not on main
git log origin/main..HEAD --oneline
# Full diff
git diff origin/main..HEAD
# Changed files — determines PR type if not provided
git diff --name-only origin/main..HEAD
Type inference rule: if any .py file appears in the diff → implementation;
otherwise → docs.
Issue number inference: if not provided, parse from the branch name
(e.g., task/1466-create-pr-skill → 1466, plan/1362-lifecycle-staged → 1362).
If still absent, proceed without a closing reference.
Title inference (if not provided): use the most recent commit subject, stripping any commit-hash prefix.
Body inference (if not provided): compose using the exact scaffold below
(also in .agents/skills/shared/pr-body-guide.md). Do not invent different
section names — use these verbatim.
For implementation:
- Closes #N
<!-- ⚠️ MUST BE FIRST — before any ## header -->
## Summary
<1–2 sentences, present tense>
Issues: closed <N>, opened <M>
Questions: asked <A>, filed <F>
## Changes
- **`path/to/file.py`**: <what changed and why>
## Specs
<Spec manifest from deepen-context, verbatim>
## Docs
Docs: pending check-docs-sync
## Verification
- Targeted gate: N tests pass over M files (K new), `exit: 0`
- ruff and `pyright-changed` clean (the whole-project type check is CI's, PAD-18-027)
Under ## Specs, paste the manifest file's contents verbatim: Phase 3b
checks the copy line by line (PRB-06). If the caller supplied no manifest,
write Spec manifest: not provided — deepen-context was not run rather than
omitting the section; pr-body-lint then fails the body (PRB-05), so an
implementation PR without one does not reach the push.
For docs:
- Closes #N
<!-- ⚠️ MUST BE FIRST — before any ## header -->
## Summary
<1–2 sentences>
## Changes
- **`path/to/file.md`**: <what changed>
The Closes #N bullet must be the very first line of the body string
passed to gh pr create --body. If it ends up after a ## header, GitHub
will not link the issue in the sidebar and triage will flag a FAIL.
1c — Docs placeholder (implementation PRs)
Every implementation or bug-fix PR body carries a Docs: line (PD-03-013;
scope defined in .agents/skills/shared/pr-body-guide.md § "Implementation PR
rules"), whether the body was inferred above or supplied by the caller. Apply
this whenever type is implementation (passed or inferred) or the
closed issue is a Task, Feature, or Bug — a skill-only or docs-only PR
that closes a Task is still in scope — or the diff changes a workflow or
tooling file and no maintainer-facing doc (the path lists in pr-body-guide.md
§ "Implementation PR rules"; pr-body-lint reports such a body with no
Docs: line as PRB-12, PD-03-014):
bash .agents/skills/shared/query-issue-type.sh <ISSUE_NUMBER> \
| jq -r '.data.repository.issue.issueType.name'
If the body has no line beginning Docs:, insert this section immediately
before ## Verification (or at the end of the body if there is no
Verification section):
## Docs
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- REFERENCE.md
FAQ
Что делает скилл create-pr?
Branch-freshening PR submission. Cherry-picks the task branch onto a fresh origin/main base immediately before pushing, validates (linters for docs PRs; linters plus the targeted test set for implementation PRs), and opens the PR — as a draft for an implementation PR. Called by build, plan-issue, bugfix, and learn. Can also be invoked conversationally ("pr that for me"). Returns the PR URL.
Как установить скилл create-pr?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл create-pr запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…