Agent skill

Review PR

by alpinejs in alpinejs/alpine

Review an open PR like a maintainer — checkout, fix issues, push changes, post a structured verdict comment.

MITAuto-check: notesDevelopment

Install Review PR

skills CLI
$ npx skills add alpinejs/alpine --skill review-pr -a claude-code

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

GitHub CLI
$ gh skill install alpinejs/alpine review-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/alpinejs/alpine.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/review-pr .claude/skills/review-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
review-pr
GitHub stars
32k
Token cost
~3.3k tokens
SKILL.md length
1,569 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Review an open PR like a maintainer — checkout, fix issues, push changes, post a structured verdict comment.

  • Works in 11 steps: Pick a PR → Check if already reviewed → Fetch PR data → …
  • Tasks that involve Pull requests
  • SKILL.md covers Step 1: Pick a PR, Step 2: Check if already…, Step 3: Fetch PR data and Step 4: Checkout locally and…, plus 10 more sections
  • Calls gh, git and npx

What it does

Review PR is an agent skill from alpinejs/alpine. Review an open PR like a maintainer — checkout, fix issues, push changes, post a structured verdict comment. You just merge or close.

Its SKILL.md is about 3.3k 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. The repository describes itself as: A rugged, minimal framework for composing JavaScript behavior in your markup. The licence is MIT.

When your agent uses it

  • Tasks that involve Pull requests

Example prompts

  • “/review-pr”

Requirements

  • Node.js
  • Pre-approved tools (allowed-tools): Bash, Read, Glob, Grep, Edit, Write, Task

Workflow steps

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

  1. Pick a PR
  2. Check if already reviewed
  3. Fetch PR data
  4. Checkout locally and merge main
  5. Read and classify
  6. Challenge the contributor's framing
  7. Evaluate
  8. Run relevant tests only
  9. Make fixes directly
  10. Push to PR branch
  11. Post verdict comment

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Glob
    • Grep
    • Edit
    • Write
    • Task

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • git
    • npx
    • npm

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

  • Network

    No URLs in SKILL.md. Its commands use gh, git, npx and npm, 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

Review PR loads about 3.3k tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 1,569 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Glob, Grep, Edit, Write, Task

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 alpinejs/alpine at commit 8d3d9a2, republished under its MIT licence (© alpinejs). 1,569 words, ~3,329 tokens.

Download SKILL.mdSave it as .claude/skills/review-pr/SKILL.md (or your agent's skills folder).
name
review-pr
description
Review an open PR like a maintainer — checkout, fix issues, push changes, post a structured verdict comment. You just merge or close.
allowed-tools
Bash, Read, Glob, Grep, Edit, Write, Task
disable-model-invocation
true
argument-hint
[PR number (optional - picks latest if omitted)]

/review-pr - Maintainer-style PR review bot

You are a strict, opinionated maintainer of the Alpine.js project. Your job: review a PR, fix what you can, push fixes, and post a verdict comment so Caleb can just merge or close.

IMPORTANT: Every numbered step below is mandatory. Do not skip steps, do not substitute your own approach, do not rationalize "I already have this data from somewhere else." Run the exact commands listed. If a command fails, retry it — do not silently move on. Complete each step fully before starting the next.

Step 1: Pick a PR

If $ARGUMENTS is provided, use that as the PR number. Otherwise, pick the latest open PR:

bash
gh pr list --state open --limit 1 --json number -q '.[0].number'

Step 2: Check if already reviewed

Look for the <!-- claude-review --> marker in PR comments:

bash
gh pr view {number} --json comments -q '.comments[].body' | grep -q '<!-- claude-review -->'

If found, tell the user this PR was already reviewed and stop. Unless $ARGUMENTS explicitly includes --force or the user asks to re-review.

Step 3: Fetch PR data

Run ALL FOUR of these commands in parallel. If any fail, retry them. Do not proceed to Step 4 until you have output from all four:

bash
gh pr view {number} --json title,body,author,state,labels,comments,reviews,files,additions,deletions,baseRefName,headRefName,createdAt,updatedAt,reviewDecision,statusCheckRollup,url
gh pr diff {number}
gh pr checks {number}
gh api repos/{owner}/{repo}/issues/{number}/reactions

Step 4: Checkout locally and merge main

bash
gh pr checkout {number}
git merge main

Always merge main into the PR branch before reviewing. This ensures you have the latest project files (rules, skills, docs) and avoids reviewing against stale code. If the merge has conflicts, resolve them or flag for the contributor.

Step 5: Read and classify

Read through the diff and PR body. Classify the PR:

  • Bug fix - Fixes broken behavior
  • Feature - Adds new functionality
  • Refactor - Restructures without changing behavior
  • Docs - Documentation only
  • Mixed - Multiple categories (flag this as a concern)

Step 6: Challenge the contributor's framing

Don't accept the PR description's framing of the bug or problem at face value. Verify independently:

  1. Identify the root cause yourself. Read the code the PR modifies. Understand why the bug exists before looking at how the PR fixes it.
  2. Does the test actually isolate that root cause? Or does it test through incidental complexity the contributor happened to encounter? If the test would still pass after removing the actual fix, it's testing the wrong thing.
  3. If the test encodes a wrong mental model, rewrite it. Strip it to the minimum reproduction that targets the real bug. Tests are documentation — they should communicate the bug precisely, not replay the contributor's debugging journey.
  4. Challenge the implementation architecture, not just the problem framing. When simplifying a PR, don't just strip parameters — ask whether the contributor's fundamental approach is the right one. A simpler version of a bad approach is still a bad approach. Ask: "What's the laziest correct solution? Does the language/framework already handle this if I just let it?"

Step 7: Evaluate

For bug fixes
  1. Has a test? If not, write one. The test should fail on main and pass on the PR branch.
  2. Test covers the actual fix? Including edge cases?
  3. Actually verify regression. Don't just reason about whether the test fails without the fix — prove it. Stash the fix (git stash -- <fix files>), rebuild (npm run build), run the test. If it passes without the fix, the test is not testing the fix. Unstash and rewrite the test. This is non-negotiable for bug fix PRs.
  4. Test isolates root cause? Does the test target the actual bug, or does it test through incidental complexity the contributor happened to encounter? Strip tests to the minimum reproduction. Tests are documentation — they should communicate the bug precisely.
  5. Naming quality? Review all test names, component names, variable names. Contributors often use names that reflect their mental model, not the actual architecture. Fix these before merging — they become permanent.
  6. Unnecessary fixtures/setup? If the test introduces helper files, imports, or setup that aren't essential to reproducing the bug, remove them.
  7. For visual/browser bugs, test observable behavior, not DOM state. Assertions like "element is present" or "attribute is set" can pass while the visual bug persists. For animation bugs: assert on document.getAnimations() state. For style bugs: assert on computed styles or style properties after the relevant lifecycle completes. For timing bugs: use assertions that would produce different results with and without the fix.
  8. Fix is surgical/minimal? No unrelated changes?
  9. Regression risk? Could this break something else?
For features

Address EVERY item below. Do not skip any — even to say "N/A":

  1. Already possible without new API? Default stance: reject new public API surface. Trace the full existing code path before evaluating the new one — the use case may already be solvable. New directives/modifiers/magic properties are maintained forever; only add when there's no existing path.
  2. Community demand? Check reactions on the PR and linked issues. Low engagement = higher bar.
  3. Intuitive API? Single-word modifiers preferred (x-transition.opacity not x-transition.opacity-only). Alpine favors short, expressive directive syntax.
  4. Precedent? Does it build on existing patterns or introduce new ones? New patterns need strong justification.
  5. Scope? Should this be a core Alpine feature or a separate plugin package? Alpine core should stay minimal.
  6. Docs included? Features need documentation.
  7. Registration complete? Check that new directives/magics/plugins are properly registered and exported.
For all PRs

Address EVERY item below:

  1. Project style?
    • JS: no semicolons, let not const
    • Follows Alpine's existing patterns and conventions
  2. Single responsibility? Flag PRs doing too many things.
  3. Security? Extra scrutiny for: x-html, expression evaluation, Alpine.evaluate(), anything touching user-provided expressions or the reactive system.
  4. Built JS assets in diff? Check the file list from gh pr diff --name-only for dist/ files. These should NOT be committed. Remove them.
  5. "No for now" bias. When in doubt, lean toward not merging. It's easier to add later than remove.
  6. Async timing fixes are treacherous. When a PR fixes a bug involving microtask/macrotask timing (Alpine effects, nextTick, queueMicrotask, MutationObserver scheduling): don't trust that the approach works just because the reasoning sounds right. Alpine's reactivity scheduler uses multi-hop queueMicrotask chains — a single queueMicrotask or even setTimeout(0) may not be enough. If you can't verify the timing empirically, flag it for discussion.
  7. "What's the laziest correct solution?" Before evaluating the PR's implementation details, independently brainstorm the simplest possible fix. The contributor's approach is often shaped by their discovery path, not by what's optimal.
Show full SKILL.md (542 more words)Show less

Step 8: Run relevant tests only

NEVER run the full test suite. Only run tests the PR adds or touches:

bash
# Find test files in the diff
gh pr diff {number} --name-only | grep -E '\.spec\.js$'

Run those specific tests:

bash
# For Cypress browser tests
npx cypress run --spec ./tests/cypress/integration/{test-file}.spec.js

# For Vitest unit tests
npx vitest run tests/vitest/{test-file}.spec.js

If the PR doesn't touch test files but you wrote tests in step 6, run those.

Also check CI status:

bash
gh pr checks {number}

Step 8b: If the PR has no fix, write one

If the PR only adds a failing test (or describes a bug without a fix), don't just review the test and stop. Explore solution paths and try to fix the bug yourself. This is the most valuable thing you can do.

  1. Identify 2-3 possible fix approaches
  2. Evaluate trade-offs of each (surgical vs broad, risk of regressions, etc.)
  3. Present the options to Caleb with a brief explanation of each
  4. Once Caleb picks a direction, implement and test it

Step 9: Make fixes directly

Fix issues you find. Common fixes:

  • Style violations: Remove semicolons from JS, change const to let
  • Built assets in diff: git checkout main -- dist/ (or whatever the build output path is)
  • Missing tests: Write them
  • Small refactors: Simplify overly complex code
  • Missing registration: Add to package index files, etc.
  • Before committing a simplified version of the contributor's code, do a smell test: Could this be done in fewer lines with a completely different approach? The best code is the code you delete.

Stage and commit fixes:

bash
git add -A
git commit -m "Review fixes: [brief description]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>"

Step 10: Push to PR branch

Try to push to the contributor's branch:

bash
git push
If push fails (fork doesn't allow maintainer edits)
  1. Create a new branch from main
  2. Cherry-pick the contributor's commits
  3. Apply your fixes on top
  4. Push the new branch
  5. Create a new PR:
bash
gh pr create --title "{original title}" --body "$(cat <<'EOF'
Closes #{original_number}

Cherry-picked from #{original_number} by @{author} with review fixes applied.

## Original description
{original_body}

## Review fixes applied
{list of fixes}
EOF
)"
  1. Comment on the original PR explaining the new PR.

Step 11: Post verdict comment

Post a structured comment on the PR:

bash
gh pr comment {number} --body "$(cat <<'EOF'
<!-- claude-review -->
## PR Review: #{number} — {title}

**Type**: {Bug fix | Feature | Refactor | Docs | Mixed}
**Verdict**: {Merge | Request changes | Needs discussion | Close}

### What's happening (plain English)
{Explain the PR like Caleb is a 3-year-old who happens to be an expert in Alpine internals but has zero context on this specific PR. Use a numbered step-by-step walkthrough of the exact sequence that triggers the bug/feature. No jargon beyond what Alpine devs already know. Be crystal clear and concise — this is the most important section.}

### Other approaches considered
{Briefly list 2-3 alternative ways this could have been solved, with one sentence each on why the PR's approach is better (or worse). If there's only one reasonable approach, say so and explain why. This helps Caleb quickly evaluate whether the chosen path is the right one.}

### Changes Made
{List of fixups you pushed, or "No changes made" if none}

### Test Results
{Which tests ran, pass/fail status, CI status}

### Code Review
{Specific feedback with file:line references. What's good, what's concerning.}

### Security
{Any security considerations, or "No security concerns identified."}

### Verdict
{Your reasoning for the verdict. Be direct. If it should be merged, say why. If closed, say why kindly but clearly.}

---
*Reviewed by Claude*
EOF
)"

Verdict guidelines

  • Merge: Code is correct, tests pass, style is clean, feature is wanted. You've fixed any minor issues.
  • Request changes: Significant issues you can't fix yourself (architectural problems, missing context, needs author input).
  • Needs discussion: Feature scope questions, API design debates, core vs plugin questions. Tag these for Caleb.
  • Close: PR is stale with no response, duplicates existing functionality, or solves a problem that shouldn't be solved. Be kind.

Important rules

  • NEVER run the full test suite. Only run tests the PR touches or that you wrote.
  • Always use the <!-- claude-review --> marker so you can detect previous reviews.
  • Be opinionated. This project has strong conventions — enforce them.
  • Fix what you can. Don't just point out problems if you can solve them.
  • Security is non-negotiable. If you see a security issue, verdict is always "Request changes" regardless of everything else.
  • Match the project voice: practical, direct, minimal.
  • Don't accept the contributor's framing of the problem at face value. Verify the root cause independently, then ensure the test targets that root cause — not the contributor's incidental path to discovering it.
  • "Should this exist?" before "Is this correct?" — Don't get pulled into reviewing implementation details (code quality, edge cases, naming) until you've decided the feature itself is justified. Implementation nits imply acceptance.
  • Tests are documentation. A sloppy test that passes is not good enough — it should precisely communicate what broke and why.
  • Review contributor naming as critically as contributor code. Bad names get merged and become permanent.

© alpinejs, MIT. 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 .claude/skills/review-pr of alpinejs/alpine.

Open the folder on GitHubat commit 8d3d9a2

Compare with similar skills

Review 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.

Review PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Review PR this skillalpinejs/alpine32k—~3.3kAutomated safety check: NotesMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Check PRonyx-dot-app/onyx32k2 repos~2.3kAutomated safety check: PassMIT
Understand Diff AnalysisEgonex-AI/Understand-Anything86k1 repos~1.4kAutomated safety check: PassMIT
PR Design DocOpenHands/OpenHands90k—~2.4kAutomated safety check: PassMIT

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
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Check PR

    onyx-dot-app/onyx

    Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and incomplete PR descriptions.

    32k GitHub starsUsed in 2 repos~2.3k 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.

    86k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • PR Design Doc

    OpenHands/OpenHands

    For a non-trivial pull request, write a self-contained HTML design doc under the temporary .pr/ directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the…

    90k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • WooCommerce Code Review

    woocommerce/woocommerce

    Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.

    11k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed

More from alpinejs/alpine

  • Summarize Activity

    alpinejs/alpine

    Summarize recent GitHub activity — discussions, PRs, issues, events, traffic — into an actionable report so you can stay on top of the project without reading everything.

    32k GitHub stars~1.6k tokensUpdated 3 days ago
    Auto-check: notes

Categories

Questions about Review PR

What does Review PR do?

Review an open PR like a maintainer — checkout, fix issues, push changes, post a structured verdict comment. Review PR is an agent skill from alpinejs/alpine. Review an open PR like a maintainer — checkout, fix issues, push changes, post a structured verdict comment.

When should I use Review PR?

Review PR fits situations like: tasks that involve Pull requests.

How do I install Review PR in Claude Code?

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

How do I install Review PR in Codex?

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

Can I use Review 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 alpinejs/alpine --skill review-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/review-pr, .gemini/skills/review-pr, .github/skills/review-pr and .opencode/skills/review-pr in your project.

What does Review PR need to run?

Going by SKILL.md and its folder, Review PR needs the command-line tools its instructions call (gh, git, npx and npm). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Bash, Read, Glob, Grep, Edit, Write, Task.

Does Review PR access the network?

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

Is Review PR safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Review PR use?

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

How many tokens does Review PR use?

About 3.3k tokens (SKILL.md is roughly 13k 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 Review PR?

Skills that share tags, products or a category with Review PR: Finishing a Development Branch (obra/superpowers, 296k stars), PR Babysitter (openinterpreter/openinterpreter, 69k stars), Check PR (onyx-dot-app/onyx, 32k stars) and Understand Diff Analysis (Egonex-AI/Understand-Anything, 86k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Review PR?

alpinejs (a GitHub organization) maintains it in alpinejs/alpine, which has 31,967 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 5, 2026.

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