Pull Request Workflow

VerifiedCaution

Create or update a pull request for the current branch. Triggered when the user asks to open, edit, or update a PR.

Sby Skills Guide Bot
DevelopmentIntermediate
7/22/2026
Claude CodeCodexCursor
#pull-requests#git#github-cli#workflow#technical-writing

Recommended for

Automated summary

Creates or updates the pull request for the current branch via `gh`, writing a concise body that matches the repository's existing style.

Strengths

  • Works out on its own whether to open a new PR (`gh pr create`) or rewrite the existing one (`gh pr edit --body-file`).
  • Enforces brevity rules: title under ~70 characters, roughly six bullets max, and a description of the end state rather than the journey.
  • Samples the last few merged PRs to match the repo's tone and length before drafting.
  • Skips unrequested extras — no "Test plan" section and no Claude Code attribution footer.

Limitations

  • Assumes a GitHub remote with an authenticated `gh` CLI and a base branch literally named `main`.
  • Reads no code and runs no checks; the summary is derived purely from the diff and commit log.
  • Always opens new PRs as drafts, which may not be what you expect if you wanted it ready for review.
When to use it

Use it when you need to open a PR or rewrite the current branch's PR description without hand-writing the text.

When not to use it

Skip it if the project isn't on GitHub or if what you actually want is an in-depth code review rather than PR copy.

Security analysis

Caution
Quality score86/100

The skill only uses Bash/Read/Glob/Grep for legitimate git and `gh` workflows: inspecting branch state, writing a temp body file, pushing, and creating or editing a PR. There is no obfuscation, no destructive command (no rm -rf, no curl|sh), no secret/token exfiltration, and no attempt to disable safety controls. The only reason it is not rated fully 'safe' is that it takes real remote actions (pushing a branch, creating/editing PRs) as part of its normal flow without an explicit confirmation gate, which is powerful but clearly intended and scoped.

Findings
  • •Performs remote side effects automatically: `git push -u origin HEAD` and `gh pr create`/`gh pr edit` without an explicit confirmation step between planning and executing
  • •Rewrites existing PR bodies (`gh pr edit --body-file`) which could overwrite human-authored text if run on a PR the user did not intend to change
  • •Uses GitHub CLI and network access via Bash, expanding the blast radius beyond local read-only inspection
How this analysis is made

Examples

Open a PR
Open a PR for my current branch against main.
Rewrite an existing body
Rewrite the description of PR #482 so it describes the final diff, max 4 bullets, no changelog.
Fix a bloated description
Update the PR body — it's too long, compress it and drop the test plan section.

name: pr description: >- Create or update a pull request for the current branch. Trigger when the user asks to create/open/make a PR, or to edit/update/rewrite/fix the PR description, body, or summary — for both new PRs (gh pr create) and existing ones (gh pr edit --body-file). Use for any verb that lands on a PR's text content: "open a PR", "make a PR", "update the PR description", "rewrite the PR body", "fix the description". allowed-tools: Bash, Read, Glob, Grep

Pull request workflow

Create or update a pull request for the current branch.

Workflow

1. Gather branch state

Run in parallel:

  • git status (no -uall)
  • git diff main...HEAD --stat
  • git diff main...HEAD --name-only
  • git log main..HEAD --oneline
  • EXISTING_PR=$(gh pr view --json number,url,title 2>/dev/null) — capture for step 2.

If the branch has no commits ahead of main, stop and tell the user.

2. Build the summary body and create/update the PR

Write a summary of the change (2–5 bullets based on the diff and recent commits) to a temp file. Follow the repo's existing PR body style — look at the last few merged PRs (gh pr list --state merged --limit 5 --json body,title) to match tone and length. Keep the title under ~70 chars.

Bias toward brevity. Reviewers skim. A bullet that fits on one line beats one that wraps three times — push detail down to the diff or commit log, not the body. If a per-file bullet starts feeling like an essay, compress to a single sentence naming the kind of change (e.g., "tightened description, trimmed unused allowed-tools, consolidated duplicated snippets") rather than enumerating each edit. Aim for under ~6 bullets total across the whole body, including any nested ones; if you're past that, regroup by category until you fit.

Describe the end state, not the journey. Reviewers want to know what the PR does now — the diff that will land — not the order in which it was built. Avoid framings like "first pass" / "second pass", commit-hash references for stages of work that all merge into the same shipped diff, "originally we tried X then switched to Y", or play-by-play of how the conversation evolved. The git log preserves that. If a discarded approach is genuinely load-bearing context for the reviewer (e.g., explains why the chosen approach is structured oddly), one line is enough; otherwise omit. The same applies when updating an existing PR body: rewrite to describe the current diff, don't append a changelog of edits made since the last revision.

No "Test plan" section unless the user asks. Don't list things CI already covers (e.g. bundle exec rspec). Those belong to CI, not the PR body. Only add a Test plan when there's reviewer-facing manual verification a human needs to do, and only when the user requests it.

No Claude Code attribution footer. Don't append the "🤖 Generated with Claude Code" line (or any variant of it) to the body. The PR body should read like the human author wrote it.

Push the branch: git push -u origin HEAD.

  • If $EXISTING_PR from step 1 was non-empty: gh pr edit <num> --body-file <tmp-body-file> (don't overwrite the title unless the user asks).
  • Otherwise: gh pr create --draft --base main --title "..." --body-file <tmp-body-file>. Create as a draft by default; only omit --draft (or mark ready) if the user explicitly asks for a ready-for-review PR. Capture the PR number from the output.

Always pass the body via --body-file (not inline --body) to preserve formatting.

Return the PR URL.

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/pull-request-workflow-mrwak8yr/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/pull-request-workflow-mrwak8yr' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/pull-request-workflow-mrwak8yr/download' --output '.skill-downloads/pull-request-workflow-mrwak8yr/SKILL.md.part' && mv '.skill-downloads/pull-request-workflow-mrwak8yr/SKILL.md.part' '.skill-downloads/pull-request-workflow-mrwak8yr/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, Read, Glob, Grep

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

Cursor
test -f '.skill-downloads/pull-request-workflow-mrwak8yr/SKILL.md' && test -s '.skill-downloads/pull-request-workflow-mrwak8yr/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/pr' && cp -R '.skill-downloads/pull-request-workflow-mrwak8yr' '.cursor/skills/pr'

Codex
test -f '.skill-downloads/pull-request-workflow-mrwak8yr/SKILL.md' && test -s '.skill-downloads/pull-request-workflow-mrwak8yr/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/pr' && cp -R '.skill-downloads/pull-request-workflow-mrwak8yr' '.agents/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/pull-request-workflow-mrwak8yr'

openskills read 'pull-request-workflow-mrwak8yr'

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/pull-request-workflow-mrwak8yr/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