skills/create-pr/SKILL.md
Creates a GitHub pull request for the current branch using the gh CLI. Use when asked to create a PR, open a pull request, submit changes for review, or push and create a PR. Defaults to draft, detects and fills repo PR templates, auto-detects the base branch, and supports 'ready for review' override. DO NOT TRIGGER for reviewing existing PRs or commenting on PRs.
npx skillsauth add shousper/claude-kit create-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create a pull request for the current branch. Defaults to draft so the author can review on GitHub before marking ready.
Core principle: Draft by default. The author controls when a PR is ready for review.
# Verify gh CLI is available and authenticated
command -v gh >/dev/null 2>&1 || echo "GitHub CLI (gh) not installed"
gh auth status 2>/dev/null || echo "Not authenticated with gh"
# Detect default branch
base=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
base=${base:-main}
git log "origin/$base..HEAD" --oneline
# Verify branch is pushed
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null
If branch is not pushed:
git push -u origin $(git branch --show-current)
# Check common template locations
ls .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null
ls .github/PULL_REQUEST_TEMPLATE/ 2>/dev/null
ls docs/PULL_REQUEST_TEMPLATE.md 2>/dev/null
ls PULL_REQUEST_TEMPLATE.md 2>/dev/null
If template exists: read it, fill out all sections from diff and commit history.
If no template: examine recent merged PRs for conventions (gh pr list --state merged --limit 5).
Default (draft):
gh pr create --draft --title "<title>" --body "<body>"
If your human partner explicitly requests "ready for review":
gh pr create --title "<title>" --body "<body>"
## Summary
<2-3 bullets of what changed and why>
## Test Plan
- [ ] <verification steps>
Your human partner can request a non-draft PR by saying:
In these cases, omit the --draft flag.
main as the base branch — always detect the default branch dynamically; some repos use master, develop, or other names.gh pr create will fail if the branch doesn't exist on the remote.--draft — the default is draft for a reason. Only omit when your human partner explicitly asks.Called by:
References:
/commit command for staging and committingdevelopment
Enforces project-specific coding conventions by loading language standards before writing code. Use when about to write, edit, modify, or generate Go, Rust, Python, Tailwind CSS, or HCL (Terraform/OpenTofu) files. Loads once per language per session and overrides default style with project conventions. DO NOT TRIGGER for languages other than Go, Rust, Python, Tailwind CSS, or HCL (Terraform/OpenTofu).
development
Creates, edits, and tests Claude skill files (SKILL.md) using TDD methodology with baseline pressure testing and rationalization defense. Use when writing a new skill, modifying an existing skill, optimizing a skill description for discovery (CSO), testing whether a skill triggers correctly, or structuring skill documentation. Enforces RED-GREEN-REFACTOR for process documentation.
development
Creates detailed, bite-sized implementation plans with TDD structure, exact file paths, complete code, and test commands. Use when you have a spec, requirements, design doc, or feature request and need to plan before coding — especially for multi-step tasks, large features, or when handing off to another session. DO NOT TRIGGER when asked to write code directly or fix a simple bug.
testing
Removes git worktrees safely, cleans up associated branches, and pulls latest mainline after removal. Use when finished with a worktree, done with a branch, cleaning up after a merge or PR, abandoning work in a worktree, or when "git worktree list" shows stale entries. Checks for uncommitted changes, verifies no open PRs before branch deletion, and handles force-removal of locked worktrees.