Agent skill

Update PR

by ReflexioAI in ReflexioAI/claude-smart

Update an existing pull request with new changes. An agent skill from ReflexioAI/claude-smart.

Apache-2.0Auto-check passedDevelopment

Install Update PR

skills CLI
$ npx skills add ReflexioAI/claude-smart --skill update-pr -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ReflexioAI/claude-smart update-pr --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ReflexioAI/claude-smart.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/update-pr .claude/skills/update-pr && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
update-pr
GitHub stars
782
Token cost
~1.7k tokens
SKILL.md length
907 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

Update an existing pull request with new changes. An agent skill from ReflexioAI/claude-smart.

  • Works in 6 steps: Pre-flight Checks → Sync with Base Branch → Analyze New Changes → …
  • The user wants to update a PR
  • SKILL.md covers Workflow and Best Practices Encoded
  • Calls git and gh

What it does

Update PR is an agent skill from ReflexioAI/claude-smart. 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.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Pull requests. It works with Git. The repository describes itself as: Turns corrections into Preferences, Project-specific skills, and Shared skills for Claude Code, Codex, and OpenCode. The licence is Apache-2.0.

When your agent uses it

  • The user wants to update a PR
  • Push follow-up changes to a PR
  • Refresh a PR description
  • Sync a PR with latest commits

Example prompts

  • “/update-pr”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Pre-flight Checks
  2. Sync with Base Branch
  3. Analyze New Changes
  4. Update the PR Description
  5. Apply Updates
  6. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 687360e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Update PR loads about 1.7k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 907 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~74
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ReflexioAI/claude-smart at commit 687360e, republished under its Apache-2.0 licence (© ReflexioAI). 907 words, ~1,696 tokens.

Download SKILL.mdSave it as .claude/skills/update-pr/SKILL.md (or your agent's skills folder).
name
update-pr
description
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:

  1. Fetch latest remote — run git fetch origin <base-branch> (use the base branch from the PR metadata)
  2. Check for divergence — run git log HEAD..origin/<base-branch> --oneline to see if the base branch has new commits
  3. Rebase if needed — if there are new commits on the base branch: a. Run git rebase origin/<base-branch> b. Resolve conflicts — if the rebase hits conflicts:
    • Read the conflicting files to understand both sides
    • Surface the conflict to the user — show both sides and ask which version to keep. Do not silently resolve conflicts.
    • Stage resolved files: git add <file>
    • Continue: git rebase --continue
    • Repeat until rebase completes
  4. Verify clean state — run git status to confirm no unresolved conflicts remain
  5. Push the branch — run git push. If the rebase changed history, use git push --force-with-lease instead. If --force-with-lease fails, it means someone else has pushed to this branch. Fetch the remote branch (git fetch origin <branch>), inspect the divergence (git log HEAD..origin/<branch> --oneline), and ask the user how to proceed — they may need to integrate the other contributor's changes first.
Step 3: Analyze New Changes

Understand the full scope of changes now in the PR:

  1. Run git log origin/<base-branch>..HEAD --oneline to see all commits on this branch
  2. Run git diff origin/<base-branch>...HEAD --stat for a high-level summary of changed files
  3. Run git diff origin/<base-branch>...HEAD to read the full diff. Note: Three-dot (...) syntax is intentional — it shows only the changes introduced on this branch since it diverged from the base, excluding commits on the base branch that aren't part of this PR.
  4. Identify the type of change: feat, fix, refactor, docs, chore, etc.
  5. Review existing PR title and body — compare the current PR title and body (from Step 1) against the full diff. Note what's already accurately described vs. what's missing, outdated, or no longer relevant.

Important: Look at ALL commits, not just the latest one. The updated PR description should reflect the entire branch, not just the new additions.

Step 4: Update the PR Description
Title
  • Under 70 characters
  • Use conventional prefix: feat:, fix:, refactor:, docs:, chore:
  • Review the existing PR title (from Step 1). If it still accurately reflects the full scope of changes, keep it. If the scope has changed or the title is misleading, update it.
Show full SKILL.md (348 more words)Show less
Body

Review the existing PR body (from Step 1) and update it to reflect the current state of the branch. Preserve any still-accurate content (e.g., context, links, decisions) rather than rewriting from scratch. Use this template — scale detail with PR complexity:

## Summary
<1-5 bullet points explaining what changed and WHY — covering ALL changes in the branch>

## Changes
<Categorized list of what was modified — group by area/concern>

## Diagrams
<OPTIONAL — include Mermaid diagrams when visual aids clarify workflow or architecture changes>

## Test Plan
<How the changes were verified — manual testing steps, automated tests run, curl commands, etc.>

Guidelines for the body:

  • State the purpose clearly — explain why, not just what
  • Cover ALL changes in the branch, not just the latest commits
  • Provide context and background with links to relevant issues/docs
  • Include Mermaid diagrams when they simplify explanation of workflows or architecture
  • Keep PRs focused on a single concern — suggest splitting if the PR is too large
  • Before overwriting the PR body, compare the existing body against the standard template sections (Summary, Changes, Diagrams, Test Plan). Flag any sections or content that appear to have been manually added after PR creation (e.g., reviewer notes, deployment checklists, linked discussions) and ask the user whether to preserve them.
  • Do NOT include any "Generated with Claude Code" footer or bot attribution lines
  • Do NOT include Co-Authored-By lines
Step 5: Apply Updates

Write the body to a temp file and use --body-file to avoid shell argument length limits:

bash
cat > /tmp/pr_body.md <<'EOF'
## Summary
...

## Changes
...

## Test Plan
...
EOF
gh pr edit --title "the pr title" --body-file /tmp/pr_body.md

Do NOT add:

  • --author flag
  • Any Co-Authored-By trailer
  • Any "Generated with Claude Code" footer

Draft/Ready handling: If the user wants to mark a draft PR as ready for review, run gh pr ready. If the user wants to convert to draft, run gh pr ready --undo.

Step 6: Report
  • Return the PR URL so the user can review it
  • Summarize what changed in the PR description compared to before
  • If gh pr edit fails, diagnose the error and suggest fixes

Best Practices Encoded

PR Size: Keep PRs small and focused. If the diff is very large (>500 lines changed), suggest splitting into smaller PRs.

Commit History: If the commit history is messy, suggest rebasing to clean it up. Clean commits that explain why make review much easier.

Feedback Requests: If the user mentions wanting specific feedback, add a "Feedback Requested" section to the body.

Screenshots: For frontend changes, remind the user to add screenshots or recordings to the PR after updating.

© ReflexioAI, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/update-pr of ReflexioAI/claude-smart.

Open the folder on GitHubat commit 687360e

Compare with similar skills

Update PR next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Update PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Update PR this skillReflexioAI/claude-smart782—~1.7kAutomated safety check: PassApache-2.0
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Understand Diff AnalysisEgonex-AI/Understand-Anything85k1 repos~1.4kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Open Code Review CLIalibaba/open-code-review44k—~3.1kAutomated safety check: PassApache-2.0
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    85k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    44k GitHub stars~3.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Pull Request Title and Body Writer

    openinterpreter/openinterpreter

    Rewrites the title and body of one or more pull requests with gh, leading with why the change was made, then what changed, and describing only the net result.

    69k GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check passed

More from ReflexioAI/claude-smart

  • Create PR

    ReflexioAI/claude-smart

    Create high-quality pull requests via gh pr create. An agent skill from ReflexioAI/claude-smart.

    782 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check: notes
  • Claude Smart

    ReflexioAI/claude-smart

    Codex-only — use when the user asks to run claude-smart commands in Codex, including claude-smart show, learn, restart, dashboard, clear-all, or slash-like requests such as /claude-smart:learn.

    782 GitHub stars~439 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Update PR

What does Update PR do?

Update an existing pull request with new changes. An agent skill from ReflexioAI/claude-smart. Update PR is an agent skill from ReflexioAI/claude-smart. Update an existing pull request with new changes.

When should I use Update PR?

Update PR fits situations like: the user wants to update a PR; push follow-up changes to a PR; refresh a PR description; sync a PR with latest commits.

How do I install Update PR in Claude Code?

Run `npx skills add ReflexioAI/claude-smart --skill update-pr -a claude-code`. Or copy the skill folder (.agents/skills/update-pr in ReflexioAI/claude-smart) into .claude/skills/update-pr in your project. Claude Code loads it when a task matches its description.

How do I install Update PR in Codex?

Run `npx skills add ReflexioAI/claude-smart --skill update-pr -a codex`. Or copy the skill folder (.agents/skills/update-pr in ReflexioAI/claude-smart) into .agents/skills/update-pr in your project. Codex loads it when a task matches its description.

Can I use Update PR in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ReflexioAI/claude-smart --skill update-pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/update-pr, .gemini/skills/update-pr, .github/skills/update-pr and .opencode/skills/update-pr in your project.

What does Update PR need to run?

Going by SKILL.md and its folder, Update PR needs the command-line tools its instructions call (git and gh).

Does Update PR access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Update PR safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Update PR use?

Update PR is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Update PR use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Update PR?

Skills that share tags, products or a category with Update PR: Finishing a Development Branch (obra/superpowers, 296k stars), Understand Diff Analysis (Egonex-AI/Understand-Anything, 85k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Open Code Review CLI (alibaba/open-code-review, 44k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Update PR?

ReflexioAI (a GitHub organization) maintains it in ReflexioAI/claude-smart, which has 782 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 6, 2026.

Source: ReflexioAI/claude-smart on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.