Programming · Automation
refresh
/refresh
Use when the user says "refresh" or asks to rebase or update a pull request.
For whom
- Author
- adelrodriguez ↗
- Repository
- skills ↗
- Licence
- MIT
- Last repository change
- 11.11.2026
Assessment and security
96/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability21 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
Deprecation
No signals detected. Repository changed on 11.11.2026, without references to retired models or APIs.
Licence
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when the user says "refresh" or asks to rebase or update a pull request.
Triggers from the description
refresh
Original author description
Use when the user says "refresh" or asks to rebase or update a pull request.
How it works
- Find the PR
- Check out the PR
- List what merged since
- Check for overlap
- Rebase the branch
- Verify the refreshed PR
- Push and update the PR
- Watch the PR
- Check the refresh
- Return the result
Original SKILL.md headings · 159 lines, 1,019 words
SKILL.md preview
--- name: refresh description: Use when the user says "refresh" or asks to rebase or update a pull request. --- # Refresh a pull request Bring a pull request up to date with its base branch, adapt it to what has merged since, and watch it until it is ready again. A refresh request authorizes you to rebase the PR's own branch, resolve its conflicts, and force-push it. It does not authorize merging, closing the PR, or pushing any other branch. Run each command in this skill on its own, and fill each `<placeholder>` with the value you recorded. Each command runs in a new shell, so shell variables do not carry over between commands. ## Find the PR Use the PR the user names. When they name none, use the PR for the current branch with `gh pr view`. When the PR's base is not the default branch, check for a stack with `gh stack view`. For a stack, follow "Work on a stacked PR" in the `monitor` skill for every rebase and push in this skill. Read the PR's details: ```bash gh pr view <pr> --json number,url,baseRefName,headRefName,headRefOid ``` Record `baseRefName` as `<base>`, `headRefName` as `<head-branch>`, and `headRefOid` as `<old-head>`. In a T3 worktree, the local branch often has a `t3/*` name that differs from `<head-branch>`. Always push to `<head-branch>`. Fetch, then find the old merge base: ```bash git fetch origin ``` ```bash git merge-base origin/<base> <old-head> ``` Record the result as `<old-base>`. The step is done when you have recorded `<base>`, `<head-branch>`, `<old-head>`, and `<old-base>`. ## Check out the PR Every later step rewrites and pushes the current `HEAD`, so it must be the PR's head. Compare them: ```bash git rev-parse HEAD ``` When the result equals `<old-head>`, this step is done. Otherwise, look for a worktree that already has the PR checked out: ```bash git worktree list ``` When a worktree's commit equals `<old-head>`, run every later command in that worktree. Otherwise, check that the current worktree has no local changes: ```bash git status --porcelain ``` When it prints anything, stop and ask the user. Never stash, commit, or discard their changes. When it prints nothing, check out the PR: ```bash gh pr checkout <pr> ``` When the checkout fails, or `git rev-parse HEAD` still differs from `<old-head>`, the local branch has commits the PR lacks. Stop and ask the user. The step is done when `git rev-parse HEAD` returns `<old-head>`. ## List what merged since List the commits that reached the base branch after `old_base`, and the merged PRs they came from: ```bash git log --oneline <old-base>..origin/<base> ``` ```bash git show -s --format=%cs <old-base> ``` Record the date as `<since>`, then list the merged PRs: ```bash gh pr list --state merged --base <base> --search "merged:>=<since>" ``` Keep the commits and PRs that touch a file this PR changes, or a function, type, or config this PR uses. The step is done when every commit in the range is either kept or ruled out. ## Check for overlap Read each kept PR next to this PR's diff. Decide which case applies: - **Same fix.** The other PR already fixes the problem this PR fixes, or delivers the same feature. Stop, and report it to the user. Ask before closing this PR, as the `monitor` skill says. - **Partial overlap.** The other PR already does part of this PR. Plan to drop that part from this PR. - **Changed dependency.** The other PR renamed, moved, or changed the behavior of code this PR relies on. Plan to adapt this PR to the new code. - **No overlap.** The files are the same, but the changes are independent. The step is done when every kept PR has one case. ## Rebase the branch Rebase onto the updated base branch. Never merge the base branch in. ```bash git rebase origin/<base> ``` Resolve each conflict by keeping the base branch's version of the code and reapplying this PR's change on top of it. Never undo a change that came from the base branch. Apply the plans from "Check for overlap" while you rebase. The step is done when the rebase finishes and every overlap plan is applied. ## Verify the refreshed PR Compare the old and new versions of the PR's commits: ```bash git range-diff <old-base>..<old-head> origin/<base>..HEAD ``` Check that every difference comes from a conflict fix or an overlap plan, and that no change from the base branch was undone. Run the repository's checks and tests. When the PR's description includes evidence such as a reproduction or a screenshot, repeat it on the new head. The step is done when every difference in the range diff has a reason and the checks and tests pass. ## Push and update the PR Push to the PR's head branch. The lease names `<old-head>`, so the push fails if anyone else pushed to the PR since you read it: ```bash git push --force-with-lease=<head-branch>:<old-head> origin HEAD:<head-branch> ``` When the refresh changed what the PR does, such as by dropping an overlapping part, update the PR description to match, following the `pr` skill. The step is done when `gh pr view <pr> --json headRefOid` returns the same SHA as `git rev-parse HEAD`. ## Watch the PR Use the `monitor` skill, starting the watcher with `--head $(git rev-parse HEAD)`. Merge only when the user asks. The step is done when the `monitor` skill reports the PR ready, or reports a blocker. ## Check the refresh - The rebase started from `<old-head>`, the PR's own head. - The branch was rebased, not merged. - Every PR that merged since `old_base` and touches this PR's code has an overlap case. - Every difference in the range diff comes from a conflict fix or an overlap plan. - No change from the base branch was undone. - The checks and tests pass on the new head. - The push went to `<head-branch>`, and the PR's head on GitHub equals the local `HEAD`. - The PR is watched until it is ready or blocked. ## Return the result Return the PR URL, the new head SHA, and one bullet per overlapping PR with its case and what you changed. List the conflicts you resolved. End with the watcher's result.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · adelrodriguez/skills | 96 | MIT |
| tony/skills | 100 | MIT |
| HarishTeens/fingod | 100 | Apache-2.0 |
| fullymiddleaged/clawness | 100 | MIT |
| prathikcannotcode/Vigil | 100 | Apache-2.0 |
| naveedharri/benai-skills | 100 | MIT |
| joaquimscosta/arkhe-claude-plugins | 100 | MIT |
Database snapshot: 13.11.2026 · package version 29afe7a541c3 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100rebase
Rebases the current feature branch onto the base branch (main/master/develop). Use when the user says "rebase", "sync branch", or "update branch". - 100workflow-refresh
Brings an old pull request up to date and decides whether it should still exist. It reads what changed on the base branch since the PR diverged, then recommends REFRESH (rebase, resolve conflicts, test and push), REWORK or CLOSE, with evidence. Use when the user asks to rebase,… - 81t3-modernize
For getting old prs up to date. Use when asked to rebase a pr or "modernize". - 90rebase-pr
Rebase a PR branch onto main. Handles merge commits, conflicts (auto-resolve when possible), linting, force push. Use when user says "rebase", "rebase PR", "rebase branch". - 86modernize
For getting old prs up to date. Use when asked to rebase a pr or "modernize". - 100update-pr
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.