skills/html-artifacts/html-pr-review/SKILL.md
Produce a single-file HTML "code review companion" artifact that helps a reviewer get oriented in someone else's pull request — a risk-coloured map of every file, an annotated diff with margin notes and severity tags, the call-graph that shows how the changed pieces fit together, and the questions worth asking the author. Use this skill whenever the user is about to review a PR, has been assigned one, mentions reviewing code they didn't write, says things like "help me review this", "I need to review PR
npx skillsauth add arctuition/skills html-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.
You are helping a reviewer who has been handed someone else's PR. They likely don't have full context. They want to know, in this order: where the risk is concentrated, what to read first, what to skip, and what to ask the author.
The artifact is for the reviewer, not the author. It's the document the reviewer wishes the author had written.
git diff <base>..<head>, the GitHub URL via MCP if available, or the user's paste. Don't summarize from filenames alone.grep/rg). This is what makes the review good.If something is missing and findable from the repo, find it. If still missing, ask one focused question.
Use this shape unless asked otherwise. Drop sections that would be empty.
<repo> · Pull Request #N), h1 with the PR title, author + age + branch + diff stats.safe / worth a look / needs attention. The chips link to the corresponding file section. Add a legend.references/design-tokens.md for the box-and-arrow pattern.Be honest, not flattering. The reviewer trusts the map only if it's calibrated.
// TODO or // FIXME that the author left behind.When you flag needs attention, the file's review note must say what specifically to look at. "This is risky" without a pointer is useless.
For files with worth a look or needs attention, render the relevant hunks inline rather than just describing them. Use this pattern:
<div class="diff">
<div class="diff-row context"><span class="ln">42</span><span class="mark"> </span><pre>function pickWorker() {</pre></div>
<div class="diff-row del"> <span class="ln">43</span><span class="mark">-</span><pre> return workers[Math.floor(Math.random() * workers.length)];</pre></div>
<div class="diff-row add"> <span class="ln">44</span><span class="mark">+</span><pre> return workers[counter++ % workers.length];</pre></div>
<div class="bubble blocking">
<span class="label">BLOCKING</span>
<p><code>counter</code> is module-local but workers run in multiple processes — round-robin per-process is not round-robin overall.</p>
</div>
</div>
Bubble severities (use the colour rule from design-tokens):
blocking (clay) — must change before mergequestion (slate) — needs an answer, may not need a changenit (gray) — preference, not a blockerThis is the most valuable part of the artifact. Aim for three to seven questions, each citing path:line, each genuinely answerable. Examples that work:
workerPool.ts:42 — the round-robin uses a module-local counter; intended? With multiple Node processes this is approximate."migration_004.sql:11 — backfill is a single UPDATE; on a 50M-row table this needs a chunked job. Is that follow-up work or did I miss it?"Questions that don't work: "is this tested?" (you can read the test file), "did you consider X?" (vague). Cite a line.
Use the tokens and components in references/design-tokens.md. Risk colours are non-negotiable: olive = safe, oat = worth a look, clay = needs attention. The reviewer learns the legend once and it must mean the same thing across every artifact you produce.
Default filename: pr-<number>-review.html.
Save in ~/artifacts/, creating the directory if it doesn't exist. If the user specified a directory or filename, honor that instead. Surface a computer:// link so the user can open it themselves — don't auto-open. Don't dump the HTML source into chat — the artifact is the deliverable.
After saving, ask whether they want you to (a) draft the GitHub review comments based on this, (b) deepen any section, or (c) move on.
Match the user's language for prose. Filenames, code, branch names, bubble labels (BLOCKING / QUESTION / NIT), and risk tags can stay in English even if the prose is Chinese — they read as terms of art.
html-pr-writeup instead.references/design-tokens.md — full CSS/component vocabulary (risk chips, bubbles, diff rows, SVG flow diagrams). Read it before assembling the HTML — it has the full CSS and component markup you need to drop into the document's <style> and body.testing
Analyze committed changes on the current local branch, propose a dependency-ordered stacked PR plan, then after explicit approval create multiple upstream stacked PRs. Use when the user asks to "stack this PR", "create a PR stack", "split this branch into PRs", "split PR", "拆 PR", "split into reviewable PRs", or says a branch/PR is too big to review.
testing
Iteratively detect and fix everything outstanding on a GitHub PR — CI failures, bot review findings, and human inline comments — then push, wait for CI, and re-scan until nothing actionable remains. Use when asked to "fix the remaining issues on a PR", "address PR feedback", "loop until CI is green", "auto-fix PR comments", "run a final fix pass before merge", or 检查 PR 状态和 comment 自动修复 / 修到没有新 finding 为止. Author-side by default; runs on any PR branch you have push access to, including PRs that already look ready to merge.
testing
Research what real people have actually been saying about a topic over a recent time window (default last 30 days) across Reddit, Hacker News, X, YouTube, and GitHub — then synthesize an engagement-weighted, cited brief. Use when the user asks: what's new/recent buzz/trending with X, community sentiment on X, what people are saying about X lately, last30days, past week/last N days, 最近大家在聊什么 / 最近 X 有什么新动态 / 时效性调研 / 选型/产品调研. Complements deep-research (fact-checking) by focusing on recency + community signal rather than authoritative sources.
data-ai
Wrap up the work you just did and open a PR for it — branch off main/master if needed, commit only the changes you made, push, open a pull request (following .github/PULL_REQUEST_TEMPLATE.md when present), and open the PR in the browser. Targets the `upstream` remote's default branch as the base when an `upstream` remote exists, otherwise `origin`. Use when the user says "sign off", "signoff", "ship it", "open a PR for this", "commit and PR", or "wrap this up".