Create GitHub Pull Request

VerifiedSafe

Creates a GitHub pull request by gathering context from `git log`, `git diff`, and the repository's default branch. It handles uncommitted changes, applies PR templates if available, and generates a title with conventional commit style and language detection. Users confirm the draft before the skill pushes commits and creates the PR.

Sby Skills Guide Bot
DevelopmentIntermediate
806/2/2026
Claude Code
#pull-requests#github#git#automation

Recommended for

Our review

Creates a GitHub pull request by gathering context from git history, detecting PR templates, composing a conventional commit title, and generating a structured body with reference links.

Strengths

  • Context-aware description using git diff and log
  • Automatically detects and fills pull request templates
  • Adheres to conventional commit format for the title
  • Confirms changes and prompts before pushing and creating

Limitations

  • Requires both git and gh CLI to be installed and authenticated
  • May involve multiple confirmation steps, which can be verbose
  • Does not handle complex workflows like multiple reviewers or advanced labels
When to use it

Use this skill when you want to quickly create a well-documented pull request without manually drafting all details.

When not to use it

Avoid this skill if you need fine-grained control over the PR content or if your project has a highly customized PR process.

Security analysis

Safe
Quality score90/100

The skill uses only git and gh CLI commands, does not involve destructive actions, and prompts for user confirmation before pushing, making it safe.

No concerns found

Examples

Create PR from current branch
Create a pull request for the current branch, summarizing the changes and linking to the related issue.
Create PR using template
Create a pull request using the repository's pull request template.
Create PR with custom language
Create a pull request in French with the title and body in French.

name: create-pr description: Create a GitHub pull request with context-aware description allowed-tools: Bash(git status *), Bash(git diff *), Bash(git log *), Bash(git rev-parse *), Bash(git push *), Bash(gh repo view *), Bash(gh pr create *), Bash(echo *), Read, Glob, Grep, AskUserQuestion

Pre-fetched context

!git rev-parse --abbrev-ref HEAD !git status --short !git ls-files ':(top,icase).github/pull_request_template.md' ':(top,icase).github/pull_request_template/*.md' ':(top,icase)pull_request_template.md'

Instructions

Create a pull request. Follow this flow:

  1. Gather context: Get default branch via gh repo view --json defaultBranchRef -q .defaultBranchRef.name, then run git log --oneline, git diff --stat, and git diff against it.

  2. Uncommitted changes: If git status above shows output, ask the user whether to commit them, ignore them, or abort. Do not proceed until answered.

  3. PR template:

    • If a template path is listed, Read it before writing title/body.
    • Detect template_language from headings/instructions/checklists (ignore code, URLs, HTML comments).
    • Keep template headings/order and keep HTML comments (<!-- -->).
    • If no template exists, skip.
  4. Compose PR:

    • Title: Conventional Commits, under 72 chars.
    • Decide title language before drafting and keep it fixed unless the user requests a change.
    • Title language policy: use template_language first whenever it can be detected.
    • If the user explicitly asks to override language for the current PR, follow that override.
    • If no template_language is detected, use: explicit user request > latest substantive user message > English.
    • Ignore slash commands (for example /create-pr), code blocks, file paths, and URLs when inferring language.
    • If language signals conflict or are ambiguous, ask the user which language to use before drafting.
    • Keep type(scope) tokens standard (feat, fix, etc.); localize only the description text.
    • Body: if template exists, fill its sections. If not, use Summary / Changes / Concerns / References.
    • Proactively include any reference links (issues, docs, related PRs) found in conversation history.
  5. Confirm: Show the full PR title and body. Ask if the user wants to add links or make any edits — apply and re-confirm. Do not push or create until approved.

  6. Push and create: Push (git push -u origin HEAD) only if there are unpushed commits (git log @{upstream}..HEAD). Create with gh pr create. Return the PR URL.

Related skills