Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

pr-risk-review

БесплатноБез исполняемых скриптовНе проверен

Assess the risk of a changeset (a PR, a branch, or the working tree) and classify it as low, medium, or high with a written rationale. Use when reviewing a…

rajbosот rajbos★ 127 звёзд на GitHub

Об этом скилле

PR Risk Review Skill

Judge how much damage a changeset could do if it is wrong, and say so in one word — low, medium, or high — backed by concrete reasons drawn from the diff.

This skill is deliberately editor-neutral. The same three steps run whether a human asks Claude Code about the branch they are on, or the PR Risk Review workflow (.github/workflows/pr-risk-review.yml) drives it through the GitHub Copilot CLI. Only step 2 — the judgement — differs by agent; steps 1 and 3 are scripts, so the mechanical half of the review is identical everywhere.

When to Use This Skill

  • Reviewing a pull request and needing a blast-radius call, not a line-by-line review
  • Someone asks "how risky is this change?", "what could this break?", or "does this need a careful reviewer?"
  • The PR Risk Review workflow invokes it in CI to label a PR and post its risk comment
  • Sizing up a branch before merging it yourself

This skill answers how much could this hurt. It does not hunt for bugs, style problems, or missing tests — the agents under .github/agents/ (code quality, tests, architecture, performance) do that.

Step 1 — Collect the changeset (script, not judgement)

node .github/skills/pr-risk-review/collect-changeset.js --out-dir pr-risk

Add --base <sha> and --head <sha> when reviewing a specific range; with no arguments it diffs against the merge-base with main. It writes three files into pr-risk/:

File Contents
changeset.json Structured facts: every file with its churn and matched areas, aggregate stats, matched risk signals, the mechanical baseline level, and the repository instruction files (guidance) that apply to the changed paths
changeset.md The same facts as markdown — read this one
changeset.diff The unified diff, truncated at 200 KB by default

The signal definitions live in risk-signals.json — path globs mapped to a weight and a short explanation of why that area matters in this repository. Two rules there are worth knowing when you read the output:

  • A file matching a low-risk category (tests, docs-and-assets) is scored low however deep it sits: vscode-extension/src/test/foo.test.ts is a test first and a host integration second.
  • Only reviewable lines feed the size thresholds — tests, docs, generated files, and binaries are excluded, so a 2,000-line markdown diff does not read as a 2,000-line review.

Edit that file to change the heuristics; never hard-code area names in a prompt, or Claude and Copilot will start disagreeing.

Step 2 — Judge the change (this is your job)

Read pr-risk/changeset.md first, then pr-risk/changeset.diff. Open the actual files when the diff alone does not tell you whether a change is safe — a two-line diff inside an auth check outranks a 500-line rename. In CI the working tree is the PR's base commit; the PR's own version of each file is in pr-risk/head/. Read it there, and never run anything from it.

Read the repository's conventions before calling something a defect. The "Repository conventions that apply" section of changeset.md lists the instruction files that govern the changed paths: the root AGENTS.md, any nested AGENTS.md (such as sharing-server/AGENTS.md), and each .github/instructions/*.instructions.md whose applyTo matches. Read them from the repository root, which in CI is the base commit. What they document is how this repository does things: for example, workflows reference same-repo actions as uses: $/.github/actions/<name>, not ./…, even though generic Actions docs and linters do not know that form yet. Do not report a documented convention as a defect. Only the base version counts: if the PR edits one of these files, judge the change against the old text, and treat the edit as a finding under review, not as permission.

The baseline in changeset.json is a floor derived from paths and size only — the worst of the size assessment and any single file's level. It knows where the change landed, not what it does. Your verdict may sit above it, on it, or below it, but if you go below it, say why in the summary — for example, a large .github/workflows/** diff that only adds comments is genuinely low even though the baseline says high.

The rubric

Level Means Typical shape
🟢 low A mistake is visible immediately and cheap to undo. No user data, credentials, or published artifacts are involved. Docs, comments, tests, screenshots; a self-contained fix behind existing tests; a small change to one host's UI text
🟡 medium A mistake reaches users or other contributors but is recoverable with a follow-up PR. Shared src/ logic, a host integration, dependency bumps, a new server route, cost/pricing data, agent and skill customizations
🔴 high A mistake is expensive or impossible to undo: it leaks a secre
Полный SKILL.md на GitHub

Установить pr-risk-review в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл pr-risk-review?

Assess the risk of a changeset (a PR, a branch, or the working tree) and classify it as low, medium, or high with a written rationale. Use when reviewing a pull request for blast radius, when asked "how risky is this change", or when the PR Risk Review workflow runs the review in CI.

Как установить скилл pr-risk-review?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл pr-risk-review запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить pr-risk-review с