explain-this-pr
Skill671 starsChanged 6 months agoMITView on GitHub
Takes a GitHub PR URL or the current branch and writes a plain-English explanation of what it does and why, then posts it as a PR comment. Use when asked to explain a PR, summarize a pull request, write a plain-English description of a PR, add a summary comment to a PR, or understand what a PR changes. Trigger when a user says "explain this PR", "summarize this pull request", "what does this PR do", "add a comment explaining the PR", or shares a GitHub PR URL and asks what it does.
In this repository63 other files it gives its agents.
- app-store-review-arbitrageSkill
- blog-cover-generatorSkill
- brand-alchemySkill
- claude-md-generatorSkill
- cold-email-verifierSkill
- company-radarSkill
- competitor-pr-finderSkill
- cook-the-blogSkill
- dependency-update-botSkill
- docs-from-codeSkill
- domain-expired-opportunity-finderSkill
- dx-roasterSkill
- email-newsletterSkill
- geo-gap-fixerSkill
- gh-issue-to-demand-signalSkill
- github-discussion-to-devrel-contentSkill
- seo-keyword-researchSkill
- graphic-case-studySkill
- graphic-chartSkill
- graphic-ebookSkill
- graphic-gifSkill
- graphic-slide-deckSkill
- hackernews-intelSkill
- human-toneSkill
- hyperframes-product-launch-videoSkill
- kill-the-standupSkill
- linkedin-job-post-to-buyer-pain-mapSkill
- linkedin-post-generatorSkill
- llms-txt-generatorSkill
- map-your-marketSkill
- meeting-brief-generatorSkill
- meta-ads-expertSkill
- meta-tribe-skillSkill
- newsletter-digestSkill
- noise2blogSkill
- noise-to-linkedin-carouselSkill
- npm-downloads-to-leadsSkill
- oss-launch-kitSkill
- outreach-sequence-builderSkill
- podcast-transcript-fetcherSkill
- position-meSkill
- pr-description-writerSkill
- pricing-finderSkill
- pricing-page-psychology-auditSkill
- producthunt-launch-kitSkill
- product-update-loggerSkill
- reddit-icp-monitorSkill
- reddit-post-engineSkill
- schema-markup-generatorSkill
- sdk-adoption-trackerSkill
- show-hn-writerSkill
- store-listing-optimizerSkill
- tweet-thread-from-blogSkill
- twitter-GTM-find-SkillSkill
- vc-curated-matchSkill
- vc-finderSkill
- vid-motion-graphicsSkill
- vid-product-launchSkill
- vid-sizzle-reelSkill
- where-your-customer-livesSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 11 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Read a GitHub pull request, understand what it changes, and write a plain-English explanation.
- Very specific: line 23
If not authenticated: gh auth login and follow the prompts.
- Distinctive: line 30
If no input, ask: "Which PR should I explain?
- Very specific: line 41
If isDraft is true, note this to the user: "This PR is still in draft.
- Very specific: line 48
If the diff is over 400 lines, read the --stat summary and the first 200 lines of the diff:
- Distinctive: line 63
Write two paragraphs. Read each rule before writing.
- Distinctive: line 82
If the commit messages contain a "why", use that context
- Distinctive: line 83
If there is no clear "why" in the diff or commits, omit this paragraph rather than guessing
- Distinctive: line 91
No em dashes — use a comma or period
- Distinctive: line 92
No filler: "this PR", "this change", "as you can see"
- Distinctive: line 93
No invented outcomes. Only state impacts that are directly visible in the diff or commit messages
- Distinctive: line 94
If the PR is a pure refactor with no behavior change, say that explicitly: "Refactors X to Y with no change in observable behavior."
- Distinctive: line 126
After posting: "Comment added.
- Distinctive: line 128
If the user says "output only", present the explanation in a code block for manual copy-paste without posting.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Explain This PR
Read a GitHub pull request, understand what it changes, and write a plain-English explanation. Post it as a PR comment so reviewers have instant context.
Step 1: Check Setup
Confirm gh is authenticated:
gh auth statusIf not authenticated: gh auth login and follow the prompts.
Confirm input. The user must provide one of:
- A GitHub PR URL (e.g.
https://github.com/owner/repo/pull/123) - A PR number in the current repo (e.g.
#123) - The keyword "current" to use the PR for the current branch
If no input, ask: "Which PR should I explain? Share the URL, PR number, or say 'current' for the active branch."
Step 2: Fetch PR Context
Get PR metadata:
gh pr view PR_URL_OR_NUMBER --json number,url,title,body,author,baseRefName,headRefName,additions,deletions,changedFiles,commits,labels,state,isDraftIf isDraft is true, note this to the user: "This PR is still in draft. The explanation is based on its current state."
Get the diff:
gh pr diff PR_URL_OR_NUMBERIf the diff is over 400 lines, read the --stat summary and the first 200 lines of the diff:
gh pr view PR_URL_OR_NUMBER --json files
gh pr diff PR_URL_OR_NUMBER | head -200Get existing comments (to avoid repeating what is already there):
gh pr view PR_URL_OR_NUMBER --json comments --jq '.comments[].body' 2>/dev/null | head -20Step 3: Write the Explanation
Write two paragraphs. Read each rule before writing.
Paragraph 1: What it does (technical)
- One sentence per major change
- Name the specific files, functions, or systems that changed
- State the before/after if the diff makes it clear
- Include concrete numbers if present in the diff (lines removed, tables dropped, endpoints added)
- Active voice, present tense
Example:
Replaces the in-memory session cache in auth.middleware.ts with a Redis-backed cache (src/cache/redis.ts). Adds get, set, and invalidate methods to the new Redis module and wraps UserService.getById() with a 5-minute TTL. Removes the Map-based cache that was limited to a single process and caused session drift across multiple instances.Paragraph 2: Why it matters (business/product impact)
- Who benefits and how
- What problem this solves or what risk it reduces
- If the commit messages contain a "why", use that context
- If there is no clear "why" in the diff or commits, omit this paragraph rather than guessing
Example:
Users hitting the /api/me endpoint under load were getting inconsistent session data across server instances, causing intermittent 401 errors. This change makes session state consistent across all instances and reduces database load by eliminating one query per authenticated request.Rules for both paragraphs:
- No em dashes — use a comma or period
- No filler: "this PR", "this change", "as you can see"
- No invented outcomes. Only state impacts that are directly visible in the diff or commit messages
- If the PR is a pure refactor with no behavior change, say that explicitly: "Refactors X to Y with no change in observable behavior."
- Under 150 words total
Step 4: Self-QA
Before posting, check:
- Paragraph 1 names specific files or functions from the diff
- No invented metrics or outcomes
- No em dashes
- No filler phrases
- Under 150 words total
- If no clear "why" exists, paragraph 2 is omitted rather than guessing
Fix any violation before posting.
Step 5: Post as PR Comment
Present the explanation to the user. Ask: "Ready to post this as a PR comment, or would you like to edit it first?"
On confirmation, pass the body via stdin to handle backticks, quotes, and newlines safely:
gh pr comment PR_URL_OR_NUMBER --body-file - << 'EOF'
EXPLANATION_HERE
EOFAfter posting: "Comment added. View it at: [url from Step 2]"
If the user says "output only", present the explanation in a code block for manual copy-paste without posting.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

