
Create PR
Creates a GitHub PR with a Linear-ticket-prefixed title and a decision-led, narrative...
Install
npx skills add prisma/orm --skill create-pr -g -a claude-code -y- Repository
- prisma/orm47.7k
- Category
- Git and review
- Updated
- 4d ago
- License
- Apache-2.0
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
Creates a GitHub PR with a Linear-ticket-prefixed 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 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".

