claude/plugins/docs/skills/pr-review/SKILL.md
Generate a narrative PR review guide as a markdown file. Use when the user asks to "review this PR", "generate a review guide", "create a PR walkthrough", "review guide for PR", "pr review file", "guide me through this PR", "narrative review", or wants a structured markdown document that walks through PR changes as a story rather than file-by-file.
npx skillsauth add raphi011/skills pr-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate a markdown file that walks a human reviewer through a PR as a narrative story — grouped by logical concepts, not file-by-file. The output includes verbatim code snippets, absolute-path links, and review insights inlined as callouts.
Read references/output-template.md for the exact output structure and rules.
If $ARGUMENTS contains a PR number or URL:
gh pr view <number> --json title,number,url,author,baseRefName,headRefName,additions,deletions,changedFiles
If no arguments — try current branch:
gh pr view --json title,number,url,author,baseRefName,headRefName,additions,deletions,changedFiles
Fallback — no PR exists:
git log --oneline $(git merge-base HEAD main)..HEAD # commits on this branch
git diff --stat $(git merge-base HEAD main)...HEAD # change summary
Use the branch name as the identifier. The output file will be review-<branch>.md.
Always get the repo root (needed for absolute path links):
git rev-parse --show-toplevel
gh pr diff <number> # if PR exists
git diff <base>...HEAD # fallback
Also get the stat summary:
git diff --stat <base>...HEAD
Parse the diff into per-file hunks. Classify each file:
*_test.*, *.test.*, **/test/**, **/tests/**, **/__tests__/**.yaml, .json, .toml, Dockerfile, CI files, build configsSpawn applicable agents via Task in a single response turn for parallel execution.
Pass each agent the relevant diff sections and instruct them to return findings with file:line references.
| Agent | Condition | What to include in prompt |
|-------|-----------|--------------------------|
| code-reviewer | Always | Full diff of non-test files |
| silent-failure-hunter | Diff contains catch, except, rescue, error handling, or fallback logic | Relevant diff sections only |
| pr-test-analyzer | Test files are in the diff | Test file diffs + production code they should cover |
| type-design-analyzer | New types, interfaces, structs, or classes added | Relevant type definitions |
Agent prompt template:
Review the following changes from a pull request. Return your findings as a structured list. For each finding include: severity (CRITICAL/HIGH/MEDIUM), file path, line number, description, and suggestion.
{diff content}
This is the critical creative step. Do NOT just list files alphabetically.
Build the markdown following the template in references/output-template.md.
Key rules:
Snippets must be verbatim. Copy code exactly from the diff. Never paraphrase, simplify, or rewrite. Use diff code blocks with +/-/ prefixes.
Every snippet gets a link. Format: [filename:line]({REPO_ROOT}/path/to/file#L{LINE}) where REPO_ROOT is the absolute path from Step 1. The link must be an absolute filesystem path so the reviewer can cmd-click it in their markdown reader.
Inline agent findings as callouts. Place each finding directly after the code snippet it relates to. Use the callout type matching the severity:
> [!WARNING]> [!CAUTION]> [!TIP]> [!NOTE]Truncate long hunks. If a hunk exceeds ~30 lines, show the most important lines (additions, core logic) and add:
... (N more lines) — [view full file](absolute/path#L{START})
Tests section is concise. List what's tested and what might be missing. Don't reproduce test code line-by-line. Flag if no tests were added/changed.
TLDR is 2-3 sentences max. What the PR does, why, and the approach — nothing more.
Write the assembled markdown to the current working directory:
review-{PR_NUMBER}.md if a PR existsreview-{BRANCH_NAME}.md if no PR (sanitize branch name: replace / with -)Tell the user the file path so they can open it.
| Scenario | Handling |
|----------|----------|
| No PR found | Fall back to branch diff against main (or master). Use branch name in filename. |
| Large PR (>30 files / >1000 lines) | Group aggressively (3-5 sections max). Add "Minor Changes" summary table. |
| Binary files | Mention in metadata section, skip snippets. |
| No test changes | Flag explicitly in Tests section as a potential gap. |
| Agent returns no findings | Good news — note "No issues found" for that agent's domain. |
| Agent fails or times out | Proceed without it. Note in Summary which agents were skipped. |
| Extremely long hunks (>30 lines) | Truncate with ... (N more lines) + link to full file. |
| Merge commits in diff | Use --no-merges or gh pr diff which excludes merge noise. |
# Review the current branch's PR
/pr-review-guide
# Review a specific PR by number
/pr-review-guide 1234
# Review a PR by URL
/pr-review-guide https://github.com/org/repo/pull/1234
development
Create polished, professional reveal.js presentations. Use when the user asks to create slides, a presentation, a deck, or a slideshow. Supports themes, multi-column layouts, code highlighting, animations, speaker notes, and custom styling. Generates HTML + CSS with no build step required.
tools
Use when writing Tailwind CSS v4 code, configuring Tailwind v4 with @theme or @variant directives, migrating from Tailwind v3 to v4, setting up CSS-native config (no tailwind.config.js), defining semantic color tokens, implementing dark mode with class-based @variant, creating design system tokens, or styling components with utility classes. Covers @import "tailwindcss", @theme blocks, @variant, @layer, CSS custom properties for colors, and common layout/component patterns.
development
Use whenever working with SurrealDB — writing queries, defining schemas, configuring indexes, debugging errors, handling record IDs, using the Go SDK, or discussing SurrealDB architecture. Activate on any mention of SurrealDB, SurrealQL, HNSW indexes, or surreal-related Go SDK code.
development
Use when visually verifying terminal UI rendering, testing TUI interactions, debugging Bubbletea display issues, or when asked to "test the TUI", "screenshot the terminal", "check what the TUI looks like", or "visually verify". Requires Kitty terminal with allow_remote_control and macOS for screencapture.