Automated summary
This skill automates refreshing an existing pull request: it commits relevant changes, merges the remote default branch when needed, pushes the branch, and brings the PR title and body back in sync with the work.
Strengths
- Explicitly scopes permission to commit and push, so the agent doesn't stall asking for approval
- Resolves the base branch through gh instead of hardcoding main, and halts if the current branch is the base branch
- Forbids amending and force pushing, protecting shared branch history
- Reconciles the PR body against project templates and actual commits, with a defined fallback when no template exists
Limitations
- Requires git, an authenticated GitHub CLI and network access, so it can't run offline or against non-GitHub hosts
- Covers only updating an existing PR; creating, reviewing or merging are out of scope
- Deciding which files are "relevant" to stage is left to the agent, so it can miss changes or include unintended ones
Use it when a PR branch already holds commits or local edits and you need to sync with the base branch, push, and refresh the PR description.
Don't use it to open a first pull request, to review code, or in a repository not hosted on GitHub.
Security analysis
CautionThe skill is a legitimate PR maintenance workflow with sensible guardrails against force-push and amending. Its risk comes from performing networked git writes and authenticated GitHub CLI operations, not from destructive or exfiltrating behavior.
- •Commits local changes and pushes to a remote PR branch, which is a legitimate but impactful write operation.
- •Requires an authenticated GitHub CLI session and network access to fetch, merge, push, and edit PR metadata.
- •Edits PR title/body via `gh pr edit`, which changes remote repository state.
- •The workflow does not force-push or amend commits, which reduces risk, but users should still review staged files before committing.
Examples
/update-prCommit my changes and push them to the current pull request branch.Sync this branch with the default branch and update the PR title and body to match what we actually changed.name: update-pr description: >- Commits relevant changes, merges the remote default when needed, pushes the current pull-request branch, and refreshes stale PR metadata. Use when the user runs /update-pr or asks to update a pull request. license: Unlicense OR MIT compatibility: >- Requires git and the GitHub CLI (gh) authenticated to the target repository, plus network access.
Update PR
Instructions
This workflow is explicit permission to commit relevant changes and push to the current PR branch.
Rules
- Never amend commits. Always create new commits.
- Never force push. Use
git pushwithout--forceor--force-with-lease.
Steps
-
Inspect repository state and resolve the base branch (never hardcode
main):git status --short --branchgit diffgit diff --stagedgit log --oneline -5BASE_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')
-
If the current branch is the base branch, stop and ask for the intended PR branch.
-
Confirm an open PR exists:
gh pr view. If none, ask whether to run/create-prinstead. -
If the branch is behind
origin/$BASE_BRANCH, merge baseline:git fetch origin "$BASE_BRANCH" git merge "origin/$BASE_BRANCH" --no-editResolve conflicts and commit the merge if needed before continuing.
-
If there is nothing new to commit (aside from an already-finished merge), skip to step 8.
-
Stage only relevant files. Exclude secrets and unrelated local changes.
-
Commit with a concise Conventional Commit message via HEREDOC:
- Subject format:
type(scope): summary. - Use one of:
feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert. - Pick the narrowest accurate scope; omit the scope only when no meaningful scope exists.
- Use imperative mood, lowercase the summary after the type/scope, and do not end the subject with a period.
- Subject format:
-
Push (set upstream if needed):
git push -u origin HEAD -
Reconcile PR title and body with the latest implementation:
- Search
.github/pull_request_template.mdand.github/PULL_REQUEST_TEMPLATE/; read every matching PR template relevant to the current PR. - Absence protocol: after the template search finds no PR template, state that no project PR template was found and reconcile against the existing PR body structure.
gh pr view --json body,url,title- Align title, Summary, Testing, linked issues, and scope with commits and verification.
- Update title:
gh pr edit --title "$PR_TITLE"when stale. - Update body:
gh pr edit --body-file <file>when stale. Keep template structure and reviewer context.
- Search
-
Report: commit hash, branch, PR URL, whether title/body changed, and verification performed.
Do not skip git hooks or verification unless the user explicitly requests it.
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-mryiqhbf/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-mryiqhbf' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/update-pull-request-mryiqhbf/download' --output '.skill-downloads/update-pull-request-mryiqhbf/SKILL.md.part' && mv '.skill-downloads/update-pull-request-mryiqhbf/SKILL.md.part' '.skill-downloads/update-pull-request-mryiqhbf/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.
Environment declared by the author: Requires git and the GitHub CLI (gh) authenticated to the target repository, plus network access.
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-mryiqhbf/SKILL.md' && test -s '.skill-downloads/update-pull-request-mryiqhbf/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/update-pr' && cp -R '.skill-downloads/update-pull-request-mryiqhbf' '.claude/skills/update-pr'Codex
test -f '.skill-downloads/update-pull-request-mryiqhbf/SKILL.md' && test -s '.skill-downloads/update-pull-request-mryiqhbf/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/update-pr' && cp -R '.skill-downloads/update-pull-request-mryiqhbf' '.agents/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-mryiqhbf'openskills read 'update-pull-request-mryiqhbf'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-mryiqhbf/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.