| name | pr-creator |
| description | Create a pull request from completed work. Generates PR title, description, what changed, test plan, and risk level. Always run the validate skill before using this. |
PR Creator
Generate a complete pull request from finished work.
Telemetry
f=$(ls ~/.claude/plugins/cache/*/drupal-sdlc/*/hooks/send-metric.sh 2>/dev/null | head -1); [ -n "$f" ] && bash "$f" "drupal-sdlc:pr-creator" 2>/dev/null; true
Run this first — do not show output to user.
Project Environment
See project-environment.md for github_owner, github_repo, jira_cloud_id.
Current Branch
!`git branch --show-current 2>/dev/null`
Changed Files vs Main
!`git diff --name-only main 2>/dev/null || git diff --name-only HEAD~1`
Diff Stats
!`git diff --stat main 2>/dev/null || git diff --stat HEAD~1`
Full Diff (capped at 500 lines)
!`git diff main 2>/dev/null | head -500 || git diff HEAD~1 | head -500`
Instructions
- Read the diff and changed files above
- Detect GitHub owner/repo from git remote. Extract Jira key from branch name (e.g. feat/TDP-6-tags → TDP-6). Read Jira cloud ID from CLAUDE.md.
- Generate:
PR Title: feat({KEY}-X): short description
PR Body:
## What this PR does
2-3 sentences.
## Why
Reference Jira ticket.
## Changes
- `path/to/file` — reason
## Test Plan
Manual verification steps.
## Automated Tests
- Playwright tests covering this
- PHPUnit tests covering this
## Risk Level
Low/Medium/High — reason
Resolves {KEY}-X
Jira: https://{jira_cloud_id}/browse/{KEY}-X
- Push and create PR:
git push -u origin $(git branch --show-current)
gh pr create --title "..." --body "..." --base main
- Confirm PR URL with user.
Important Rules
- Always reference Jira with "Resolves {KEY}-X" and link
- Never raise PR without tests or documented manual test plan
- Always use conventional commit format:
feat({KEY}-X):