{"data":{"slug":"discovered-d9336ad648a2b003b64c00a90c9329f1d8708b9d1728c835","title":"Old PR Verdict","summary":"Decide if an old open pull request should be KEEP, REWORK, or CLOSE before anyone rebases it. This skill helps evaluate whether the PR's goal is still relevant and its shape is still valid.","url":"https:\/\/skillshunter.net\/skills\/discovered-d9336ad648a2b003b64c00a90c9329f1d8708b9d1728c835","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-d9336ad648a2b003b64c00a90c9329f1d8708b9d1728c835","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-d9336ad648a2b003b64c00a90c9329f1d8708b9d1728c835.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-d9336ad648a2b003b64c00a90c9329f1d8708b9d1728c835\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before proceeding, ensure you have the GitHub CLI (`gh`) installed and that you are working in the PR's own worktree or a new one. Never work in a checkout someone else is using. Also, fetch the latest base branch (e.g., `main`) and compare it with the PR's branch to determine if the goal is still relevant.","instructions":"---\nname: old-pr-verdict\ndescription: Decide if an old open pull request is KEEP, REWORK or CLOSE before anyone rebases it. Use when asked to rebase, update, revive, clean up or triage an old or stale PR or branch, or when someone asks \"is this PR still needed\", \"modernize this PR\" or \"old PR verdict\".\nmetadata:\n  license: AGPL-3.0-or-later\n  copyright: \"2026 DevTribe Labs\"\n  homepage: https:\/\/github.com\/DevDadTribe\/toolbox\n  inspired_by: \"t3dotgg\/tstack modernize (MIT)\"\n---\n\n# Old PR verdict: KEEP, REWORK or CLOSE\n\n*Idea from the `modernize` skill in [t3dotgg\/tstack](https:\/\/github.com\/t3dotgg\/tstack) (MIT). This text is our own rewrite.*\n\nA clean rebase does not prove the PR still belongs in the product. Judge the idea first, the\nbranch second. Give the verdict before you push anything.\n\nThe examples use the GitHub CLI (`gh`) and `main` as the base branch. Use your own base\nbranch and forge tools if they differ.\n\n## What this skill may do\n\n- It may rebase and update that one PR's own branch, after a KEEP verdict.\n- It may not merge, close, change the base, delete a branch or widen the scope. Each of those\n  needs the user's explicit word. Deleting a branch can close every PR stacked on it.\n- Work in the PR's own worktree, or a new one. Never in a checkout someone else is using. No\n  `git stash`, no `git reset --hard` on shared work.\n- Age is not evidence. \"Commits behind\" is not evidence. The number of the PR's own files\n  that changed on the base is.\n\n## 1. Say what the PR was for\n\nRead the PR, its review threads and the whole diff:\n\n```bash\ngh pr view <N> --json title,body,state,isDraft,baseRefName,headRefName,headRefOid,commits,reviews,statusCheckRollup\ngh pr diff <N>\n```\n\nThen write one sentence: the smallest goal this PR was trying to reach. If you cannot write\nthat sentence, the verdict is not KEEP.\n\n## 2. Look at what moved around it\n\n- Which of its own files changed on the base since it branched:\n\n  ```bash\n  git fetch origin main\n  base=$(git merge-base origin\/main <head>)\n  git diff --name-only \"$base\" origin\/main -- $(gh pr diff <N> --name-only)\n  ```\n\n- Who changed them and why: `git log --oneline \"$base\"..origin\/main -- <its files>`.\n- Search for a replacement: merged and open PRs with the same words or the same files\n  (`gh pr list --state all --search \"<words>\"`), and your project's changelog or fixes log.\n- Is part of it already live? Some teams deploy from a branch before it merges. Check what is\n  actually deployed before you call anything dead.\n\nAsk, in this order:\n\n1. Is the same problem already solved on the base branch?\n2. Did the code it changes move, get deleted or get made simpler on purpose?\n3. Would landing it bring back an old behaviour, or make two ways to do one thing?\n4. Did a table, a function signature, a route or a rule it depends on change?\n5. Is the gain still worth the upkeep?\n\n## 3. Pick one verdict\n\n- **KEEP**: the goal is still wanted and the shape is still right. Go to step 4.\n- **REWORK**: the goal is still wanted, the shape is now wrong. Say the smallest rewrite in\n  3 lines and stop. Do not push a mechanical rebase of the wrong shape.\n- **CLOSE**: replaced, out of date, or no longer worth it. Name the PR, commit or file that\n  proves it and stop. Do not rebase it. Do not close it without the user's word.\n\nBe willing to say CLOSE. Work already spent is not a reason to keep a PR open.\n\n## 4. KEEP only: rebase without losing the point\n\n1. Record the remote head sha you read in step 1.\n2. Rebase the PR's commits onto a freshly fetched base. For a stack, rebase the whole chain in\n   order. If the base PR was squash-merged, cherry-pick this PR's own commits onto the base\n   instead.\n3. Resolve each conflict by the PR's goal and the base branch's newer rules. A conflict that\n   is really a product disagreement sends you back to step 3. For a file where every PR adds\n   an entry at the top (a changelog, a migration list), do not hand-merge the hunks: take the\n   base branch's file whole and add this PR's entry back as one block.\n4. Compare the old and new commit series with `git range-diff`, and read the final diff.\n   Nothing wanted went missing, and nothing the base already has came back.\n5. Run the focused checks for the touched area. A failure that also fails on the base branch\n   is not this PR's.\n6. Push with `git push --force-with-lease=<branch>:<sha from step 1>`. If the lease fails,\n   fetch and start the verdict again. Then watch the checks: `gh pr checks <N> --watch`.\n7. A reviewed PR whose code changed needs its review again on the new head.\n\n## 5. Report\n\nLine 1 is the verdict and the reason in plain words. Then, short:\n\n- what changed on the base around it;\n- the conflict in ideas, or that there was none;\n- the rebase and push result, if you did one;\n- the checks you ran and what they said;\n- the one decision left for the user, with the PR link.\n\nKeep what you saw apart from what you judge. Say NOT VERIFIED for what you could not check.\n\n---\n\n*`old-pr-verdict` from [DevDad's Toolbox](https:\/\/github.com\/DevDadTribe\/toolbox). AGPL-3.0-or-later (c) 2026 DevTribe Labs. Inspired by [t3dotgg\/tstack](https:\/\/github.com\/t3dotgg\/tstack) (MIT).*\n","use_cases":["Evaluate whether an old PR is still relevant before rebasing or updating it.","Assess if an old PR's goal is still wanted and its shape is still valid.","Identify if an old PR should be closed due to being outdated or replaced.","Modernize or rework an old PR based on current codebase changes."],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/DevDadTribe\/toolbox\/blob\/5f44c242b6e4997ebc34dec7202932c4aa6701f6\/skills\/old-pr-verdict\/SKILL.md","source_commit":"5f44c242b6e4997ebc34dec7202932c4aa6701f6","license":null,"version":null,"listing_approved_at":"2026-11-29","created_at":"2026-11-28T18:41:54.000000Z","updated_at":"2026-11-29T10:53:02.000000Z","seo_title":"Evaluate Old Pull Requests: KEEP, REWORK, or CLOSE","seo_description":"Determine whether an old open pull request should be kept, reworked, or closed based on its relevance and alignment with current codebase changes.","seo_keywords":["old pr evaluation","keep rework close pr","github pr review","pr modernization","git rebase evaluation"]}}