Skills PR Handler (Scenario)
Give it a PR number and it checks out the branch, rebases onto main, triages every open review thread, and validates changed skills.
Dev & CodingAdvanced★ 578⑂ 72AI score 6/10Last updated: Sep 26, 2026
What it does
- Checks out the PR with
gh pr checkoutand prints its state (draft, mergeable, review decision). - Rebases onto the base branch, resolves conflicts preserving both intents, and pushes with
--force-with-leaseon the PR head only — never force-pushingmain, never merging or un-drafting. - Audits the skill diff for discovery misuse (
searchdoingrecommend's job, hardcoded generative model ids) using the repo's AGENTS.md authoring contract, judging only lines the PR touches. - Loads only unresolved, non-outdated review threads via GraphQL, then triages each as fix / dismiss / ask, replies inside the thread, and resolves it when appropriate.
- Runs
$skills-validateonly when a skill is new or substantively changed, then ends with a compact status report (PR URL, rebase result, per-thread outcome, validation verdicts).
Who it's for
- Maintainers and contributors of the Scenario Labs skills repository.
- Teams that want a reference template for a disciplined "rebase + review-comment triage + validate" PR loop.
- Developers studying PR automation patterns with the
ghCLI and GitHub's GraphQL API.
Examples
skills-pr-handle 412— checkout PR 412, rebase onto main, fix two comments with a conventional commit, dismiss one noisy comment with a reason.skills-pr-handle 512 --plan-only— a PR adding a new skill, validated in planning mode so no generation credits are spent.- A PR that only edits a README table row — rebase and comment triage still run, and the report states "no skill validation needed" with the reason.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/scenario-labs/skills/HEAD/.agents/skills/skills-pr-handle/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .agents/skills/skills-pr-handle folder from the GitHub repo scenario-labs/skills into my ~/.claude/skills/skills-pr-handle/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/scenario-labs/skills.git /tmp/scenario-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scenario-skills/.agents/skills/skills-pr-handle ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Install the GitHub CLI (
gh) and authenticate withgh auth loginusing an account that can comment on and resolve review threads. - Clone the repository:
git clone https://github.com/scenario-labs/skills.git - Copy the skill into Claude Code:
mkdir -p ~/.claude/skills && cp -r skills/.agents/skills/skills-pr-handle ~/.claude/skills/ - This skill depends on the sibling
skills-validateskill and the repo'sAGENTS.mdconventions — copyskills-validatethe same way if you want the full flow. - Restart Claude Code, open the repository as your working directory, and invoke it explicitly:
skills-pr-handle <PR number>(model auto-invocation is disabled by design). - Start from a clean worktree; uncommitted changes will make the checkout step stop and report a blocker.
View source on GitHub ↗License: MIT