pr-update

Creates or refreshes pull request titles and descriptions to match the current branch diff.

2|2|Updated Dec 23, 2017
One-click install
npx skills add https://github.com/xriu/dotfiles --skill pr-update-xriu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pr-update
Source: https://github.com/xriu/dotfiles/tree/main/home/.skills/pr-update
Command: npx skills add https://github.com/xriu/dotfiles --skill pr-update-xriu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping a pull request's title and description in sync with the actual branch changes is tedious, and updating an existing PR risks accidentally deleting embedded screenshots or videos from the body. This Skill opens a PR/MR when none exists or refreshes an existing one so the title and body always reflect the full diff. ## Core Features & Use Cases - Create or update in one flow: Detects an existing PR/MR via gh or glab and either creates a new one or edits the title and body in place, never opening duplicates. - Media preservation: Extracts and re-attaches every image, video, and upload URL from the existing body before rewriting the text sections. - Commit shaping: Splits the branch into topical commits matching the repo's style using soft reset and path-staged commits, with safeguards against staging other people's work. - Use Case: After pushing several commits to a feature branch, ask to refresh the PR — the Skill rewrites the Summary and Test plan from the full diff while keeping the demo GIF you attached earlier intact. ## Quick Start Ask the assistant to open or update the PR for the current branch so its title and description match the latest changes.

Frequently Asked Questions about pr-update

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update a pull request description without losing images?▼

Fetch the existing body first with gh pr view, extract every image, video, and upload URL, rewrite only the text sections, then re-attach the media blocks before submitting with gh pr edit --body-file. Verify all original media URLs still appear in the new body.

How to create a pull request from the command line with gh?▼

Push the branch upstream with git push -u, then run gh pr create with a title and body derived from the full diff against the default branch. On GitLab, the equivalent is glab mr create.

Does this work with GitLab merge requests?▼

Yes, the same create-or-refresh flow applies to GitLab using glab mr view, glab mr create, and glab mr update with a description file. Media preservation rules apply equally to GitLab upload URLs.

Why does git reset to origin/main stage other people's commits?▼

The remote default branch moves as others merge, so resetting to origin/<default> instead of the branch's real merge-base pulls in commits that are not yours. Always compute the base with git merge-base HEAD origin/<default> before the soft reset.

What tasks are outside the scope of PR updating?▼

Rebasing, CI monitoring, review thread handling, triage and salvage of other branches, and merging are explicitly out of scope. The Skill only covers opening the PR, shaping commits, retitling, rewriting the description, and printing the URL.