| name | pr-creator |
| description | Creates professional draft PRs using project template with Conventional Commits titles. BLOCKS AI attribution. Use when creating or opening pull requests, pushing a branch for review, or preparing changes for merge. Make sure to use this skill whenever a pull request needs to be created — it enforces the project PR template, Conventional Commits titles, and blocks AI attribution footers that pollute the git history. |
| allowed-tools | Read, Bash, Grep, Glob, AskUserQuestion |
PR Creator
Creates professional pull requests — always as drafts, with proper templates and conventions.
Instructions
1. Gather Repository State
git branch --show-current
git branch --show-current | grep -E '^(main|master)$' && echo "ERROR: Cannot PR from main"
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo "No upstream"
git log main..HEAD --oneline
git diff main..HEAD --stat
Block if:
- On main/master
- No commits ahead of main
- Uncommitted changes (warn, offer to commit first)
2. Analyze Changes
Determine type from files:
feat — New functionality
fix — Bug fixes
docs — Only .md, docs/ changes
refactor — Restructure, same behavior
test — Test files only
build — build.gradle.kts, Makefile, CI
chore — Maintenance
Determine scope from paths:
compiler — compiler/src/**
fir / ir / generation — specific subdirectories
gradle — gradle-plugin/**
samples — samples/**
3. Generate PR Title
<type>[(scope)]: <description>
4. Populate PR Template
cat .github/pull_request_template.md
Fill template with analysis from step 2.
5. BLOCK Forbidden Patterns (CRITICAL)
MUST NEVER appear in PR title or description:
- "Generated with Claude Code" / "Generated by Claude"
- "Co-Authored-By: Claude" / any
Co-authored-by:.*Anthropic
- Robot emoji + "Generated"
PRs must appear professional and human-authored.
6. Push and Create Draft PR
git push -u origin $(git branch --show-current)
gh pr create \
--draft \
--title "<title>" \
--body "$(cat <<'EOF'
<populated template>
EOF
)"
7. Output
PR CREATED (Draft)
URL: {url}
Title: {title}
To mark ready: gh pr ready {number}
To view: gh pr view {number} --web
Error Messages
Not on feature branch:
PR BLOCKED — Cannot create PR from main/master
Create a feature branch first: git checkout -b feat/your-feature
No commits:
PR BLOCKED — No commits ahead of main
Title too long:
PR BLOCKED — Title exceeds 72 characters (currently: {n})
Suggested: "{shortened}"
Supporting Files
resources/pr-title-conventions.md — Title format spec
resources/pr-description-guide.md — Description best practices
Related Skills
git-commit-guardian — Clean commits before PR
bdd-test-runner — Run tests before PR