modernize

Rebase aging pull requests onto current base and decide whether to modernize, rework, or close with range-diff proof.

139k|20.6k|Updated Mar 11, 2026
Ready to run
npx skills add https://github.com/garrytan/gstack --skill modernize-garrytan
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: modernize
Source: https://github.com/garrytan/gstack/tree/main/modernize
Command: npx skills add https://github.com/garrytan/gstack --skill modernize-garrytan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Maintainers face stale pull requests that claim to solve real problems but were written against an old codebase. Manually deciding which ones are still valid wastes hours of review time, and blindly merging can introduce subtle bugs when assumptions have changed. ## Core Features & Use Cases - Automated Rebase: Fetch the PR's current head, rebase onto today's base branch, and verify no intent was lost via range-diff. - Three-Verdict Analysis: Classify each PR as MODERNIZE (still valid, mechanically rebased), REWORK (problem real but solution outdated), or CLOSE (already fixed or direction changed). - Evidence-First Decision: Show conceptual conflicts, commit ranges, test results, and lease-pinned push proof before any action. - Use Case: You have 30 old PRs from contributors. Run modernize on each to sort them: which land as-is, which need rework, which should close. Get evidence first, decide later. ## Quick Start Run modernize on a PR number to read its claim, check what moved in the base, show the disposition with evidence, and ask before pushing.

Frequently Asked Questions about modernize

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decide if an old PR should still land?▼

Read the PR's title and body as a claim about the codebase. Check what changed in the base since the PR was opened—especially renames, contract changes, and architectural decisions. Rebase onto today's base, run range-diff to prove intent survived, and test. If the claim still holds and tests pass, MODERNIZE. If the problem is real but the fix is outdated, REWORK. If the base already fixed it or the direction changed, CLOSE.

What does range-diff prove about a rebase?▼

range-diff compares the original PR's patches against the rebased patches, showing which hunks changed shape. Hunks marked as changed need explanation (conflict resolution, renamed symbol, deliberate fix). A hunk you cannot explain is lost intent and means the rebase is unsafe.

Why does the skill use force-with-lease instead of plain force push?▼

force-with-lease protects against concurrent pushes: it pins the lease to the SHA you observed when you read the PR, so if someone else pushed meanwhile, the push fails instead of overwriting their work. A refused push means re-read the PR and start over.

Can modernize handle cross-repository (fork) pull requests?▼

Yes. For fork PRs, the head is fetched from pull/N/head into a temporary ref, and the push goes to the fork's URL with the same lease. Fork branches need the fork owner's permission or an explicit maintainer flag to edit.

What happens if the PR has merge commits in its history?▼

Merge commits are blocked. If the author resolved a conflict by merging the base into their branch, that merge commit's changes disappear during rebase and range-diff cannot see them. Those changes must become ordinary commits first.

Does the skill close PRs or just recommend closure?▼

The skill never closes a PR. CLOSE is a recommendation with reasons and the commit that superseded it. Only the PR author or a maintainer with authority closes it; the PR stays open until they decide.