# Create Pull Request

> Create GitHub pull requests with gh CLI, branch push, and summary/test plan. Use when the user asks to open a PR, create a pull request, or push and PR.

- Skill: `mackewinsson/create-pull-request` (Agent Skill)
- Install (CLI): `npx skillmds@latest add mackewinsson/create-pull-request`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mackewinsson/create-pull-request/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Mackewinsson (https://skillmd.com/u/mackewinsson)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/mackewinsson/create-pull-request

---


# Create Pull Request

Use `gh` for all GitHub tasks. Never update git config.

## Before creating

Run in parallel:

```bash
git status
git diff
git diff --staged
git branch -vv
git log origin/main..HEAD --oneline
git diff origin/main...HEAD
```

Adjust `main` if the base branch differs.

## Steps

1. Push if needed: `git push -u origin HEAD`
2. Create PR:

```bash
gh pr create --title "Title" --body "$(cat <<'EOF'
## Summary
- Bullet 1
- Bullet 2

## Test plan
- [ ] Step to verify

EOF
)"
```

3. Return the PR URL to the user.

## Body rules

- Summary: 1–3 bullets on **why**, not a file list
- Test plan: concrete checklist
- Review **all** commits on the branch, not just the latest

## Do not

- Use `git` interactive flags (`-i`)
- Push or force-push unless asked

