Create Pull Request

VerifiedSafe

Automates creating a branch, committing, pushing, and opening a pull request to main.

Sby Skills Guide Bot
DevOpsBeginner
7/22/2026
Claude Code
#git#pull-request#commit#branching#github-cli

Recommended for

Automated summary

Automates creating a feature branch, committing changes, pushing, and opening a pull request to main via gh.

Strengths

  • Runs branch, commit, push, and PR creation end to end without manual steps
  • Generates conventional branch names and structured commit messages
  • Ships explicit safeguards (no git add -A, no force push, no obvious secrets)
  • Handles the case of an existing feature branch with an open PR by only committing and pushing

Limitations

  • Assumes git and gh are already installed and authenticated
  • Branch naming and commit messages rely on automated diff analysis and should be reviewed
  • Does not cover review, merging, or conflict resolution
When to use it

When you have finished local changes and want a clean branch and a PR to main in a single command.

When not to use it

Avoid it on repos without a GitHub remote or gh installed, or when the PR target is a branch other than main.

Security analysis

Safe
Quality score88/100

The skill uses git and gh only for standard branch, commit, push, and PR creation workflows. It explicitly avoids force-pushing, direct pushes to main, and staging likely secret files. No obfuscated commands, destructive actions, exfiltration, or safety-disabling instructions are present.

No concerns found

How this analysis is made

Examples

Ouvrir une PR pour des changements terminés
/pr
PR après correction de bug
J'ai corrigé le bug de pagination dans la liste des utilisateurs, crée une branche et ouvre une PR vers main.
Mettre à jour une PR existante
Ajoute un commit à la PR en cours avec les derniers ajustements de tests puis pousse-la.

name: pr description: Create a feature branch, commit changes, push, and open a PR to main. allowed-tools: Bash(git *), Bash(gh *), Read, Edit, Write, AskUserQuestion

PR

Create a feature branch from current changes, commit, push, and open a pull request.

Usage

/pr

Process

  1. Check state: Run git diff, git diff --cached, git status -u to see all changes.
  2. Determine branch name: Analyze changes and generate a branch name (feat/xxx, fix/xxx, docs/xxx, refactor/xxx, chore/xxx). If already on a feature branch (not main), skip branch creation.
  3. Create branch: git checkout -b {branch} (from main).
  4. Stage & commit: Same rules as /commit — analyze changes, draft message, stage specific files, commit with Co-Authored-By.
  5. Push: git push -u origin {branch}
  6. Create PR: gh pr create with title and body.
    • PR title: same as commit first line (under 70 chars)
    • PR body: summary bullets + test plan

Commit Message Format

  • First line: type: short summary (under 72 chars)
    • Types: feat, fix, refactor, style, docs, chore
  • Blank line, then bullet-point details for non-trivial changes
  • End with Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
  • Write in English (per CLAUDE.md conventions)
  • Pass the message via HEREDOC for proper formatting

PR Body Format

## Summary
<1-3 bullet points>

## Test plan
<bulleted checklist>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Multiple commits on same branch

If already on a feature branch with an open PR:

  • Stage & commit only (no new branch, no new PR)
  • Push to update the existing PR

Safety

  • Never stage files that may contain secrets (.env, credentials, etc.)
  • Never use git add -A — always add specific files
  • Never force push
  • Always create PR to main, never push directly to main

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

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-pull-request-mrwak8my/SKILL.md' && test -s '.skill-downloads/create-pull-request-mrwak8my/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr' && cp -R '.skill-downloads/create-pull-request-mrwak8my' '.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-pull-request-mrwak8my'

openskills read 'create-pull-request-mrwak8my'

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