.opencode/skills/pr-create/SKILL.md
Create a GitHub pull request from the current branch with auto-generated title and description. Use when the user wants to create a PR, open a pull request, or submit changes for review.
npx skillsauth add shouenlee/ghcp-dev-plugin pr-createInstall 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 GitHub pull request from the current branch with an auto-generated title and description based on commit history.
/pr-create [--target <branch>] [--draft] [--title "<title>"]
| Flag | Description |
|------|-------------|
| --target <branch> | Target branch (default: repository's default branch) |
| --draft | Create as a draft PR |
| --title "<title>" | Override the auto-generated title |
gh CLI must be installed and authenticated (gh auth status)Get the current branch and verify it has commits to push:
git branch --show-current
If on main or master, warn the user — they probably want to create a feature branch first.
Check if the branch has been pushed to the remote:
git log --oneline origin/{branch}..HEAD 2>/dev/null
If there are unpushed commits, push the branch first:
git push -u origin {branch}
Ask the user for confirmation before pushing.
If --target was specified, use that branch.
Otherwise, determine the default branch:
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
Check if a PR already exists for this source → target branch combination:
gh pr list --head {branch} --json number,url
If one exists, show the URL and ask the user if they want to update that PR instead of creating a new one.
If --title was specified, use that.
Otherwise, generate a title from the commit history:
git log --oneline origin/{target}..HEAD
Title rules:
Description: Generate a markdown summary:
## Summary
{2-3 bullet points summarizing what this PR does, derived from commit messages and changed files}
## Changes
{list of commits, from `git log --oneline`}
## Files Changed
{output of `git diff --stat origin/{target}..HEAD`}
If commit messages or the branch name reference issues (e.g., fix-123, Fixes #456), include Fixes #<number> in the description body to auto-link.
Before creating the PR, show the user what will be created:
## PR Preview
**Title:** {title}
**Source:** {branch} → **Target:** {target}
**Draft:** {yes/no}
### Description
{description}
Use AskUserQuestion to confirm:
gh pr create --title "{title}" --body "{description}" --base {target} [--draft]
After creation, show:
## PR Created
**PR #{number}:** {title}
**URL:** {url}
gh not authenticated: Suggest running gh auth login.tools
Decomposes feature descriptions or GitHub issues into ordered subtasks with file-level scope, acceptance criteria, and optional gh issue create. Use when asked to "break down task", "decompose feature", "create subtasks", "plan implementation", "break this into tasks", "task list", or "implementation plan".
documentation
Generates changelogs from conventional commits, bumps semantic versions in pyproject.toml or package.json, and publishes GitHub releases. Use when asked to "create release", "release notes", "changelog", "bump version", "semantic version", "tag release", "publish release", or "what changed since last release".
development
Runs ruff, mypy, and bandit on changed Python files — explains violations and auto-fixes with ruff check --fix. Use when asked to "lint", "fix lint", "check types", "type check", "run mypy", "run ruff", "python quality", or "lint python files".
development
Create new Agent Skills for GitHub Copilot from prompts or by duplicating this template. Use when asked to "create a skill", "make a new skill", "scaffold a skill", or when building specialized AI capabilities with bundled resources. Generates SKILL.md files with proper frontmatter, directory structure, and optional scripts/references/assets folders.