.claude/skills/pr-explainer/SKILL.md
Explain a PR's purpose, motivation, and architectural context with ASCII diagrams. Use when the user wants to understand what a PR does, why it exists, how it fits into the system, or asks for a visual summary of changes. Triggers on "explain this PR", "what does this PR do", "summarize this branch", "show me what changed", or `/pr-explainer`.
npx skillsauth add ahrav/gossip-rs pr-explainerInstall 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.
Produce a first-principles explanation of a PR (or current branch diff) that builds understanding incrementally. A reader who has never seen the codebase should be able to follow the explanation and understand not just what changed, but why each piece exists and how the pieces interact.
Output is structured top-down: problem first, then mechanism, then details. All diagrams use ASCII box-and-arrow art so they render correctly in any terminal. Do NOT use Mermaid — the primary consumer is the CLI, not GitHub.
gh pr view <arg> --json title,body,baseRefName and gh pr diff <arg>main:
git log main..HEAD --oneline for commit historygit diff main...HEAD for the full diffgit diff main...HEAD --stat for a file summaryCollect the raw material:
# For current branch (no argument):
git diff main...HEAD --stat # file-level summary
git diff main...HEAD # full diff
git log main..HEAD --oneline # commit history
# For a PR number:
gh pr view <number> --json title,body,baseRefName,headRefName
gh pr diff <number>
Read docs/scope-map.toml to find which design docs cover the changed files.
For each changed file path, match against [[scopes]] entries to find
the relevant doc paths.
Then read:
diagrams/00-README.md — to find relevant existing Mermaid diagramsBefore writing, you must be able to answer these questions about the change:
If you cannot answer these questions from the diff alone, read the referenced source files and design docs until you can.
Follow the output template in references/output-template.md. The core
principle is incremental understanding:
Every named box, arrow, and annotation in a diagram must be explained in the surrounding prose. If a diagram shows "Sender" and "Drainer", the text must explain what each one does, what data it handles, and why it exists as a separate thing. A diagram that contains unexplained components is worse than no diagram — it creates the illusion of understanding.
┌─┐│└─┘) or simple ASCII (+--+|) for boxes──▶, ───, ---->, - - -> (dashed for optional/test paths)[*] prefix or (changed) suffix[+] prefix or (new) suffixdiagrams/ when the change modifies a
documented flow── channel ──, ── thread boundary ──).(concurrent), Thread 1 / Thread 2.
The reader must see where parallelism happens and what synchronizes the
parallel paths.For complex mechanisms, use multiple focused diagrams rather than one dense diagram. Each diagram should make exactly one point clear.
When a change modifies existing behavior (not just adding new behavior), include a before/after comparison that makes the structural difference visible. Show what the system did before, what it does now, and label the key difference.
For particularly complex architecture or flow diagrams, invoke the
/ascii-diagrams skill which has deeper guidance on box-drawing conventions,
alignment, and multi-layer layouts.
Do not assume the reader knows why a design choice was made. Explain the reasoning chain:
Bad:
The pipeline splits into a Sender and Drainer for concurrent execution.
Good:
Scanning a file and durably committing its results are both I/O-bound operations. If they run sequentially — scan all files, then commit all results — the commit stage sits idle during scanning and vice versa. Running them concurrently lets the commit stage process completed items while scanning continues on the next file.
To enable this, the pipeline splits into two handles: the Sender (held by the scan thread, submits completed items into a bounded channel) and the Drainer (held by the commit thread, receives items and feeds durable receipts into the checkpoint aggregator). The bounded channel provides backpressure: if the commit stage falls behind, the channel fills up and the scan thread blocks until space opens.
Whenever the change involves concurrency (threads, channels, async tasks), the explanation must cover:
When the change introduces new types, traits, or splits existing ones:
When data moves between components:
git diff is fordevelopment
Deep first-principles code explanation that builds real understanding through phased walkthroughs with diagrams. Covers algorithms, data structures, memory layout, concurrency patterns, and performance tricks — especially for systems code in Rust. Use whenever the user asks to explain, walk through, break down, deep dive into, or understand code. Trigger on "how does this work", "what's happening here", "teach me about this", "why is it done this way", or when the user references a file with @ and wants to understand it. Proactively use when examining code involving lock-free algorithms, atomics/CAS, memory ordering,
development
Use when creating implementation-ready beads tasks that need testing strategy, optimal implementation approach, and documentation requirements baked in — composes /create-task with parallel enrichment agents that analyze the codebase and produce concrete test specifications, algorithm/data-structure guidance, and doc quality standards so implementing agents don't need to re-research
development
--- name: autoresearch description: Autonomous Goal-directed Iteration. Apply Karpathy's autoresearch principles to ANY task. Loops autonomously — modify, verify, keep/discard, repeat. Supports bounded iteration via Iterations: N inline config. version: 1.9.11 --- # Claude Autoresearch — Autonomous Goal-directed Iteration Inspired by [Karpathy's autoresearch](https://github.com/karpathy/autoresearch). Applies constraint-driven autonomous iteration to ANY work — not just ML research. **Core id
development
Use when implementing a new feature and assessing coverage gaps, during periodic test hygiene, when test suites feel bloated, or before merging code that changes coordination or hot paths. Two-phase assess-then-improve testing pipeline.