Update GitHub Pull Request

VerifiedSafe

Updates an existing GitHub pull request after adding commits, revising the title and body according to a template if available. Helpful after pushing new changes to a branch that already has an open PR.

Sby Skills Guide Bot
DevelopmentIntermediate
6/2/2026
Claude CodeCursorWindsurf
#github-pull-requests#git-workflow#pr-update#collaboration

Recommended for

Automated summary

Updates an existing GitHub pull request after adding commits by revising title/body, preserving template format, and pushing pending branch changes.

Strengths

  • Automates PR title and body updates with language detection and template adherence.
  • Handles unpushed commits and uncommitted changes interactively.
  • Incorporates references to issues, docs, or related PRs from conversation history.

Limitations

  • Requires gh and git to be installed and configured locally.
  • Works only for local branches with an open PR on GitHub.
  • Language detection may be ambiguous if the template or user messages are mixed.
When to use it

Use this skill after adding commits to a branch to update the corresponding pull request in a clean, guided manner.

When not to use it

Do not use it for creating a new PR, for closed PRs, or if you just need a quick title change without the full workflow.

Security analysis

Safe
Quality score95/100

The skill uses git and gh commands only for PR management, no destructive or exfiltrating actions, all within safe boundaries.

No concerns found

How this analysis is made

Examples

Update current PR after new commits
Update the pull request for this branch with the latest changes.
Update PR with template and language override
I've pushed more fixes. Please update this PR and use French for the title.
Update PR and add reference links
Update the PR body to include the issue #123 and the related PR #456 in the References section.

name: update-pr description: Update an existing GitHub pull request after adding commits by revising title/body, preserving template format, and pushing pending branch changes. allowed-tools: Bash(git status *), Bash(git diff *), Bash(git log *), Bash(git rev-parse *), Bash(git push *), Bash(git ls-files *), Bash(gh repo view *), Bash(gh pr view *), Bash(gh pr edit *), Read, Glob, Grep, AskUserQuestion

Pre-fetched context

!git rev-parse --abbrev-ref HEAD !git status --short !git ls-files ':(top,icase).github/pull_request_template.md' ':(top,icase).github/pull_request_template/*.md' ':(top,icase)pull_request_template.md'

Instructions

Update the existing pull request for the current branch. Follow this flow:

  1. Gather context: Get default branch via gh repo view --json defaultBranchRef -q .defaultBranchRef.name, then run git log --oneline, git diff --stat, and git diff against it.

  2. Missing PR check: Run gh pr view --json number,url,title,body,baseRefName,headRefName,isDraft. If it fails, tell the user there is no open PR for this branch. Ask whether to switch to /create-pr or abort.

  3. Uncommitted changes: If git status above shows output, ask whether to commit them, ignore them, or abort. Do not proceed until answered.

  4. PR template:

    • If a template path is listed, Read it before writing title/body.
    • Detect template_language from headings/instructions/checklists (ignore code, URLs, HTML comments).
    • Keep template headings/order and keep HTML comments (<!-- -->).
    • If no template exists, skip.
  5. Compose updated PR content:

    • Infer what changed since the previous PR revision from the commit log and diff.
    • Title: Conventional Commits, under 72 chars.
    • Decide title language before drafting and keep it fixed unless the user requests a change.
    • Title language policy: use template_language first whenever it can be detected.
    • If the user explicitly asks to override language for the current PR, follow that override.
    • If no template_language is detected, use: explicit user request > latest substantive user message > English.
    • Ignore slash commands (for example /update-pr), code blocks, file paths, and URLs when inferring language.
    • If language signals conflict or are ambiguous, ask the user which language to use before drafting.
    • Keep type(scope) tokens standard (feat, fix, etc.); localize only the description text.
    • Body: if template exists, fill its sections. If not, use Summary / Changes / Concerns / References.
    • Proactively include any reference links (issues, docs, related PRs) found in conversation history.
  6. Confirm: Show the full updated PR title/body. Ask if the user wants to change the title, add links, or make any edits — apply and re-confirm. Do not push or edit until approved.

  7. Push and update:

    • Push (git push -u origin HEAD) only if there are unpushed commits (git log @{upstream}..HEAD).
    • Update with gh pr edit --title "<title>" --body-file <file>.
    • 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/update-github-pull-request-mmh8qron/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/update-github-pull-request-mmh8qron' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/update-github-pull-request-mmh8qron/download' --output '.skill-downloads/update-github-pull-request-mmh8qron/SKILL.md.part' && mv '.skill-downloads/update-github-pull-request-mmh8qron/SKILL.md.part' '.skill-downloads/update-github-pull-request-mmh8qron/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 status *), Bash(git diff *), Bash(git log *), Bash(git rev-parse *), Bash(git push *), Bash(git ls-files *), Bash(gh repo view *), Bash(gh pr view *), Bash(gh pr edit *), Read, Glob, Grep, 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/update-github-pull-request-mmh8qron/SKILL.md' && test -s '.skill-downloads/update-github-pull-request-mmh8qron/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/update-pr' && cp -R '.skill-downloads/update-github-pull-request-mmh8qron' '.claude/skills/update-pr'

Cursor
test -f '.skill-downloads/update-github-pull-request-mmh8qron/SKILL.md' && test -s '.skill-downloads/update-github-pull-request-mmh8qron/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/update-pr' && cp -R '.skill-downloads/update-github-pull-request-mmh8qron' '.cursor/skills/update-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/update-github-pull-request-mmh8qron'

openskills read 'update-github-pull-request-mmh8qron'

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/update-github-pull-request-mmh8qron/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