Generate PR description using repository's PR template and current branch changes, copy to clipboard
npx skills add https://github.com/Automattic/pocket-casts-android --skill create-pr
Generate GitHub pull request descriptions using the PR template at .github/PULL_REQUEST_TEMPLATE.md and referencing changes in the current branch. Outputs markdown and copies to clipboard.
Activate this skill when the user:
/create-pr command with or without a repo nameThis skill does NOT:
This skill ONLY:
pbcopy on macOS, xclip/xsel on Linux, clip.exe on Windows)If repo name is provided:
If no repo name is provided:
.git in current workspaceValidation:
main, master, or the default branchRun these commands in the repository directory:
# Get current branch name
git branch --show-current
# Get the base branch (usually main or master)
git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
# Get commit history since divergence from base
git log {base-branch}..HEAD --oneline
# Get full diff since divergence
git diff {base-branch}...HEAD
Look for PR template in these locations (in order):
.github/PULL_REQUEST_TEMPLATE.md.github/pull_request_template.mddocs/PULL_REQUEST_TEMPLATE.mddocs/pull_request_template.mdPULL_REQUEST_TEMPLATE.mdpull_request_template.mdCRITICAL: If template found:
If no template found:
## Summary
## Changes
## Testing
## Related Issues
Based on the git diff and commit history:
Title Generation:
[Type] Brief descriptionBody Generation:
IMPORTANT: Follow the repository's template structure exactly.
[x][ ]Format the complete PR content:
## Title
{Generated PR title}
## Description
{Filled PR template body}
macOS:
echo "{PR title and body}" | pbcopy
Linux:
# Using xclip (install: apt-get install xclip or yum install xclip)
echo "{PR title and body}" | xclip -selection clipboard
# Or using xsel (install: apt-get install xsel or yum install xsel)
echo "{PR title and body}" | xsel --clipboard --input
Windows (Git Bash/WSL):
echo "{PR title and body}" | clip.exe
Cross-platform detection example:
# Detect OS and use appropriate clipboard command
if command -v pbcopy > /dev/null; then
echo "{PR title and body}" | pbcopy
elif command -v xclip > /dev/null; then
echo "{PR title and body}" | xclip -selection clipboard
elif command -v xsel > /dev/null; then
echo "{PR title and body}" | xsel --clipboard --input
elif command -v clip.exe > /dev/null; then
echo "{PR title and body}" | clip.exe
else
echo "⚠️ No clipboard utility found. Please copy manually."
fi
✅ PR description generated and copied to clipboard!
Next steps:
1. Push your branch: git push -u origin HEAD
2. Create PR on GitHub
3. Paste from clipboard
Error: No GitHub remote found. Please configure origin remote first.
Suggestion: git remote add origin https://github.com/{org}/{repo}.git
Error: Cannot create PR from default branch (main/master).
Suggestion: Create a feature branch first: git checkout -b feature/your-branch-name
Error: No commits found on this branch compared to {base-branch}.
Suggestion: Make some commits first, or check if you're on the right branch.
User: /create-pr woocommerce-shipping
[Skill analyzes branch: feature/add-scanform-ui]
[Base branch: main]
[Commits: 3 commits adding ScanForm UI components]
[Template found: .github/PULL_REQUEST_TEMPLATE.md]
Agent outputs:
✅ PR description generated and copied to clipboard!
---
## Title
feat: Add ScanForm UI for USPS bulk label printing
## Description
### Summary
Implements the ScanForm UI to allow merchants to generate USPS ScanForms for bulk label printing.
### Changes
- Added ScanFormModal component with form validation
- Integrated ScanForm API endpoint
- Added ScanForm history table to settings page
- Updated tests for new components
### Testing
1. Enable USPS in WooCommerce Shipping
2. Purchase multiple USPS labels
3. Navigate to Settings > Shipping Labels > ScanForm
4. Generate a new ScanForm
5. Verify history shows in table
### Related Issues
Closes WOOSHIP-1761
---
Next steps:
1. Push your branch: git push -u origin HEAD
2. Create PR on GitHub
3. Paste description from clipboard
User: /create-pr
[Skill detects 3 git repos in workspace]
Response:
I found multiple repositories in your workspace:
1. woocommerce-shipping
2. ciab-admin
3. woocommerce-connect-server
Which repository do you want to create a PR for?
User: /create-pr
[Skill analyzes branch: fix/null-shipment-ids]
[Single commit: "Fix critical error when opening orders with null shipment IDs"]
Agent outputs:
✅ PR description generated and copied to clipboard!
---
## Title
fix: Handle null shipment item IDs in older orders
## Description
### Summary
Fixes critical error when opening older orders that have null shipment item IDs.
### Changes
- Added null check in shipment data retrieval
- Updated error handling for legacy order data
- Added defensive coding for missing shipment metadata
### Testing
1. Create an order with WooCommerce Shipping 1.x
2. Upgrade to 2.x
3. Open the order in admin
4. Verify no fatal error occurs
### Related Issues
Fixes #1395
---
Content is in your clipboard - paste into GitHub PR form!
Always output in this structure:
## Title
{Generated title}
## Description
{Filled template body}
Then run the appropriate clipboard command for the user's platform (see Step 7 for cross-platform options):
# macOS
echo "{full content}" | pbcopy
# Linux (xclip)
echo "{full content}" | xclip -selection clipboard
# Windows
echo "{full content}" | clip.exe
And tell the user:
✅ PR description generated and copied to clipboard!
Next steps:
1. Push your branch: git push -u origin HEAD
2. Create PR on GitHub
3. Paste description from clipboard
.github/ISSUE_TEMPLATE/ - don't confuse with PR templatespbcopy on macOS, xclip/xsel on Linux, clip.exe on Windows)Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping
Comprehensive GitHub code review with AI-powered swarm coordination
Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.
Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold for ensuring high-quality agent outputs and codebase reliability.
GitHub CLI (gh) comprehensive reference for repositories, issues, pull requests, Actions, projects, releases, gists, codespaces, organizations, extensions, and all GitHub operations from the command line.
GitHub CLI - manage repositories, issues, pull requests, actions, releases, and more from the command line.
You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.
You are a technical debt expert specializing in identifying, quantifying, and prioritizing technical debt in software projects. Analyze the codebase to uncover debt, assess its impact, and create acti
Take automattic/create-pr from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference apt.
Without those the skill loads but fails at the first command.