Create Pull Request

VerifiedCaution

Push the branch and open a pull request with template body, labels, and assignee using gh CLI.

Sby Skills Guide Bot
DevelopmentIntermediate
8/19/2026
Claude Code
#pull-request#git#github-cli#branching#workflow

Recommended for

Automated summary

Pushes the current branch and opens a GitHub pull request via gh, with a conventional-commit title, a body built from the repo's PR template, a label derived from the branch prefix, and an assignee.

Strengths

  • Derives the title type and label from the branch prefix (feat/, fix/, ref/)
  • Reuses the exact headers of .github/PULL_REQUEST_TEMPLATE.md instead of hardcoding them
  • Explicit guard: refuses to open a PR from main and creates a branch first
  • Fetches the linked issue title via gh and adds Closes #n for automatic closure

Limitations

  • The assignee is hardcoded to a specific user and the base branch is assumed to be main
  • Assumes gh is installed and authenticated and that a PR template exists in the repo
  • Only one label is applied and there is no size or draft check
When to use it

Use it when a working branch is ready to push and you want a consistently formatted pull request in a single step.

When not to use it

Avoid it on repos without a PR template or gh setup, or when you need a draft PR with multiple labels or a different assignee.

Security analysis

Caution
Quality score82/100

The skill only performs legitimate git/GitHub CLI operations: inspect branch/diff, push the current branch, and open a PR with a templated body. There is no destructive command, no secret handling, and no obfuscation; allowed-tools is tightly scoped to `git` and `gh`. It is rated caution rather than safe only because it takes externally visible, hard-to-undo actions (pushing commits and publishing PRs) and hardcodes an assignee.

Findings
  • •Uses Bash(git)/Bash(gh) with network access: pushes branches and creates public PRs, which is externally visible and not easily reversible
  • •Hardcodes assignee `Chemaclass` in `gh pr create`, so the skill always assigns PRs to a specific person regardless of repo context
  • •Context lines use `!`-prefixed command substitution (`git branch`, `git log`, `git diff`), which executes commands at skill-load time — harmless read-only git here, but that mechanism is worth noting
How this analysis is made

Examples

PR liée à une issue
/create-pull-request 142
PR sans numéro d'issue
Push ma branche feat/user-settings et ouvre la pull request avec le template du dépôt
Correction de bug
Ouvre une PR pour ma branche fix/login-timeout en suivant le template et en fermant l'issue 87

description: Push the branch and open a pull request with template body, labels, and assignee argument-hint: "[issue-number]" allowed-tools: "Read, Bash(git *), Bash(gh *)"

Create Pull Request

Context

!git branch --show-current !git log main..HEAD --oneline !git diff main..HEAD --stat

Instructions

  1. Never open a PR from main. If the current branch is main, create a branch first and move the commits onto it.

  2. Push:

    git push -u origin HEAD
    
  3. Title — conventional commit style, under 70 chars: <type>(<scope>): <description>. Derive the type from the branch prefix (feat/ → feat, fix/ → fix, ref/ → ref). If $ARGUMENTS holds an issue number, read its title for context:

    gh issue view <number> --json title -q '.title'
    
  4. Read .github/PULL_REQUEST_TEMPLATE.md and reuse its exact headers — do not hardcode them here.

  5. Create:

    gh pr create --title "<title>" --assignee Chemaclass --label "<label>" --body "$(cat <<'EOF'
    <exact headers from the template, filled in>
    
    Closes #<issue-number>
    EOF
    )"
    

    Label — pick the single most relevant:

    | Label | When | |---|---| | bug | branch starts with fix/ | | enhancement | branch starts with feat/ | | documentation | docs only | | refactoring | restructuring, no behavior change | | dependencies | dependency bumps |

    Body: what changed and why, not how. Under 15 lines. Use Closes #<n> so merging closes the issue.

  6. Report the PR URL.

Note on emoji

The PR template headers carry emoji and should keep them. GitHub squash-merges copy the title verbatim into history — keep emoji out of the title.

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-pull-request-mszmc9yu/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-pull-request-mszmc9yu' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/create-pull-request-mszmc9yu/download' --output '.skill-downloads/create-pull-request-mszmc9yu/SKILL.md.part' && mv '.skill-downloads/create-pull-request-mszmc9yu/SKILL.md.part' '.skill-downloads/create-pull-request-mszmc9yu/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): Read, Bash(git *), Bash(gh *)

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

This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.

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-pull-request-mszmc9yu/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