Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

create-pr

БесплатноБез исполняемых скриптовНе проверен

Creates a GitHub PR with a conventional-commit title and a decision-led, narrative description for Prisma 8. Use when the user wants to create a pull request…

prismaот prisma★ 47 814 звёзд на 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.

  1. Run git log "$BASE_BRANCH..HEAD" --oneline to see all commits on the current branch (fallback: git log "origin/$BASE_BRANCH..HEAD" --oneline).
  2. Run git diff "$BASE_BRANCH...HEAD" --stat to see which files changed (fallback: git diff "origin/$BASE_BRANCH...HEAD" --stat).
  3. Run git diff "$BASE_BRANCH...HEAD" to read the full diff (fallback: git diff "origin/$BASE_BRANCH...HEAD").
  4. 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 create can 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:

  1. 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+)\b in git rev-parse --abbrev-ref HEAD. Use the trailing slug from the branch name verbatim as $SLUG.
  2. The conversation context. If the user previously linked or named a ticket in this conversation, use that.
  3. The most recent commit messages on the branch. Look for a Refs: TML-NNNN or (TML-NNNN) trailer / mention in git 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, the same one CONTRIBUTING.md asks of every contributor:

type(scope): concise lowercase description

Rules:

  • type is one of feat, fix, chore, docs, refactor, test, build, ci.
  • scope is the primary affected package or layer (sql-runtime, postgres-adapter, cli, mongo-orm, etc.). If the change spans several, name the one most central to it. Secondary scopes belong in the body.
  • Lowercase after the colon, except proper nouns, package names and types. No period at the end.
  • The Linear ticket does not go in the title. It goes in ## Linked issue (Step 4), which is what links the PR to the ticket.
  • 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, in words a user of the package would understand. Someone scanning a list of PR titles should be able to tell what this PR delivers without opening it.
    • Bad: feat(pgvector): expand type and operator surface (abstract)
    • Good: feat(pgvector): 5 new operator descriptors + HNSW index support (concrete)

Examples:

  • feat(sql-runtime): add text codec support
  • fix(postgres-adapter): handle null in jsonb columns
  • feat(pgvector): 5 new operator descriptors + HNSW index support
  • refactor(emitter): 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 (today: ## Linked issue, ## Summary, ## Testing performed, ## Skill update, ## Checklist, ## Notes for the reviewer) 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 the Linear ticket link and any prerequisite-PR / follow-up-PR context — replaces the bare close-line at the top).

Required structure (in this order)

  1. ## Linked issue — the template he
Полный SKILL.md на GitHub

Установить create-pr в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл create-pr?

Creates a GitHub PR with a conventional-commit title and a decision-led, narrative description for Prisma 8. 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), без исполняемых скриптов.

Похожие скиллы

Сравнить create-pr с