Create GitHub Pull Request

VerifiedCaution

Push branch and create a GitHub PR with a concise, issue-linked description.

Sby Skills Guide Bot
DevelopmentIntermediate
8/1/2026
Claude Code
#pull-requests#github-cli#changelog#git-workflow#issue-tracking

Recommended for

Automated summary

Pushes the current branch and opens a GitHub pull request with a concise, issue-linked description, updating the CHANGELOG along the way.

Strengths

  • Automates the whole chain: reading branch context, updating CHANGELOG.md, pushing, then creating the PR through gh
  • Enforces a consistent shape: conventional title, Background/Changes template, self-assignment, and a label picked from the branch prefix
  • Fetches the issue title via gh issue view and can move the issue to "In Review" on a GitHub Project board
  • Explicitly warns against bypassing pre-commit hooks with --no-verify when a push fails

Limitations

  • Relies on repo conventions: CHANGELOG.md, .github/PULL_REQUEST_TEMPLATE.md and .claude/github-project.json must already exist
  • Requires an authenticated gh CLI, a GitHub remote and a primary branch named main
  • The GitHub Project status step is only partially documented and depends on pre-configured project and field IDs
When to use it

Use it when a branch is ready to push and you need a formatted GitHub PR tied to an issue or ticket.

When not to use it

Avoid it on repositories not hosted on GitHub, without a CHANGELOG.md, or when you want to hand-write a free-form PR description.

Security analysis

Caution
Quality score90/100

The skill uses Bash and the GitHub CLI to push branches, create pull requests, and update project statuses. These are legitimate, user-invoked development workflows with no destructive or exfiltrating behavior. However, because it pushes to remote repositories and modifies external project state, it warrants caution rather than a fully safe rating.

Findings
  • •Executes git push to remote, which modifies the remote repository state.
  • •Uses gh CLI to create PRs and update GitHub Projects, requiring authenticated network access.
  • •Automatically commits changes to CHANGELOG.md without explicit user confirmation beyond the skill invocation.
How this analysis is made

Examples

PR liée à un ticket
/pr #42
Créer la PR de la branche courante
Create the pull request for this feature branch, link it to issue 118 and make sure the changelog is updated first.
Correction de bug
Push my fix/ branch and open a PR linked to #203 with the bug label and the usual Background/Changes template.

name: pr description: Push branch and create a GitHub PR with concise, issue-linked description user-invocable: true argument-hint: "[#issue]" allowed-tools: Bash, Read, Grep, Glob

Create Pull Request

Push branch and create a PR with a concise, issue-linked description.

IMPORTANT: This skill MUST be used for ALL pull request creation — even when the user says "create pr" without /pr. Never create a PR without following these steps.

Current Branch Context

  • Branch: !git branch --show-current
  • Commits: !git log main..HEAD --oneline 2>/dev/null
  • Changed files: !git diff main..HEAD --stat 2>/dev/null

Arguments

  • $ARGUMENTS - Issue reference (optional, e.g., #42 or 42). If provided, the PR will be linked to this issue.

Instructions

  1. Review the branch context above — the commits and changed files are already loaded.

  2. MANDATORY: Update CHANGELOG.md — Read CHANGELOG.md and check the ## Unreleased section. If the changes from this branch are NOT already listed there, you MUST update it before proceeding. Do NOT skip this step. Do NOT proceed to push without verifying.

  • Add entries under the appropriate subsection (### Added, ### Changed, ### Fixed, etc.)
  • Reference issue numbers where applicable (e.g., (Issue #123))
  • Commit the update:
    git add CHANGELOG.md && git commit -m "docs: update changelog"
    
  1. Push branch:
git push -u origin HEAD
  • The pre-commit hook runs tests, shellcheck, and linting automatically on commit. Ensure all checks passed before pushing.
  • If push fails, read the output, fix the issue, commit the fix, and retry. Do NOT use --no-verify to bypass.
  1. Generate PR title:
  • If $ARGUMENTS contains an issue number, fetch the issue title:
    gh issue view <number> --json title -q '.title'
    
  • PR title format: <type>(<scope>): <short description> (conventional commit style, under 70 chars)
  • Derive the type from the branch prefix (feat/ → feat, fix/ → fix, docs/ → docs)
  1. Create PR using the template from .github/PULL_REQUEST_TEMPLATE.md:
gh pr create --title "<title>" --assignee @me --label "<label>" --body "$(cat <<'EOF'
## 🤔 Background

Related #<issue-number>

<1-2 sentences: motivation and context for the changes>

## 💡 Changes

- <bullet 1: what changed and why>
- <bullet 2>
- <bullet 3> (optional)
- <bullet 4> (optional)
EOF
)"

MANDATORY: Always follow the PR template structure (## 🤔 Background + ## 💡 Changes). Never use a different format.

Assignee: Always assign to @me (the PR creator).

Labels: Add the single most relevant label based on the branch prefix and change context:

  • bug — branch starts with fix/ and addresses a defect
  • enhancement — branch starts with feat/ or adds new functionality
  • documentation — branch starts with docs/ or only changes docs
  • refactor — code restructuring with no behavior change
  • ui — visual/frontend-only changes
  • investigation — spikes, research, or exploratory work

Body guidelines:

  • Background: Link the issue with Related #<number>, then 1-2 sentences of context. NEVER use Closes or Fixes.
  • Changes: 2-4 short bullet points. Focus on what and why, not implementation details.
  • No file lists, no class names, no code snippets in the body.
  • Keep the entire body under 15 lines.
  1. Move issue to "In Review" in GitHub Project (if issue number provided):
# Read project config from .claude/github-project.json
ITEM_ID=$(gh project item-list PROJECT_NUMBER --owner OWNER --format json \
  | jq -r '.items[] | select(.content.number == ISSUE_NUMBER) | .id')

gh project item-edit \
  --id "$ITEM_ID" \
  --project-id "PROJECT_ID" \
  --field-id "STATUS_FIELD_ID" \
  --single-select-option-id "IN_REVIEW_OPTION_ID"

Note: Requires project scope. Run gh auth refresh -s project if needed.

  1. Report the PR URL to the user.

Example Usage

/pr
/pr #42
/pr 15

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/create-github-pull-request-ms9wnxxb/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/create-github-pull-request-ms9wnxxb' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/create-github-pull-request-ms9wnxxb/download' --output '.skill-downloads/create-github-pull-request-ms9wnxxb/SKILL.md.part' && mv '.skill-downloads/create-github-pull-request-ms9wnxxb/SKILL.md.part' '.skill-downloads/create-github-pull-request-ms9wnxxb/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash, Read, Grep, Glob

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/create-github-pull-request-ms9wnxxb/SKILL.md' && test -s '.skill-downloads/create-github-pull-request-ms9wnxxb/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr' && cp -R '.skill-downloads/create-github-pull-request-ms9wnxxb' '.claude/skills/pr'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/create-github-pull-request-ms9wnxxb'

openskills read 'create-github-pull-request-ms9wnxxb'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/create-github-pull-request-ms9wnxxb/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills