Install in seconds
Install this skill
Copy the command and run it in your terminal. You can review the source before installing.
terminal
git clone https://github.com/crbnos/carbon

Works with Git. The repository opens in your current directory.

📄
QualityTypeScript

PR Explainer

by crbnos

Generates a self-contained HTML page that explains a pull request's purpose, changes, and verification, helping reviewers quickly understand complex changes without reading the full diff.

2.3K stars318 forksAdded 2026/07/20
agentic-platformassemblylinebusinesserpleanmanagementmanufacturingmcp-servermespostgresqlqmsreact-routersupabasetypescript

Documentation

README

pr-explainer — teach the PR in one HTML page

Output: one self-contained HTML file in .pr-review/ (gitignored) that a reviewer can open locally and understand the PR without GitHub. It supplements the real diff review; it never replaces it.

Announce at start: "Using the pr-explainer skill — building the review page for {branch}."

Step 1: Gather the facts (before writing any HTML)

BASE=$(git merge-base origin/main HEAD)
git status --short                      # current state
git log --oneline $BASE..HEAD           # the commits
git diff $BASE...HEAD --stat            # scope + the metrics numbers
git diff $BASE...HEAD                   # read the whole diff
gh pr view --json number,title,url 2>/dev/null   # if a PR exists

Also collect: verification already performed this session (test runs, browser checks, screenshots) — the page must report real evidence, not aspirations.

Step 2: Classify files and find the teaching order

Classify every changed file: core behavior · plumbing/integration · tests · metadata/release · incidental noise. Only core behavior and load-bearing plumbing get walkthrough sections; the rest gets at most one line.

Teach in this order (never raw diff order): problem → system context → before/after flow → key code changes → verification → reviewer takeaway.

Step 3: Fill the template

mkdir -p .pr-review
cp .ai/skills/pr-explainer/assets/template.html .pr-review/{branch}.html

The template has one section per teaching step, styled and ready — every spot to fill is marked with a <!-- FILL: ... --> comment. Work top to bottom:

  1. Header: PR number/title/branch/link; metrics from --stat (real numbers).
  2. Problem: previous behavior and why it was wrong/missing/risky, with a concrete example.
  3. System context: upstream callers, downstream effects, why this layer; name what is intentionally unchanged.
  4. Before → after flow: duplicate the .flow rows, mark changed nodes with class="node hot". Delete the section if the PR changes no flow. Put the one counterintuitive fact in the callout.
  5. Code walkthrough: one .diff block per important file — only the lines that matter (.add / .del / .ctx spans), each followed by a short paragraph: what it accomplishes and how it connects to the story.
  6. Tests & verification: exact commands run and their results. If a check was not run, say so and list the recommended command — never imply verification that didn't happen.
  7. Reviewer takeaway: the shortest useful mental model + what to focus on in the real diff.

Writing rules: plain language; define repo-specific terms at first use; small focused snippets over full patches; delete any template section that doesn't apply (empty sections are noise).

Step 4: Check and hand off

  • Every <!-- FILL --> comment is either filled or its section deleted
  • Metrics match git diff $BASE...HEAD --stat
  • Every claim in Verification corresponds to a command actually run
  • File opens standalone (no external assets) — it's one HTML file
  • .pr-review/ stays untracked (git status shows nothing staged from it)

Report: the output path, the PR story covered, and any verification gaps the page discloses.

More from crbnos

Other Claude Code skills by this author in the directory.

🌐
1w ago

Agent Browser

Browser automation CLI for AI agents. Use it to navigate pages, fill forms, click buttons, take screenshots, extract data, test web apps, or automate any browser task.
Automation
+0%2.3K325
🔑
1w ago

Carbon Dev Auth

Authenticates a local browser session against the Carbon ERP dev server using DEV_BYPASS_EMAIL, enabling automated testing and manual verification. Leaves session open for subsequent commands.
Automation
+0%2.3K325
📚
1w ago

Carbon Docs

Author, edit, or extend Carbon's documentation site — a Fumadocs + Next.js app. Use for reader-facing guides, reference pages, and documentation IA. Grounds every claim in source code and follows a warm-paper house style.
Writing
+0%2.3K325
1w ago

Check and Commit

Runs a sequence of code quality gates (type generation, formatting, linting, typecheck, tests, build, i18n) on changed files, fixes simple issues, and commits only when all checks pass. Ideal after a code fix, task execution, or manual changes before committing.
Quality
+0%2.3K325
🔄
1w ago

Conductor

Drive a single work item through a doer→gate→judge→keep-or-revert→ledger cycle to a gated PR, unattended. Use for tightly-scoped bugs, usability tweaks, or small features with explicit acceptance criteria.
Automation
+0%2.3K325
🤖
1w ago

Create AGENTS.md

Generates or refreshes AGENTS.md files for Carbon packages and ERP modules by analyzing the actual source code. Ensures every documentation claim is verified against real functions, tables, and exports.
Writing
+0%2.3K325