Create draft pull requests

VerifiedCaution

Creates or updates a draft pull request for the current branch: branch handling, conventional commits, a formatted PR description, and GitHub issue linking.

Sby Skills Guide Bot
DevelopmentIntermediate
11/4/2026
Claude Code
#git#pull-request#github#workflow#conventional-commits

Recommended for

Automated summary

Creates or updates a draft pull request for the current branch with a standardized title and description.

Strengths

  • Explicit guardrail: forbids committing straight to `main` and forces creation of a feature branch first.
  • Clear conventions for branch names (feat/, fix/, refactor/…) and PR titles (imperative present tense, lowercase after prefix, under 70 characters).
  • Idempotent behaviour: detects an existing PR via `gh pr view` and updates it instead of opening a duplicate.
  • Links the originating issue with a GitHub closing keyword and suggests a testing checklist.

Limitations

  • The PR body template hardcodes Elixir commands (`mix test`, `mix dialyzer`, `mix smoke`) tied to a Mix project.
  • No step pushes the branch, yet `gh pr create` requires a remote branch to exist.
  • Assumes a GitHub remote, an authenticated `gh` CLI and a base branch named `main`.
When to use it

Use it when a feature branch is ready to submit and you need to open or refresh a draft PR without writing the description by hand.

When not to use it

Avoid it on non-GitHub remotes (GitLab, Bitbucket), or when the branch has not been pushed and you don't want the tool touching git history.

Security analysis

Caution
Quality score80/100

The skill is a conventional local-dev workflow: it inspects branch/status, commits on a feature branch, and opens or edits a draft PR via the GitHub CLI. All commands are legitimate and readable, there is no obfuscation, no destructive operation (no force-push, reset, rm -rf, or pipe-to-shell), and nothing is sent anywhere except normal `gh` API calls. Risk comes only from the inherent power of git commit plus authenticated GitHub network actions, so it warrants caution rather than a safe rating.

Findings
  • •Executes git and GitHub CLI commands that mutate repository state: creating/switching branches, `git add` + `git commit` of staged and unstaged changes, and `gh pr create`/`gh pr edit` (network calls to GitHub).
  • •Commits user changes automatically without an explicit per-action confirmation step, which can bundle unintended files into a commit.
  • •Requires an authenticated `gh` session; the skill does not itself handle tokens, but it operates with the user's GitHub credentials.
  • •Automatically stages and commits staged or unstaged changes when on a feature branch without explicit user confirmation, which could commit unintended or sensitive files.
  • •Uses `gh pr edit` to overwrite an existing PR's title and body without confirming the update with the user.
  • •No allowed-tools are declared even though the skill requires shell execution of `git` and `gh` commands, leaving permissions under-specified.
How this analysis is made

Examples

Open a draft PR
/pr
Rewrite an existing PR
/pr https://github.com/acme/app/pull/42 — rewrite the description so it reflects the new caching layer and drop the stale testing checklist.
Work stranded on main
I just finished the Redis cache work but everything is still uncommitted on main. Put it on a proper branch and open a draft PR for me.

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:

git checkout -b <type>/<short-name>

Branch naming follows the PR type prefix:

  • feat/ — new features
  • fix/ — bug fixes
  • refactor/ — refactoring
  • test/ — test additions
  • chore/ — maintenance
  • docs/ — documentation

Derive the branch name from the commit history or changes (e.g., feat/spawn-and-observe).

After ensuring you're on a feature branch, check for uncommitted changes. If there are staged or unstaged changes, commit them using conventional commit format:

git add <relevant files>
git commit -m "<type>: <description>"

Only proceed to the next step once all changes are committed on a feature branch.

2. Gather context

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

2.5. Identify source issue

If the PR was created from a /tdd <issue> workflow, you already have the issue number in context. Otherwise, check the branch name or commit messages for issue references.

If an issue is identified, it will be linked in the PR body using a GitHub closing keyword (see template below). When the PR is merged, GitHub automatically closes the linked issue and marks it as "completed".

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 dialyzer` passes
- [ ] `mix smoke` 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

/tdd <issue_url> -> /review-pr -> /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/create-draft-pull-requests-mvhm5lcz/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-draft-pull-requests-mvhm5lcz' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/create-draft-pull-requests-mvhm5lcz/download' --output '.skill-downloads/create-draft-pull-requests-mvhm5lcz/SKILL.md.part' && mv '.skill-downloads/create-draft-pull-requests-mvhm5lcz/SKILL.md.part' '.skill-downloads/create-draft-pull-requests-mvhm5lcz/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/create-draft-pull-requests-mvhm5lcz/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