Automated summary
Updates an existing pull request by pushing new commits and regenerating its description.
Strengths
- Recomputes the description from scratch based on all branch commits
- Respects git workflow by asking for confirmation before pushing
- Only updates the title when it no longer reflects changes
- Uses the previous description as a guide for consistent formatting
Limitations
- Requires the gh CLI tool to be installed and configured
- Only works for GitHub PRs (not GitLab, Bitbucket, etc.)
- May not handle changes in base branch automatically
When you've added commits to a branch with an open PR and want the description automatically refreshed.
If you just want to push without updating the description, or if the PR is on a non-GitHub platform.
Security analysis
CautionThe skill runs bash commands that push to remote and update PR descriptions. It includes a confirmation step, reducing risk. Legitimate use case but requires network access and repository write permissions.
- •Uses powerful git and gh commands that modify the remote repository, including git push and gh pr edit. However, user confirmation is required before push.
Examples
I just pushed a fix for the login validation to my branch. Update the PR description to reflect all changes.I have two new commits on this branch that haven't been pushed yet. Please push them and regenerate the PR description based on all commits.Update the PR number 42 with all my recent changes. Rewrite the description but keep the format similar to the current one.name: update-pr description: Update existing pull request with new commits
Update Pull Request
Push new commits to an existing pull request and optionally update its description.
Workflow
- Verify branch and PR: Ensure you're on a branch with an existing PR
- Review all commits: Show all commits that will be in the PR
- Ask user for confirmation: Before pushing, show what will be pushed and ask for confirmation
- Push any unpushed changes: Push any new commits to origin if user confirms
- Recompute PR description: Generate a fresh PR description based on all commits, using the previous description as a guide
- Update PR: Update both title (if needed) and description
- Return PR URL: Show the updated PR URL
Instructions
-
Check current branch and PR status:
git branch --show-current gh pr view --json number,title,url,baseRefName,body- If no PR exists, inform user and suggest using
/create-prinstead - If on main/master, stop and ask user to switch branches
- Store the current title and body for reference
- If no PR exists, inform user and suggest using
-
Review ALL commits in the branch (not just unpushed ones):
# Get all commits in this branch compared to the base branch git log <base-branch>..HEAD --oneline # Also check if there are unpushed commits git log origin/<current-branch>..HEAD --oneline- Show all the commits that are part of this PR
- Note if there are unpushed commits that need to be pushed
-
ASK USER before pushing any unpushed commits:
- Show user what commits will be pushed (from step 2)
- Ask: "Ready to push these commits to update the PR?"
- Wait for user confirmation
- This respects the user's git workflow rules
-
Push any unpushed commits (if user confirmed):
git push- Only run this if there were unpushed commits AND user confirmed
- If already up to date, skip this step
-
Analyze all changes and recompute PR description:
- Review ALL commits in the branch (from step 2)
- Look at the previous PR description and title as a guide
- Generate a fresh, comprehensive PR description that:
- Accurately reflects ALL changes in the branch
- Follows the same format/style as the previous description
- Uses concise bullet points
- Groups related changes together
- Is complete but not verbose
- Consider if the title needs updating to better reflect the scope
-
Update the PR:
# Update title if needed gh pr edit <pr-number> --title "New Title" # Update description gh pr edit <pr-number> --body "$(cat <<'EOF' ## Summary - First main change - Second main change - Additional improvements EOF )"- Always update the description
- Only update the title if the current one doesn't accurately reflect the changes
-
Return the PR URL and summary of what was done
Key Principles
- Complete recomputation: Generate the description from scratch based on ALL commits
- Use previous as guide: Keep similar format and style from the previous description
- Smart title updates: Only change title if it's no longer accurate
- Account for pushed commits: Handle cases where commits were already pushed
- Clear and comprehensive: Description should cover everything in the branch
- Concise format: Keep it readable with bullet points, no unnecessary detail
- Respect git workflow: Always ask user before pushing (per user's git workflow rules)
Example Output
✅ Found PR #123: "Add user authentication"
📝 All commits in this branch:
- abc1234 Initial authentication setup
- def5678 Add JWT token support
- 789abcd Fix login validation
- 012cdef Add password reset
📤 Unpushed commits: 2
- 789abcd Fix login validation
- 012cdef Add password reset
🚀 Pushing commits...
✅ Pushed to origin
🔄 Recomputing PR description based on all commits...
✅ Updated PR #123:
- Title: "Add user authentication" (unchanged)
- Description: Updated to reflect all changes
PR URL: https://github.com/org/repo/pull/123
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 filesThis 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.mdFrom the root of a test project, save the file as .skill-downloads/update-pull-request-mma3js7b/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-pull-request-mma3js7b' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/update-pull-request-mma3js7b/download' --output '.skill-downloads/update-pull-request-mma3js7b/SKILL.md.part' && mv '.skill-downloads/update-pull-request-mma3js7b/SKILL.md.part' '.skill-downloads/update-pull-request-mma3js7b/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
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-pull-request-mma3js7b/SKILL.md' && test -s '.skill-downloads/update-pull-request-mma3js7b/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/update-pr' && cp -R '.skill-downloads/update-pull-request-mma3js7b' '.claude/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 installationopenskills install './.skill-downloads/update-pull-request-mma3js7b'openskills read 'update-pull-request-mma3js7b'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 syncManual 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-pull-request-mma3js7b/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.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.