create-pr
БесплатноБез исполняемых скриптовНе проверенCreates a GitHub PR with a Linear-ticket-prefixed title and a decision-led, narrative description for prisma-next. Use when the user wants to create a pull…
от prisma★ 407 звёзд на GitHubОб этом скилле
Create PR Skill
Instructions
Step 1: Gather Context
Detect the PR's base branch instead of hardcoding main. Set BASE_BRANCH once and reuse it in every diff/log command:
BASE_BRANCH=$(git rev-parse --abbrev-ref origin/HEAD 2>/dev/null | sed 's@^origin/@@')
BASE_BRANCH=${BASE_BRANCH:-main}
git rev-parse --abbrev-ref origin/HEAD returns the remote's default branch (e.g. origin/main); the sed strips the origin/ prefix. The fallback to main covers repos where origin/HEAD is unset. If you know the PR was branched off a non-default branch, override BASE_BRANCH explicitly before running the commands below.
- Run
git log "$BASE_BRANCH..HEAD" --onelineto see all commits on the current branch (fallback:git log "origin/$BASE_BRANCH..HEAD" --oneline). - Run
git diff "$BASE_BRANCH...HEAD" --statto see which files changed (fallback:git diff "origin/$BASE_BRANCH...HEAD" --stat). - Run
git diff "$BASE_BRANCH...HEAD"to read the full diff (fallback:git diff "origin/$BASE_BRANCH...HEAD"). - Check for local-only changes that won't be in the PR unless committed:
git status -sb- If there are uncommitted changes, explicitly call out that
gh pr createcan proceed but those changes will not be in the PR.
Step 2: Resolve the Linear Ticket
Resolve the Linear ticket from context — do not ask the user. The ticket is almost always derivable from one of:
- The branch name. Most branches are named
tml-NNNN-…(lower-case form of the Linear identifier). The current ticket is whatever matches(?i)\b(TML-\d+)\bingit rev-parse --abbrev-ref HEAD. Use the trailing slug from the branch name verbatim as$SLUG. - The conversation context. If the user previously linked or named a ticket in this conversation, use that.
- The most recent commit messages on the branch. Look for a
Refs: TML-NNNNor(TML-NNNN)trailer / mention ingit log "$BASE_BRANCH..HEAD".
Extract:
$TICKET_ID— the canonical upper-case identifier (e.g.,TML-1859)$SLUG— the trailing slug used in Linear URLs (e.g.,pn-add-more-parameterized-types); take it directly from the branch name's trailing portion when available
Only ask the user if all three sources fail to yield an identifier. In that case, ask once with a concrete proposal (e.g. "I couldn't infer a Linear ticket from the branch xyz or the recent commits — which ticket does this PR close?").
Step 3: Compose the PR Title
Format:
$TICKET_ID: <concise title in sentence case>
Rules:
- Always start with the Linear ticket ID followed by
:then a single space. - Sentence case after the colon (capital first letter; rest lowercase except proper nouns, package names, types, etc.).
- No period at the end.
- Aim for under 70 characters total. Optimise for information density, not raw character count — a slightly longer title that names the concrete deliverable is better than a short abstract one.
- The title must convey what concrete thing changed, not just an abstract scope. A teammate scanning a list of PR titles should be able to tell what this PR delivers without opening it.
- Bad:
TML-2375: expand pgvector type and operator surface(abstract) - Good:
TML-2375: 5 new pgvector operator descriptors + HNSW index support(concrete)
- Bad:
- If the change spans multiple packages or layers, name the headline package or capability, not all of them. Secondary scopes belong in the body.
Examples:
TML-1859: add text codec support to sql-runtimeTML-2104: handle null in jsonb columns (postgres adapter)TML-2375: 5 new pgvector operator descriptors + HNSW index supportTML-2456: split contract emission into two phases
Step 4: Compose the PR Description
The PR description must follow a decision-led, narrative structure. A teammate without prior context on the work should be able to read it top-to-bottom and understand what we decided, why, and how it fits together — without being overwhelmed by file lists or alternatives we ultimately rejected.
Consult the PR template
Read .github/PULL_REQUEST_TEMPLATE.md once before drafting. The template's required headers (in prisma-next today: ## Linked issue, ## Testing performed, ## Checklist) must appear in the final body even when the skill's recommended structure below doesn't list them. Where the template and the skill overlap, use the template's richer header (e.g. ## Linked issue — with a Refs: link and any prerequisite-PR / follow-up-PR context — replaces the bare close-line at the top).
Required structure (in this order)
## Linked issue— the template header, used instead of a bare close-line. SingleRefs [$TICKET_ID](https://linear.app/...)link plus, if relevant, links to any prerequisite or follow-up PRs and the Linear tickets they close. Keep it short — three lines max.## At a glance— a copy-pasteable code sample from real code in the branch (not inve
Установить create-pr в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл create-pr?
Creates a GitHub PR with a Linear-ticket-prefixed title and a decision-led, narrative description for prisma-next. Use when the user wants to create a pull request, open a PR, or submit changes for review.
Как установить скилл create-pr?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл create-pr запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
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