Skip to content
Back to skills

Explain Pr

ASecurity

Explain a pull request to a human reviewer as one local HTML page of its decisions, each with a grade, a source, the recorded reason, and its code. Use when the user asks to explain, walk through, or understand a pull request, a merge request, or a branch. Not for review verdicts or bug hunting.

  • 52 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentsgonodegitapidatabaseperformance

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned December 2, 2026

npx -y skills add LeeJuOh/claude-code-zero --skill explain-pr --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Explain Pr?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Explain Pr
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leejuoh-explain-pr/badge)](https://www.skillsdirectory.com/skills/leejuoh-explain-pr)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: explain-pr
description: "Explain a pull request to a human reviewer as one local HTML page of its decisions, each with a grade, a source, the recorded reason, and its code. Use when the user asks to explain, walk through, or understand a pull request, a merge request, or a branch. Not for review verdicts or bug hunting."
compatibility: "Needs git and Node.js 18 or later. Uses the forge CLI (such as gh or glab) when signed in."
---

# Explain PR

Show a reviewer what the change decided. Give no verdict, approval advice, or bug report. Write nothing to the PR.

## Steps

1. **Find the change.** Use the PR, MR, or branch the user names, else the open PR of the current branch. With no PR, compare the current branch with the default branch. Fetch a commit that is not local. Leave the user's branch and working tree as they are. Done when you know the head commit, the merge base, and whether a PR exists.
2. **Read the records and the code.** Find the forge from the remote URL. If its CLI is installed and signed in, read the PR body, review comments, and linked issues. Otherwise read local git only. Read the commit messages, every changed file, and the unchanged code a decision depends on. Done when each changed file is read or noted as not read.
3. **Pick the decisions** with the rules below. Done when each has a grade, a source, and a reason or a question.
4. **Write the body HTML.** First read `assets/skeleton.html` in this skill's folder. Use only its class names and data attributes, and follow its comments. Write your own areas, order, and sentences, with the writing rules below. Save the body to a temporary file outside the repo.
5. **Build the page.** Stay in the repository you explain. Run `node <this skill's folder>/scripts/build-page.mjs <body-file> <page-file>`. The page file is `<temporary folder>/explain-pr/<owner>-<repo>-<PR number>.html`, with the branch name as the number when there is no PR. Fix each problem the script prints until it exits 0. If it prints "not compared", fetch that commit and run it again.
6. **Open the page and reply.** Open the page in the browser. With a browser tool, look at the rendered page. Without one, say it was not checked. Give the page path. Name each decision with no reason on record, and add "Write the reason in the PR and run this again, and the question goes away."

A second run writes the whole page again.

## Decisions

A decision is a choice the reviewer could answer with "do it differently". This sentence wins over both lists.

- Where to look: data shapes, storage locations and naming schemes, API contracts and error behavior, new dependencies, performance tradeoffs, how the change read its scope, patterns others will copy.
- Usually not decisions: variable names, type cleanups, removed duplication, internal structure, import order.

Include decisions the author wrote down nowhere. Leave other changes off the page. Do not cap the number of decisions.

## Grades

Ask two questions in order.

1. Does reverting the code alone restore the old state, and is the place not sensitive? If either is no, the grade is High.
   - A revert does not restore database schemas and migrations, deleted data, public APIs and file formats, or outward actions such as payments and sent mail.
   - Sensitive places are authentication, permissions, payments, personal data, secrets, infrastructure and CI settings, and any path the project's instruction files (`CLAUDE.md`, `AGENTS.md`) call sensitive.
2. Does behavior change outside the feature this change builds? Yes is Medium, such as shared code, a new dependency, error behavior, or a pattern others will copy. No is Low.

When unsure, pick the higher grade. Every database migration is High. The grade reason is one sentence. For a path the project names, write "a path the project marks as sensitive". A grade sets reading order, not a verdict.

## Reasons and sources

- The records are the PR body, commit messages, review comments by humans, linked issues, spec documents the change edits, and code comments in the diff.
- The source is `author` when a record states the decision, and `code` when only the code shows it. Never call a `code` decision careless.
- Quote a reason only from a record. Do not infer one. The reason block holds the author's whole sentences and none of yours. A comment by a bot or an AI reviewer is not a reason.
- With no reason on record, write one question for the author that points at the code location. Suggest no answer.
- The behavior text says what happened before and what happens now, both confirmed in the code.
- When one of your own sentences repeats a record's exact words, put those words in `<q>`.

## Page

- Notices. The head commit, then each skeleton notice that is true. Name every changed file you did not read.
- Before and Now. One line each for the whole change. "Before" is what runs today.
- Decision list. High first, one line each.
- Areas. Order them as the work flows and name each for what it does, not for a file. Each is one sentence on what it does, then its cards, not sorted by grade.
- Code. Show only the lines that show the decision, inside their enclosing declaration, and fold the rest. Copy each line exactly.
- Unchanged code. State a fact about it only when the decision needs it.
- Leave review comments off the page.

## Writing rules

These rules cover your own sentences, in any language. Copy quotes and code exactly.

- Write short sentences with one idea each. End them with periods, not semicolons.
- Use one name for each thing, everywhere.
- Make every "it", "this", and "they" point at one obvious thing. Repeat the noun when in doubt.
- Use the active voice and name the actor.
- Say what the code does with a mechanism or a number, not how it feels.
- Name a path or symbol only when it carries the change, and write it in code font.
- Use the everyday word. In English, avoid "crucial", "delve", "enhance", "leverage", "robust", "seamless", and "utilize".
- Break up a long string of nouns.
- Write whole sentences with their verbs and small words. Spell out arrows and abbreviations.
- State the point directly. Leave out metaphors, "not just X, but Y", and a forced group of three.
- Cut filler, hedging, a trailing phrase that adds no fact, and a closing summary.
- Leave out long dashes, curly quotes, colons that join a sentence, and bold-label lists. The check script fails the first three.

Files in this skill

  • SKILL.md6.3 KB
  • assets/page.css5.8 KB
  • assets/skeleton.html6.1 KB
  • scripts/build-page.mjs12.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.