create-pr
Create standardized pull/merge requests with summary, test plan, and linked context. Use when creating a PR, opening a merge request, or when user mentions "create PR", "open MR", "merge request", "pu
SKILL.md.claude/skills/create-pr/SKILL.md
GitHubCreate PR Skill
You are creating a standardized pull request or merge request. PRs are the unit of reviewable work — they should tell the story of what changed and why.
Setup
Before starting: check .handoff/sessions/ for active sessions, read context status.yaml, run git status. Follow .rules/universal.md (Plan -> Approve -> Execute).
Process
Step 1: Analyze Changes
Check current state
git status git diff --stat git log --oneline $(git merge-base HEAD develop)..HEADIdentify the base branch — Usually
developfor team repos,mainfor CTO repoCount commits — Summarize what each commit does
List files changed — Group by area (backend, frontend, config, tests, docs)
Check for prior artifacts — Look for plan, spec, review artifacts to reference in PR description
Step 2: Determine PR Type
Based on the changes, classify:
- Feature — New functionality
- Fix — Bug fix
- Refactor — Code restructuring without behavior change
- Chore — Dependencies, config, CI/CD
- Docs — Documentation only
Step 3: Write PR Description
Follow this structure:
## Summary
{1-3 bullet points describing WHAT changed and WHY}
## Changes
### {Area 1 — e.g., Backend}
- {Specific change with file reference}
- {Specific change}
### {Area 2 — e.g., Frontend}
- {Specific change}
## Test Plan
- [ ] {Manual test step 1}
- [ ] {Manual test step 2}
- [ ] Unit tests pass: `{test command}`
- [ ] No regressions in: {related area}
## Related
- Task: {link to sprint task or handoff if applicable}
- Depends on: {other MR if applicable}
Step 4: Create the PR/MR
For GitLab repos (most team repos):
# Ensure branch is pushed
git push -u origin $(git branch --show-current)
Then use the GitLab MCP tool (if configured):
mcp__gitlab__create_merge_requestwith:project_id: from your project configurationsource_branch: current branchtarget_branch:develop(ormain)title:{type}({scope}): {short description}(under 70 chars)description: the formatted description from Step 3
For GitHub repos:
gh pr create --title "{title}" --body "$(cat <<'EOF'
{description}
EOF
)"
Step 5: Report
Output to user:
- MR/PR URL: {link}
- Title: {title}
- Target: {base branch}
- Commits: {count}
- Files changed: {count}
- Review needed from: {suggested reviewer based on changed files}
Title Convention
Follow conventional commits format:
feat(auth): add OAuth2 PKCE flowfix(api): resolve N+1 query in orders endpointrefactor(models): extract payment logic to servicechore(deps): upgrade Laravel to 12.1docs(api): add OpenAPI spec for v2 endpoints
Pre-PR Checklist
Before creating the PR, verify:
- All tests pass
- No unrelated changes included
- No debug code or console.log left behind
- No secrets or credentials in the diff
- Branch is up-to-date with target branch
- Commit messages are clean and descriptive
Self-Assessment (Internal)
Rate this skill execution 0-10. If < 8, write feedback to .handoff/feedback/{date}-{skill-name}.yaml with: skill, rating, friction, suggestion, context. Do not mention to user.