{"id":"606c3c43-8e1b-4ff4-ae4a-7b21c572ee73","shortId":"ckE8KA","kind":"skill","title":"explain-this-pr","tagline":"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 unders","description":"# Explain This PR\n\nRead 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.\n\n---\n\n## Step 1: Check Setup\n\nConfirm `gh` is authenticated:\n\n```bash\ngh auth status\n```\n\nIf not authenticated: `gh auth login` and follow the prompts.\n\nConfirm input. The user must provide one of:\n- A GitHub PR URL (e.g. `https://github.com/owner/repo/pull/123`)\n- A PR number in the current repo (e.g. `#123`)\n- The keyword \"current\" to use the PR for the current branch\n\nIf no input, ask: \"Which PR should I explain? Share the URL, PR number, or say 'current' for the active branch.\"\n\n---\n\n## Step 2: Fetch PR Context\n\n**Get PR metadata:**\n```bash\ngh pr view PR_URL_OR_NUMBER --json number,url,title,body,author,baseRefName,headRefName,additions,deletions,changedFiles,commits,labels,state,isDraft\n```\n\nIf `isDraft` is `true`, note this to the user: \"This PR is still in draft. The explanation is based on its current state.\"\n\n**Get the diff:**\n```bash\ngh pr diff PR_URL_OR_NUMBER\n```\n\nIf the diff is over 400 lines, read the `--stat` summary and the first 200 lines of the diff:\n```bash\ngh pr view PR_URL_OR_NUMBER --json files\ngh pr diff PR_URL_OR_NUMBER | head -200\n```\n\n**Get existing comments (to avoid repeating what is already there):**\n```bash\ngh pr view PR_URL_OR_NUMBER --json comments --jq '.comments[].body' 2>/dev/null | head -20\n```\n\n---\n\n## Step 3: Write the Explanation\n\nWrite two paragraphs. Read each rule before writing.\n\n**Paragraph 1: What it does (technical)**\n\n- One sentence per major change\n- Name the specific files, functions, or systems that changed\n- State the before/after if the diff makes it clear\n- Include concrete numbers if present in the diff (lines removed, tables dropped, endpoints added)\n- Active voice, present tense\n\nExample:\n```\nReplaces 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.\n```\n\n**Paragraph 2: Why it matters (business/product impact)**\n\n- Who benefits and how\n- What problem this solves or what risk it reduces\n- If the commit messages contain a \"why\", use that context\n- If there is no clear \"why\" in the diff or commits, omit this paragraph rather than guessing\n\nExample:\n```\nUsers 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.\n```\n\n**Rules for both paragraphs:**\n- No em dashes — use a comma or period\n- No filler: \"this PR\", \"this change\", \"as you can see\"\n- No invented outcomes. Only state impacts that are directly visible in the diff or commit messages\n- If the PR is a pure refactor with no behavior change, say that explicitly: \"Refactors X to Y with no change in observable behavior.\"\n- Under 150 words total\n\n---\n\n## Step 4: Self-QA\n\nBefore posting, check:\n\n- [ ] Paragraph 1 names specific files or functions from the diff\n- [ ] No invented metrics or outcomes\n- [ ] No em dashes\n- [ ] No filler phrases\n- [ ] Under 150 words total\n- [ ] If no clear \"why\" exists, paragraph 2 is omitted rather than guessing\n\nFix any violation before posting.\n\n---\n\n## Step 5: Post as PR Comment\n\nPresent the explanation to the user. Ask: \"Ready to post this as a PR comment, or would you like to edit it first?\"\n\nOn confirmation, pass the body via stdin to handle backticks, quotes, and newlines safely:\n\n```bash\ngh pr comment PR_URL_OR_NUMBER --body-file - << 'EOF'\nEXPLANATION_HERE\nEOF\n```\n\nAfter posting: \"Comment added. View it at: [url from Step 2]\"\n\nIf the user says \"output only\", present the explanation in a code block for manual copy-paste without posting.","tags":["explain","this","opendirectory","varnan-tech","agent-skills","gtm","hermes-agent","openclaw-skills","skills","technical-seo"],"capabilities":["skill","source-varnan-tech","skill-explain-this-pr","topic-agent-skills","topic-gtm","topic-hermes-agent","topic-openclaw-skills","topic-skills","topic-technical-seo"],"categories":["opendirectory"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/Varnan-Tech/opendirectory/explain-this-pr","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add Varnan-Tech/opendirectory","source_repo":"https://github.com/Varnan-Tech/opendirectory","install_from":"skills.sh"}},"qualityScore":"0.511","qualityRationale":"deterministic score 0.51 from registry signals: · indexed on github topic:agent-skills · 123 github stars · SKILL.md body (4,011 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-02T00:55:49.832Z","embedding":null,"createdAt":"2026-04-18T22:18:27.557Z","updatedAt":"2026-05-02T00:55:49.832Z","lastSeenAt":"2026-05-02T00:55:49.832Z","tsv":"'-20':301 '-200':274 '/api/me':469 '/dev/null':299 '/owner/repo/pull/123':130 '1':94,316,580 '123':139 '150':568,601 '2':173,298,419,610,689 '200':251 '3':303 '4':572 '400':242 '401':483 '5':395,622 'across':415,478,491 'activ':170,358 'ad':357,682 'add':54,379 'addit':196 'alreadi':283 'ask':36,154,633 'auth':103,109 'auth.middleware.ts':371 'authent':100,107,503 'author':193 'avoid':279 'back':376 'backtick':659 'base':221,402 'baserefnam':194 'bash':101,180,229,256,285,664 'before/after':337 'behavior':552,566 'benefit':426 'block':702 'bodi':192,297,654,673 'body-fil':672 'branch':13,150,171 'business/product':423 'cach':369,377,403 'caus':412,481 'chang':74,325,334,486,522,553,563 'changedfil':198 'check':95,578 'clear':343,452,606 'code':701 'comma':514 'comment':33,57,87,277,294,296,626,641,667,681 'commit':199,440,458,541 'concret':345 'confirm':97,115,651 'consist':490 'contain':442 'context':92,176,447 'copi':706 'copy-past':705 'current':12,136,142,149,167,224 'dash':511,596 'data':477 'databas':496 'delet':197 'descript':50 'diff':228,232,239,255,268,340,351,456,539,588 'direct':535 'draft':217 'drift':414 'drop':355 'e.g':127,138 'edit':647 'elimin':499 'em':510,595 'endpoint':356,470 'english':19,49,80 'eof':675,678 'error':484 'exampl':362,465 'exist':276,608 'explain':2,38,63,159 'explain-this-pr':1 'explan':20,81,219,306,629,676,698 'explicit':556 'fetch':174 'file':265,329,583,674 'filler':518,598 'first':250,649 'fix':616 'follow':112 'function':330,585 'get':177,226,275,380,474 'gh':98,102,108,181,230,257,266,286,665 'github':7,68,124 'github.com':129 'github.com/owner/repo/pull/123':128 'guess':464,615 'handl':658 'head':273,300 'headrefnam':195 'hit':467 'impact':424,532 'in-memori':365 'includ':344 'inconsist':475 'input':116,153 'instanc':417,480,493 'instant':91 'intermitt':482 'invalid':383 'invent':528,590 'isdraft':202,204 'jq':295 'json':188,264,293 'keyword':141 'label':200 'like':645 'limit':406 'line':243,252,352 'load':472,497 'login':110 'major':324 'make':341,487 'manual':704 'map':401 'map-bas':400 'matter':422 'memori':367 'messag':441,542 'metadata':179 'method':384 'metric':591 'minut':396 'modul':389 'multipl':416 'must':119 'name':326,581 'new':387 'newlin':662 'note':207 'number':133,164,187,189,236,263,272,292,346,671 'observ':565 'omit':459,612 'one':121,321,500 'outcom':529,593 'output':694 'paragraph':309,315,418,461,508,579,609 'pass':652 'past':707 'per':323,502 'period':516 'phrase':599 'plain':18,48,79 'plain-english':17,47,78 'post':28,82,577,620,623,636,680,709 'pr':4,8,32,40,53,60,65,86,125,132,146,156,163,175,178,182,184,213,231,233,258,260,267,269,287,289,520,545,625,640,666,668 'present':348,360,627,696 'problem':430 'process':410 'prompt':114 'provid':120 'pull':43,69 'pure':548 'qa':575 'queri':501 'quot':660 'rather':462,613 'read':66,244,310 'readi':634 'redi':375,388 'redis-back':374 'reduc':437,495 'refactor':549,557 'remov':353,398 'repeat':280 'replac':363 'repo':137 'request':44,70,504 'review':89 'risk':435 'rule':312,505 'safe':663 'say':166,554,693 'see':526 'self':574 'self-qa':573 'sentenc':322 'server':479 'session':368,413,476,488 'set':381 'setup':96 'share':160 'singl':409 'skill' 'skill-explain-this-pr' 'solv':432 'source-varnan-tech' 'specif':328,582 'src/cache/redis.ts':378 'stat':246 'state':201,225,335,489,531 'status':104 'stdin':656 'step':93,172,302,571,621,688 'still':215 'summar':41 'summari':56,247 'system':332 'tabl':354 'take':5 'technic':320 'tens':361 'titl':191 'topic-agent-skills' 'topic-gtm' 'topic-hermes-agent' 'topic-openclaw-skills' 'topic-skills' 'topic-technical-seo' 'total':570,603 'true':206 'ttl':397 'two':308 'under':62 'understand':71 'url':9,126,162,185,190,234,261,270,290,669,686 'use':34,144,445,512 'user':118,211,466,632,692 'userservice.getbyid':392 'via':655 'view':183,259,288,683 'violat':618 'visibl':536 'voic':359 'without':708 'word':569,602 'would':643 'wrap':391 'write':15,45,76,304,307,314 'x':558 'y':560","prices":[{"id":"32b96c10-df32-4bd9-9e48-1768bc55df6e","listingId":"606c3c43-8e1b-4ff4-ae4a-7b21c572ee73","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"Varnan-Tech","category":"opendirectory","install_from":"skills.sh"},"createdAt":"2026-04-18T22:18:27.557Z"}],"sources":[{"listingId":"606c3c43-8e1b-4ff4-ae4a-7b21c572ee73","source":"github","sourceId":"Varnan-Tech/opendirectory/explain-this-pr","sourceUrl":"https://github.com/Varnan-Tech/opendirectory/tree/main/skills/explain-this-pr","isPrimary":false,"firstSeenAt":"2026-04-18T22:18:27.557Z","lastSeenAt":"2026-05-02T00:55:49.832Z"}],"details":{"listingId":"606c3c43-8e1b-4ff4-ae4a-7b21c572ee73","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"Varnan-Tech","slug":"explain-this-pr","github":{"repo":"Varnan-Tech/opendirectory","stars":123,"topics":["agent-skills","gtm","hermes-agent","openclaw-skills","skills","technical-seo"],"license":null,"html_url":"https://github.com/Varnan-Tech/opendirectory","pushed_at":"2026-04-30T18:54:05Z","description":" AI Agent Skills built for GTM, Technical Marketing, and growth automation.","skill_md_sha":"ada7b973d18212cca6522548d6ed47c2b65f1e40","skill_md_path":"skills/explain-this-pr/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/Varnan-Tech/opendirectory/tree/main/skills/explain-this-pr"},"layout":"multi","source":"github","category":"opendirectory","frontmatter":{"name":"explain-this-pr","description":"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.","compatibility":"[claude-code, gemini-cli, github-copilot]"},"skills_sh_url":"https://skills.sh/Varnan-Tech/opendirectory/explain-this-pr"},"updatedAt":"2026-05-02T00:55:49.832Z"}}