Skills

Update PR

Update an existing pull request with new changes.

Install

npx skills add ReflexioAI/claude-smart --skill update-pr -g -a claude-code -y
Category
Git and review
Updated
5d ago
License
Apache-2.0
Context cost
Mediumabout 1,614 tokens
Runs scripts
No, instructions only

What it does

Update an existing pull request with new changes. Use when the user wants to update a PR, push follow-up changes to a PR, refresh a PR description, or sync a PR with latest commits. Triggers on: update pr, update-pr, update the pr, push to pr, refresh pr, sync pr, update pull request.

PR Updater

Push follow-up changes to an existing PR and update its description to reflect the new work.


Workflow

Step 1: Pre-flight Checks

  1. Verify GitHub CLI authentication, run gh api user --jq '.login' to confirm the CLI is authenticated. If this fails, the user needs to run gh auth login first.
  2. Find the existing PR, run gh pr view --json number,title,body,url,baseRefName,state to find the PR for the current branch. If no PR exists, abort and suggest using /create-pr instead. Check the state field, if it is not OPEN, abort and inform the user that the PR is already merged or closed.
  3. Verify clean git state, run git status to ensure no uncommitted changes. If there are uncommitted changes, commit them directly, do NOT delegate to another skill or tell the user to commit first.
  4. Sync submodules, check if .gitmodules exists first. If it does, run git submodule update --init --recursive. If not, skip this step.

Step 2: Sync with Base Branch

Ensure the feature branch is up-to-date with the base branch to avoid merge conflicts:

Read the whole SKILL.md on GitHub

More in Git and review