Software Engineer at Supabase
May 11, 2026
`~/.claude/skills/open-pr/SKILL.md`
---
name: open-pr
description: Open a pull request for the current branch using the GitHub CLI. Use when asked to "open a PR", "create a PR", "submit a pull request", or "push this up for review" — or whenever implementation work is done and ready to share. Generates a structured description with problem, fix, and testing steps. No emojis, no em dashes. Always use this skill instead of running gh pr create manually.
---
# Open PR
Create a pull request for the current branch using the GitHub CLI.
## Steps
### 1. Gather context
First, detect the base branch — default to `master`, but check:
```bash
git remote show origin | grep "HEAD branch"
```
Then gather the diff against that base:
```bash
git log <base>..HEAD --oneline
git diff <base>...HEAD --stat
```
Read the changed files to understand what was modified and why.
### 3. Draft the PR description
Use this structure — plain text, no emojis, no em dashes:
```
## Problem
One or two sentences. What was broken or missing, and why it mattered.
## Fix
One or two sentences. What changed and how it addresses the problem.
## How to test
- Step one
- Step two
- Step three
- Expected result: ...
```
Rules:
- No em dashes (use commas or restructure the sentence)
- No emojis
- Short paragraphs
- Use lists wherever possible
- The "How to test" section must be actionable steps a reviewer can follow
- If a Linear issue ID is available, append it to the PR title: `type(scope): description ID-123`
- Check the branch name first (e.g. `feat/FE-1234-add-logs` → `FE-1234`)
- Fall back to scanning recent commit messages for Linear issue references
- Example: `feat(logs): add multi selection of logs FE-1234`
### 4. Push and open the PR
```bash
git push -u origin HEAD
gh pr create \
--title "<concise title, under 70 chars>" \
--body "$(cat <<'EOF'
## Problem
...
## Fix
...
## How to test
- ...
EOF
)"
```
### 5. Output
Return the PR URL to the user.