Create a Draft Pull Request

VerifiedCaution

Open a draft pull request on GitHub with a clear title and explicit description. MUST be used when creating a PR.

Sby Skills Guide Bot
DevOpsBeginner
7/22/2026
Claude Code
#pull-request#git#github#draft-pr#conventional-commits

Recommended for

Automated summary

This skill opens a draft GitHub pull request with a conventional-commit title and a structured body describing the changes.

Strengths

  • Reviews commits and the diff against main before writing the PR
  • Enforces a clear conventional-commit title format (type, imperative, under 70 characters)
  • Structures the PR body with Summary, Changes and Test plan sections
  • Pushes the branch to the remote when needed and returns the PR URL

Limitations

  • Requires an authenticated gh CLI and a remote GitHub repository
  • Assumes the base branch is named main
  • Always creates a draft, with no option for a merge-ready PR
When to use it

Use it when a branch holds commits ready for submission and you want a documented draft GitHub PR.

When not to use it

Avoid it on GitLab, Bitbucket or repositories without the gh CLI, or when the base branch is not main.

Security analysis

Caution
Quality score88/100

The skill uses legitimate developer tools (git, gh) for its stated purpose and contains no destructive, exfiltrating, or obfuscated instructions. However, it does instruct pushing to a remote and creating a GitHub PR, which are meaningful external side effects, so it warrants caution rather than a fully safe rating.

Findings
  • •Instructs agent to run git push and gh pr create, causing remote repository and network side effects
  • •Assumes gh CLI authentication and may push commits without explicit confirmation
How this analysis is made

Examples

Open a draft PR for a feature branch
Open a draft pull request for my current branch against main.
Draft PR for a bug fix
Create a draft PR titled fix: handle empty config file and include a test plan.
PR with detailed changes
Push my commits and open a draft PR summarizing what changed since main.

name: pr user_invocable: true description: Open a draft pull request on GitHub. MUST use when you want to create/open a PR.

Pull Request Skill

Create a draft pull request with a clear title and explicit description of changes.

Instructions

  1. Analyze branch changes: Understand all commits since diverging from main
  2. Push to remote: Ensure all commits are pushed
  3. Create draft PR: Always open as draft for review before merging

PR Title Format

Follow conventional commit format for the PR title:

<type>: <description>

Types

  • feat: New feature or capability
  • fix: Bug fix
  • refactor: Code restructuring
  • docs: Documentation changes
  • chore: Maintenance tasks
  • perf: Performance improvements

Title Rules

  • Keep under 70 characters
  • Use lowercase, imperative mood
  • No period at the end

PR Body Format

The body MUST be explicit about what changed. Structure:

## Summary
<Clear description of what this PR does and why>

## Changes
- <Specific change 1>
- <Specific change 2>
- <Specific change 3>

## Test plan
- [ ] <How to verify change 1>
- [ ] <How to verify change 2>

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

Execution Steps

  1. Run git status to check for uncommitted changes
  2. Run git log main..HEAD --oneline to see all commits in this branch
  3. Run git diff main...HEAD to see the full diff against main
  4. Check if remote branch exists and is up to date:
    git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo "no upstream"
    
  5. Push to remote if needed: git push -u origin HEAD
  6. Create draft PR using gh CLI:
    gh pr create --draft --title "<type>: <description>" --body "$(cat <<'EOF'
    ## Summary
    <description>
    
    ## Changes
    - <change 1>
    - <change 2>
    
    ## Test plan
    - [ ] <test 1>
    - [ ] <test 2>
    
    ---
    Generated with [Claude Code](https://claude.com/claude-code)
    EOF
    )"
    
  7. Return the PR URL to the user

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-a-draft-pull-request-mrwakdg5/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-a-draft-pull-request-mrwakdg5' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/create-a-draft-pull-request-mrwakdg5/download' --output '.skill-downloads/create-a-draft-pull-request-mrwakdg5/SKILL.md.part' && mv '.skill-downloads/create-a-draft-pull-request-mrwakdg5/SKILL.md.part' '.skill-downloads/create-a-draft-pull-request-mrwakdg5/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.

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

openskills read 'create-a-draft-pull-request-mrwakdg5'

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-a-draft-pull-request-mrwakdg5/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