Draft PR Creator

VerifiedSafe

Creates or updates a draft pull request for the current branch. Uses gh and git to automate the process.

Sby Skills Guide Bot
DevelopmentBeginner
8/2/2026
Claude CodeCursorCodex
#pull-request#git#github-cli#code-review#workflow

Recommended for

Automated summary

Creates or updates a draft pull request for the current branch based on Git history, with a formatted title and a structured body.

Strengths

  • Follows an explicit flow: branch check, context gathering via git log/diff, existing-PR detection, then create or update
  • Refuses to commit to main and enforces branch naming conventions (feat/, fix/, refactor/, chore/)
  • Standardized title (type prefix, imperative mood, under 70 characters) and a concise body written as fluid prose instead of a file list
  • Handles both cases with gh commands: gh pr create --draft or gh pr edit to refresh a description

Limitations

  • The body template is hardcoded for an Elixir project (mix test, mix format, mix compile) and must be adapted for other stacks
  • Fully depends on the GitHub CLI (gh) being installed and authenticated; no GitLab or Bitbucket fallback
  • Only prepares the draft PR: no reviewing, no merging, no automatic issue linking
When to use it

Use it when a feature branch is ready and you need to quickly open a draft PR or refresh its description before review.

When not to use it

Avoid it on repositories not hosted on GitHub, or when you need a PR body written with your team's own template.

Security analysis

Safe
Quality score84/100

All commands are standard read-only git inspections (`branch`, `status`, `log`, `diff`) plus `gh pr view/create/edit` used exactly as intended to open or update a draft PR. Nothing destructive, no `rm`, no `curl | sh`, no base64 payloads, no reading or transmitting secrets/tokens — `gh` handles auth internally. The skill even includes an explicit guard against committing directly to `main`. Execution risk is limited to normal developer tooling used for its stated purpose, so this is safe rather than merely caution.

Findings
  • •No allowed-tools declared, so the agent falls back to ambient/default tool permissions (bash, network) with no explicit scoping
  • •Invokes `gh pr create`/`gh pr edit` using the user's existing GitHub credentials — legitimate, but the skill has no guardrail on which repo/remote is targeted
How this analysis is made

Examples

Open a draft PR
/pr — create a draft PR for my current branch
Refresh an existing PR
/pr https://github.com/acme/api/pull/142 — update this PR description from the latest commits
Before review
I just finished the auth refactor on my branch, open a draft pull request so the team can start reviewing

name: pr description: Open or update a draft PR for the current branch. Use when: create PR, open PR, draft PR, pull request, prepare for review.

Draft PR Creator

Creates or updates a draft pull request for the current branch.

Usage

  • /pr - Create draft PR for current branch (or update if one exists)
  • /pr <url> - Update existing PR description

Workflow

1. Ensure feature branch and commit

NEVER commit to main unless the user explicitly requests it.

git branch --show-current
git status

If on main, create and switch to a feature branch before doing anything else.

Branch naming follows the PR type prefix:

  • feat/ — new features
  • fix/ — bug fixes
  • refactor/ — refactoring
  • chore/ — maintenance

2. Gather context

git log main..HEAD --oneline
git diff main...HEAD --stat

3. Check if PR already exists

gh pr view --json number,title,body 2>/dev/null

4. Write PR description

Use the template below. Keep it concise and natural.

5a. If NO existing PR - Create draft PR

gh pr create --draft --title "<title>" --body "$(cat <<'EOF'
<body>
EOF
)"

5b. If PR already exists - Update description

gh pr edit --title "<title>" --body "$(cat <<'EOF'
<updated body>
EOF
)"

Report the PR URL to the user when done.

PR Title Format

<type>: <short description>

Types: feat:, fix:, refactor:, test:, chore:, docs:

Rules:

  • Lowercase after prefix
  • Present tense imperative ("add" not "added")
  • Under 70 characters

PR Body Template

Closes #<issue_number>

## Summary

1-2 paragraphs explaining what this does and why.

## Changes

- Highlight 1
- Highlight 2
- Highlight 3

## Testing

- [ ] `mix test` passes
- [ ] `mix format --check-formatted` passes
- [ ] `mix compile --warnings-as-errors` passes

Omit the Closes #... line if there is no source issue.

Style

  • Fluid prose in Summary — natural writing, not robotic
  • 2-3 bullet points in Changes — highlights only, not a file list
  • No file lists — GitHub shows that in "Files changed"

Pipeline

/dev <issue> -> /review -> /commit -> /pr -> merge

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

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/draft-pr-creator-msba3m4r/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