{"id":"792d3061-3455-448b-b063-b2a3db1a872d","shortId":"dQNub8","kind":"skill","title":"pr-summary","tagline":"Analyze all PR changes and update PR description with accurate summary.","description":"## Preamble\n\n```bash\neval \"$(~/.vibestack/bin/vibe-slug 2>/dev/null)\" 2>/dev/null || SLUG=\"unknown\"\n_LEARN_FILE=\"${VIBESTACK_HOME:-$HOME/.vibestack}/projects/${SLUG:-unknown}/learnings.jsonl\"\nif [ -f \"$_LEARN_FILE\" ]; then\n  _LEARN_COUNT=$(wc -l < \"$_LEARN_FILE\" 2>/dev/null | tr -d ' ')\n  echo \"LEARNINGS: $_LEARN_COUNT entries loaded\"\n  if [ \"$_LEARN_COUNT\" -gt 5 ] 2>/dev/null; then\n    ~/.vibestack/bin/vibe-learnings-search --limit 5 2>/dev/null || true\n  fi\nelse\n  echo \"LEARNINGS: none yet\"\nfi\n```\n\n# PR Summary Update\n\n## Philosophy\n\n- **Analyze all changes without exception** — track all commits included in the PR, not just the latest.\n- **Accuracy is essential** — do not guess; read the actual diff and code before describing.\n- **Write from the reviewer's perspective** — explain \"why\" this change was needed and what impact it has.\n\n## Rules\n\n- Read all changed files before writing the summary\n- Analyze ALL commits in the PR, not just the latest\n- Be precise — do not guess or hallucinate changes\n- Preserve existing PR metadata (labels, assignees, reviewers)\n- Do NOT add promotional or attribution footers\n- Do NOT add unnecessary lines (Co-Authored-By, Generated with, etc.)\n\n## Process\n\n### Step 1: Identify PR\n\nDetermine the PR number from argument or current branch:\n\n```bash\n# If argument provided, use it directly\nPR_NUMBER={argument}\n\n# Otherwise, infer from current branch\ngh pr view --json number -q '.number'\n```\n\n### Step 2: Gather PR Context\n\n```bash\n# Get current PR details\ngh pr view {PR_NUMBER} --json title,body,baseRefName,headRefName,commits,files\n\n# Get base branch\nBASE_BRANCH=$(gh pr view {PR_NUMBER} --json baseRefName -q '.baseRefName')\n\n# View all commits in PR\ngh pr view {PR_NUMBER} --json commits -q '.commits[] | \"\\(.oid[:7]) \\(.messageHeadline)\"'\n\n# View all changed files with stats\ngh pr diff {PR_NUMBER} --stat\n\n# View full diff\ngh pr diff {PR_NUMBER}\n```\n\n### Step 3: Analyze Existing PR Body\n\n**CRITICAL: Check the existing PR body first.**\n\n```bash\n# Get current PR body\nEXISTING_BODY=$(gh pr view {PR_NUMBER} --json body -q '.body')\n```\n\n**Check for user-added content to preserve:**\n- Manual notes or context added by the author\n- Links to related issues, designs, or discussions\n- Sections not generated by this skill (e.g., custom sections)\n\nIf the existing body contains user-added content, preserve it in a `## Notes` section at the bottom.\n\n### Step 4: Deep Analysis\n\n**CRITICAL: Do not rely on diff statistics alone — understand the meaning of the changes.**\n\n**For large PRs (>20 files or >1000 lines changed):**\n- Group files by directory/module and analyze each group\n- Focus on structural changes first, then detail changes\n- Summarize at module level, not file level\n\n**For each changed file:**\n1. **Read the full diff** — understand what was added, modified, removed\n2. **Read the file** — understand the full context around the changes\n3. **Identify the purpose** — why was this file changed?\n4. **Assess impact** — what depends on this? Could this break anything?\n\n**Categorize changes:**\n\n| Category | Description |\n|----------|-------------|\n| **New Feature** | New functionality added |\n| **Bug Fix** | Existing behavior corrected |\n| **Refactor** | Code restructured without behavior change |\n| **Performance** | Optimization improvements |\n| **Documentation** | Docs, comments, README updates |\n| **Test** | Test additions or modifications |\n| **Configuration** | Config, CI/CD, build changes |\n| **Dependency** | Package additions, updates, removals |\n| **Breaking Change** | Changes that break existing API/behavior |\n\n**Deliberation questions:**\n- What is the **single purpose** of this PR?\n- Are there **breaking changes** for consumers?\n- What **edge cases** might be affected?\n- Are there any **risks** or **known limitations**?\n\n### Step 5: Craft PR Summary\n\n**Before writing, articulate:**\n1. What problem does this PR solve? (Summary)\n2. What specific changes were made and why? (Changes)\n3. Are there any breaking changes? (Breaking Changes)\n4. How should a reviewer verify this works? (Test Plan)\n\n**PR body format:**\n\n```markdown\n## Summary\n- Brief description of what and WHY\n\n## Changes\n- Change 1: why this was needed\n- Change 2: why this was needed\n\n## Breaking Changes\n- (if any) Description of breaking change and migration path\n\n## Test Plan\n- [ ] How to verify changes work\n- [ ] Edge cases to test\n```\n\n### Step 6: Update PR Description\n\n```bash\ngh pr edit {PR_NUMBER} --body \"$(cat <<'EOF'\n## Summary\n- {accurate summary based on analysis}\n\n## Changes\n- {change 1}: {why}\n- {change 2}: {why}\n\n## Breaking Changes\n- {if any, otherwise omit this section}\n\n## Test Plan\n- [ ] {verification step 1}\n- [ ] {verification step 2}\nEOF\n)\"\n```\n\n### Step 7: Verify Update\n\n```bash\n# Confirm PR was updated\ngh pr view {PR_NUMBER} --json title,body -q '.body'\n```\n\n### Step 8: Report Summary\n\n```\n## PR Summary Updated\n\n**PR**: #{PR_NUMBER}\n**Title**: {title}\n**Base**: {base_branch} ← {head_branch}\n\n### Analysis\n- Total commits: {N}\n- Files changed: {N}\n- Lines added: +{N}\n- Lines removed: -{N}\n\n### Categories\n- feat: {N} changes\n- fix: {N} changes\n- refactor: {N} changes\n- ...\n\nPR description updated successfully.\n```\n\n## Title Update\n\nIf the PR title is vague (e.g., \"update\", \"fix\", \"WIP\"), suggest a better title:\n\n```bash\ngh pr edit {PR_NUMBER} --title \"<type>(<scope>): <subject>\"\n```\n\n> **Note:** PR title optionally uses scope. Commit messages use `<type>: <subject>` format without scope.\n\n**Only suggest title changes when:**\n- Title is clearly vague or inaccurate\n- Title doesn't reflect the actual changes\n- Ask user before changing the title\n\n## Anti-Patterns\n\n- Do NOT write a summary without reading ALL changed files\n- Do NOT rely only on commit messages — verify against actual diff\n- Do NOT include changes that don't exist in the PR\n- Do NOT use vague descriptions like \"various improvements\"\n- Do NOT overwrite existing PR body without analyzing it first\n- Do NOT skip reading file context — diffs alone can be misleading\n- Do NOT add information that isn't supported by the code changes\n\n---\n\n## Capture Learnings\n\nIf you discovered a non-obvious pattern, pitfall, or insight during this session, log it:\n\n```bash\n~/.vibestack/bin/vibe-learnings-log '{\"skill\":\"pr-summary\",\"type\":\"TYPE\",\"key\":\"SHORT_KEY\",\"insight\":\"DESCRIPTION\",\"confidence\":N,\"source\":\"SOURCE\",\"files\":[\"path/to/relevant/file\"]}'\n```\n\n**Types:** `pattern`, `pitfall`, `preference`, `architecture`, `operational`.\n\n**Only log genuine discoveries.**","tags":["summary","vibestack","timurgaleev","agent-skills","ai-agents","claude-code","cursor-ide","developer-tools","kiro","mcp","prompt-engineering","slash-commands"],"capabilities":["skill","source-timurgaleev","skill-pr-summary","topic-agent-skills","topic-ai-agents","topic-claude-code","topic-cursor-ide","topic-developer-tools","topic-kiro","topic-mcp","topic-prompt-engineering","topic-slash-commands"],"categories":["vibestack"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/timurgaleev/vibestack/pr-summary","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add timurgaleev/vibestack","source_repo":"https://github.com/timurgaleev/vibestack","install_from":"skills.sh"}},"qualityScore":"0.457","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 15 github stars · SKILL.md body (6,527 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-18T19:06:23.121Z","embedding":null,"createdAt":"2026-05-18T19:06:23.121Z","updatedAt":"2026-05-18T19:06:23.121Z","lastSeenAt":"2026-05-18T19:06:23.121Z","tsv":"'/.vibestack/bin/vibe-learnings-log':893 '/.vibestack/bin/vibe-learnings-search':63 '/.vibestack/bin/vibe-slug':18 '/dev/null':20,22,46,61,67 '/learnings.jsonl':33 '/projects':30 '1':182,422,551,599,654,671 '1000':392 '2':19,21,45,60,66,217,433,559,605,657,674 '20':389 '3':290,444,568 '4':369,453,576 '5':59,65,544 '6':633 '7':267,677 '8':696 'accur':13,647 'accuraci':96 'actual':104,790,820 'ad':322,330,357,430,472,720 'add':163,170,864 'addit':494,504 'affect':535 'alon':379,858 'analysi':371,651,712 'analyz':4,80,136,291,400,848 'anti':799 'anti-pattern':798 'anyth':463 'api/behavior':513 'architectur':915 'argument':190,196,203 'around':441 'articul':550 'ask':792 'assess':454 'assigne':159 'attribut':166 'author':175,333 'base':239,241,649,707,708 'baserefnam':234,249,251 'bash':16,194,221,302,637,680,755,892 'behavior':476,482 'better':753 'bodi':233,294,300,306,308,315,317,353,587,643,692,694,846 'bottom':367 'branch':193,208,240,242,709,711 'break':462,507,511,526,572,574,610,616,659 'brief':591 'bug':473 'build':500 'captur':874 'case':532,629 'cat':644 'categor':464 'categori':466,725 'chang':7,82,119,130,153,271,385,394,406,410,420,443,452,465,483,501,508,509,527,562,567,573,575,597,598,604,611,617,626,652,653,656,660,717,728,731,734,777,791,795,809,825,873 'check':296,318 'ci/cd':499 'clear':781 'co':174 'co-authored-bi':173 'code':107,479,872 'comment':489 'commit':87,138,236,254,263,265,714,768,816 'confid':905 'config':498 'configur':497 'confirm':681 'consum':529 'contain':354 'content':323,358 'context':220,329,440,856 'correct':477 'could':460 'count':40,52,57 'craft':545 'critic':295,372 'current':192,207,223,304 'custom':348 'd':48 'deep':370 'deliber':514 'depend':457,502 'describ':109 'descript':11,467,592,614,636,736,837,904 'design':338 'detail':225,409 'determin':185 'diff':105,277,283,286,377,426,821,857 'direct':200 'directory/module':398 'discov':878 'discoveri':920 'discuss':340 'doc':488 'document':487 'doesn':786 'e.g':347,747 'echo':49,71 'edg':531,628 'edit':640,758 'els':70 'entri':53 'eof':645,675 'essenti':98 'etc':179 'eval':17 'except':84 'exist':155,292,298,307,352,475,512,829,844 'explain':116 'f':35 'feat':726 'featur':469 'fi':69,75 'file':26,37,44,131,237,272,390,396,416,421,436,451,716,810,855,909 'first':301,407,850 'fix':474,729,749 'focus':403 'footer':167 'format':588,771 'full':282,425,439 'function':471 'gather':218 'generat':177,343 'genuin':919 'get':222,238,303 'gh':209,226,243,257,275,284,309,638,685,756 'group':395,402 'gt':58 'guess':101,150 'hallucin':152 'head':710 'headrefnam':235 'home':28 'home/.vibestack':29 'identifi':183,445 'impact':124,455 'improv':486,840 'inaccur':784 'includ':88,824 'infer':205 'inform':865 'insight':886,903 'isn':867 'issu':337 'json':212,231,248,262,314,690 'key':900,902 'known':541 'l':42 'label':158 'larg':387 'latest':95,145 'learn':25,36,39,43,50,51,56,72,875 'level':414,417 'like':838 'limit':64,542 'line':172,393,719,722 'link':334 'load':54 'log':890,918 'made':564 'manual':326 'markdown':589 'mean':382 'messag':769,817 'messageheadlin':268 'metadata':157 'might':533 'migrat':619 'mislead':861 'modif':496 'modifi':431 'modul':413 'n':715,718,721,724,727,730,733,906 'need':121,603,609 'new':468,470 'non':881 'non-obvi':880 'none':73 'note':327,363,762 'number':188,202,213,215,230,247,261,279,288,313,642,689,704,760 'obvious':882 'oid':266 'omit':664 'oper':916 'optim':485 'option':765 'otherwis':204,663 'overwrit':843 'packag':503 'path':620 'path/to/relevant/file':910 'pattern':800,883,912 'perform':484 'perspect':115 'philosophi':79 'pitfal':884,913 'plan':585,622,668 'pr':2,6,10,76,91,141,156,184,187,201,210,219,224,227,229,244,246,256,258,260,276,278,285,287,293,299,305,310,312,523,546,556,586,635,639,641,682,686,688,699,702,703,735,743,757,759,763,832,845,896 'pr-summari':1,895 'preambl':15 'precis':147 'prefer':914 'preserv':154,325,359 'problem':553 'process':180 'promot':164 'provid':197 'prs':388 'purpos':447,520 'q':214,250,264,316,693 'question':515 'read':102,128,423,434,807,854 'readm':490 'refactor':478,732 'reflect':788 'relat':336 'reli':375,813 'remov':432,506,723 'report':697 'restructur':480 'review':113,160,580 'risk':539 'rule':127 'scope':767,773 'section':341,349,364,666 'session':889 'short':901 'singl':519 'skill':346,894 'skill-pr-summary' 'skip':853 'slug':23,31 'solv':557 'sourc':907,908 'source-timurgaleev' 'specif':561 'stat':274,280 'statist':378 'step':181,216,289,368,543,632,670,673,676,695 'structur':405 'success':738 'suggest':751,775 'summar':411 'summari':3,14,77,135,547,558,590,646,648,698,700,805,897 'support':869 'test':492,493,584,621,631,667 'titl':232,691,705,706,739,744,754,761,764,776,779,785,797 'topic-agent-skills' 'topic-ai-agents' 'topic-claude-code' 'topic-cursor-ide' 'topic-developer-tools' 'topic-kiro' 'topic-mcp' 'topic-prompt-engineering' 'topic-slash-commands' 'total':713 'tr':47 'track':85 'true':68 'type':898,899,911 'understand':380,427,437 'unknown':24,32 'unnecessari':171 'updat':9,78,491,505,634,679,684,701,737,740,748 'use':198,766,770,835 'user':321,356,793 'user-ad':320,355 'vagu':746,782,836 'various':839 'verif':669,672 'verifi':581,625,678,818 'vibestack':27 'view':211,228,245,252,259,269,281,311,687 'wc':41 'wip':750 'without':83,481,772,806,847 'work':583,627 'write':110,133,549,803 'yet':74","prices":[{"id":"0801bad0-e98a-47ec-939b-525e0ef87784","listingId":"792d3061-3455-448b-b063-b2a3db1a872d","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"timurgaleev","category":"vibestack","install_from":"skills.sh"},"createdAt":"2026-05-18T19:06:23.121Z"}],"sources":[{"listingId":"792d3061-3455-448b-b063-b2a3db1a872d","source":"github","sourceId":"timurgaleev/vibestack/pr-summary","sourceUrl":"https://github.com/timurgaleev/vibestack/tree/main/skills/pr-summary","isPrimary":false,"firstSeenAt":"2026-05-18T19:06:23.121Z","lastSeenAt":"2026-05-18T19:06:23.121Z"}],"details":{"listingId":"792d3061-3455-448b-b063-b2a3db1a872d","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"timurgaleev","slug":"pr-summary","github":{"repo":"timurgaleev/vibestack","stars":15,"topics":["agent-skills","ai-agents","claude-code","cursor-ide","developer-tools","kiro","mcp","prompt-engineering","slash-commands"],"license":"mit","html_url":"https://github.com/timurgaleev/vibestack","pushed_at":"2026-05-18T18:19:05Z","description":"vibestack is a portable skill pack for AI coding agents. Slash commands like /office-hours, /ship, /investigate, /tdd, /review install once and work across every agent that supports the Agent Skills open standard — Claude Code, Cursor, Kiro, and a growing list of others. ","skill_md_sha":"330b80885251f7c45f71ef441316ed02d3128df7","skill_md_path":"skills/pr-summary/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/timurgaleev/vibestack/tree/main/skills/pr-summary"},"layout":"multi","source":"github","category":"vibestack","frontmatter":{"name":"pr-summary","description":"Analyze all PR changes and update PR description with accurate summary."},"skills_sh_url":"https://skills.sh/timurgaleev/vibestack/pr-summary"},"updatedAt":"2026-05-18T19:06:23.121Z"}}