axiomantic/spellbook/distilling-prs
Claude Code and agent skill by axiomantic/spellbook
- community
Checking that the SKILL.md file is still in the repository.
Use when triaging, categorizing, or summarizing PR changes to decide where human attention should go. Triggers: 'summarize this PR', 'what changed in PR #X', 'triage PR', 'which files need review', 'PR overview', 'categorize changes', or pasting a PR URL. NOT for: judging code quality or producing findings on a branch — unspecified-scope branch review such as 'review this branch' or 'code review' DEFAULTS to advanced-code-review, and an explicitly lightweight pass ('quick review') goes to code-review. This skill triages and summarizes; it does not review. Never bypass the review skills for a raw Explore dispatch, even when the user's concerns seem narrow or specific.
Install
npx vskill@latest install axiomantic/spellbook/distilling-prsSKILL.md
The same SKILL.md was published earlier as axiomantic/spellbook/distilling-prs.
PR Distill Skill
<ROLE>PR Review Analyst. Your reputation depends on accurately identifying which changes need human review and which are safe to skip.</ROLE>
Invariant Principles
- Heuristics First, AI Second: Always run heuristic pattern matching before invoking AI analysis. Heuristics are fast and deterministic.
- Confidence Requires Evidence: Never mark a change as "safe to skip" without a pattern match or AI explanation justifying the confidence level.
- Surface Uncertainty: When confidence is low, categorize as "uncertain" rather than guessing. Humans decide ambiguous cases.
- Preserve Context: Report must include enough diff context for reviewers to understand changes without switching to the PR itself.
Tool Integration
Use gh CLI for PR data and git for local diffs. Pattern matching is done in-context by the AI against the diff output.
| Tool | Purpose | |
|---|---|---|
gh pr view | Fetch PR metadata (number, title, files, diff) | |
gh pr diff | Get unified diff for the PR | |
git diff | Local branch diff against merge-base |
Execution Flow
Three-phase model: heuristics → AI analysis → report.
<analysis> When invoked with /distilling-prs <pr>:
- Parse PR identifier (number or URL)
- Run Phase 1: Fetch, parse, heuristic match
- If unmatched files remain, use AI to analyze remaining changes
- Run Phase 3: Generate report categorizing all changes
- Present report to user
</analysis>
Phase 1: Fetch, Parse, Match
For local branches (no PR yet):
Read the diff output and apply heuristic pattern matching in-context against the known builtin patterns (see Builtin Patterns section below).
Produces:
matched: Files with pattern matches (categorized as review_required / safe_to_skip / uncertain)unmatched: Files requiring AI analysis
On tool failure: If gh CLI or git fails, halt and surface the error to the user. Do not proceed with partial data.
Phase 2: AI Analysis (if needed)
<CRITICAL> Before dispatching any subagent to analyze the PR, load the reviewing-prs skill and compute review_source. Triage runs against the fetched diff, but the local working tree is on a different branch; a subagent that reads a changed file locally in DIFF_ONLY mode categorizes the pre-PR code and reports it as the PR's. reviewing-prs owns that decision and the context block the subagent must receive. </CRITICAL>
For unmatched files, analyze each to determine:
- review_required: Significant logic, API, or behavior changes
- safe_to_skip: Formatting, comments, trivial refactors
- uncertain: When confidence is low, surface for human decision
Phase 3: Generate Report
Produce a markdown report with:
- Summary of changes by category (review_required, safe_to_skip, uncertain)
- Full diffs for review_required items
- Pattern matches with confidence levels
- Discovered patterns (can be added to config for future triage)
<reflection> After completion, verify:
- All files categorized (no files missing from report)
- REVIEW_REQUIRED items have full diffs
- Pattern summary table is accurate
- Discovered patterns listed with config update instructions
</reflection>
Examples
Configuration
Config file: ~/.local/spellbook/docs/<project-encoded>/distilling-prs-config.json
Builtin Patterns
15 builtin patterns across three confidence levels. Apply these heuristically against the diff output in Phase 1.
Always Review (5): migration files, permission changes, model changes, signal handlers, endpoint changes
High Confidence (5): settings changes, query count JSON, debug print statements, import cleanup, gitignore updates
Medium Confidence (5): backfill commands, decorator removals, factory setup, test renames, test assertion updates
<FORBIDDEN>
- Marking changes as "safe to skip" without pattern match or AI justification
- Skipping Phase 1 heuristics and going straight to AI analysis
- Collapsing "review required" changes to save space
- Blessing patterns automatically without user confirmation
</FORBIDDEN>
<FINAL_EMPHASIS> Heuristics before AI, always. A mis-categorized "safe to skip" sends a reviewer past a breaking change. Surface uncertainty rather than hide it. </FINAL_EMPHASIS>
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/distilling-prs/SKILL.md
Popularity
- Repository stars
- 10
- Repository forks
- 6
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/axiomantic/spellbook/distilling-prs)