{"id":"a9a702d1-891f-477b-8594-da8d22492e22","shortId":"Qyexf8","kind":"skill","title":"update-pr","tagline":"Update an existing GitHub pull request's title and description to reflect the current state of the branch. Use when the user asks to \"update the PR\", \"update PR description\", \"update PR title\", \"refresh PR description\", or \"sync PR with changes\".","description":"# Update PR Title and Description\n\nRead the current PR title and body, analyze what changed in the session, and draft an updated title and description that preserves the original writing style.\n\n## Step 1: Fetch Current PR\n\nFetch the current PR details:\n\n```bash\ngh pr view [PR_NUMBER] --json number,title,body,baseRefName,headRefName,updatedAt,commits\n```\n\nOmit PR_NUMBER to auto-detect from current branch.\n\n## Step 2: Analyze the Existing Style\n\nBefore drafting, study the current title and body to identify:\n\n- **Title format** — length, prefix conventions (e.g., `feat:`, `fix:`), capitalization\n- **Body structure** — headings, bullet points, sections, line length\n- **Tone** — formal vs. casual, terse vs. detailed\n- **Content patterns** — does it explain the \"why\", list changes, include test plans?\n- **Diagrams** — does the body contain Mermaid code blocks (sequence, state, or other)?\n\n## Step 3: Evaluate Whether an Update Is Needed\n\nUse the PR's `updatedAt` field and commit timestamps to determine whether new commits were added since the body was last edited.\n\nIf `commits_since_body_change` is empty, the description is already up to date — say so and stop.\n\nIf there are commits since the last body change, check the incremental diff to assess significance:\n\n```bash\ngit diff origin/<base>...HEAD --diff-filter=d --stat -- $(git diff --name-only --since=\"<body_last_changed>\" origin/<base>..HEAD)\n```\n\nSkip the update if the incremental changes are trivial (formatting, typos, config-only). Proceed if they add, remove, or modify meaningful behavior.\n\n## Step 4: Analyze the Full Diff\n\nDerive the PR description from the full diff, not from individual commits. The description should reflect the net change — what the code looks like now vs. the base — not the development journey. Intermediate bug fixes, reverted approaches, and implementation pivots that happened during development are not relevant to the reader.\n\n1. Check `git diff origin/<base>...HEAD` for the full scope of changes — this is the primary source of truth\n2. Use the incremental diff (since last body edit) to understand what's new, but frame everything in the context of the whole PR\n3. Check if the changes introduce runtime flows or state transitions that warrant diagrams (see Diagrams section below)\n\n## Step 5: Draft Updated Title and Description\n\nRun `/github-voice` to load writing style rules before drafting.\n\nWrite an updated title and body that:\n\n- **Matches the original style** — same structure, tone, formatting, and level of detail\n- **Reflects the net change** — describe what the full diff shows, not the development history\n- **Preserves what still applies** — keep existing text that remains accurate\n- **Adds what's new** — integrate new changes naturally into the existing structure\n- **Removes what's stale** — drop descriptions of work that was reverted or replaced\n- **Updates diagrams** — if existing Mermaid diagrams are present, update them to reflect the current state; if they describe reverted code, remove them; if new changes warrant diagrams, add them\n\n## Step 6: Confirm with User\n\nOutput the drafted title and description as text, alongside the original for comparison. Then use `AskUserQuestion` for confirmation.\n\n## Step 7: Apply the Update\n\nAfter confirmation, update the PR:\n\n```bash\ngh pr edit <PR_NUMBER> --title \"<TITLE>\" --body \"$(cat <<'EOF'\n<BODY CONTENT HERE>\nEOF\n)\"\n```\n\n## Diagrams\n\nGitHub renders Mermaid natively in PR descriptions via ` ```mermaid ` code blocks. Include diagrams only when they add clarity a text description can't.\n\n### Sequence Diagram\n\nInclude when the changes introduce or modify a clear runtime flow: API endpoints, event handlers, pipelines, multi-service interactions, webhook flows.\n\n````markdown\n```mermaid\nsequenceDiagram\n  Client->>API: POST /payments\n  API->>PaymentService: processPayment()\n  PaymentService->>StripeClient: charge()\n  StripeClient-->>PaymentService: confirmation\n  PaymentService->>DB: save()\n```\n````\n\n### State Diagram\n\nInclude when the changes add or modify entity states, status enums, workflow transitions, or lifecycle hooks.\n\n````markdown\n```mermaid\nstateDiagram-v2\n  [*] --> Draft\n  Draft --> Pending: submit()\n  Pending --> Approved: approve()\n  Pending --> Rejected: reject()\n  Approved --> [*]\n```\n````\n\n### Rules\n\n- Keep diagrams focused — max ~10 nodes/transitions\n- Use descriptive labels on arrows (method names, HTTP verbs)\n- Place diagrams after the summary paragraph under a `## Flow` or `## State Machine` heading\n- One diagram per type max — don't include both unless the PR truly has both patterns\n\n## Rules\n\n- If the existing body is empty or minimal, infer a style from the title and commit messages\n- Keep titles under 72 characters\n- Preserve any existing sections the user clearly cares about (test plans, checklists, links)","tags":["update","turbo","tobihagemann","agent-skills","claude-code","claude-skills","developer-tools","skills"],"capabilities":["skill","source-tobihagemann","skill-update-pr","topic-agent-skills","topic-claude-code","topic-claude-skills","topic-developer-tools","topic-skills"],"categories":["turbo"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/tobihagemann/turbo/update-pr","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add tobihagemann/turbo","source_repo":"https://github.com/tobihagemann/turbo","install_from":"skills.sh"}},"qualityScore":"0.590","qualityRationale":"deterministic score 0.59 from registry signals: · indexed on github topic:agent-skills · 280 github stars · SKILL.md body (4,839 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-04-22T00:54:13.163Z","embedding":null,"createdAt":"2026-04-18T22:04:15.010Z","updatedAt":"2026-04-22T00:54:13.163Z","lastSeenAt":"2026-04-22T00:54:13.163Z","tsv":"'/github-voice':404 '/payments':605 '1':77,335 '10':657 '2':111,354 '3':175,378 '4':280 '5':397 '6':510 '7':533 '72':718 'accur':454 'ad':197 'add':273,455,507,568,624 'alongsid':522 'alreadi':214 'analyz':57,112,281 'api':588,603,606 'appli':448,534 'approach':321 'approv':646,647,651 'arrow':663 'ask':26 'askuserquest':529 'assess':236 'auto':105 'auto-detect':104 'base':312 'baserefnam':96 'bash':86,238,542 'behavior':278 'block':169,562 'bodi':56,95,123,135,165,200,207,229,361,417,547,701 'branch':21,109 'bug':318 'bullet':138 'capit':134 'care':727 'casual':146 'cat':548 'chang':44,59,158,208,230,262,303,346,382,434,461,504,580,623 'charact':719 'charg':611 'check':231,336,379 'checklist':731 'clariti':569 'clear':585,726 'client':602 'code':168,306,499,561 'commit':99,189,195,205,225,296,713 'comparison':526 'config':268 'config-on':267 'confirm':511,531,538,614 'contain':166 'content':150 'context':373 'convent':130 'current':17,52,79,83,108,120,493 'd':246 'date':217 'db':616 'deriv':285 'describ':435,497 'descript':13,33,39,49,69,212,288,298,402,472,519,558,572,660 'detail':85,149,430 'detect':106 'determin':192 'develop':315,328,443 'diagram':162,391,393,481,485,506,551,564,576,619,654,669,682 'diff':234,240,244,249,284,292,338,358,439 'diff-filt':243 'draft':64,117,398,411,516,641,642 'drop':471 'e.g':131 'edit':203,362,545 'empti':210,703 'endpoint':589 'entiti':627 'enum':630 'eof':549,550 'evalu':176 'event':590 'everyth':370 'exist':6,114,450,465,483,700,722 'explain':154 'feat':132 'fetch':78,81 'field':187 'filter':245 'fix':133,319 'flow':385,587,598,676 'focus':655 'formal':144 'format':127,265,426 'frame':369 'full':283,291,343,438 'gh':87,543 'git':239,248,337 'github':7,552 'handler':591 'happen':326 'head':137,242,255,340,680 'headrefnam':97 'histori':444 'hook':635 'http':666 'identifi':125 'implement':323 'includ':159,563,577,620,688 'increment':233,261,357 'individu':295 'infer':706 'integr':459 'interact':596 'intermedi':317 'introduc':383,581 'journey':316 'json':92 'keep':449,653,715 'label':661 'last':202,228,360 'length':128,142 'level':428 'lifecycl':634 'like':308 'line':141 'link':732 'list':157 'load':406 'look':307 'machin':679 'markdown':599,636 'match':419 'max':656,685 'meaning':277 'mermaid':167,484,554,560,600,637 'messag':714 'method':664 'minim':705 'modifi':276,583,626 'multi':594 'multi-servic':593 'name':251,665 'name-on':250 'nativ':555 'natur':462 'need':181 'net':302,433 'new':194,367,458,460,503 'nodes/transitions':658 'number':91,93,102 'omit':100 'one':681 'origin':73,241,254,339,421,524 'output':514 'paragraph':673 'pattern':151,696 'paymentservic':607,609,613,615 'pend':643,645,648 'per':683 'pipelin':592 'pivot':324 'place':668 'plan':161,730 'point':139 'post':604 'pr':3,30,32,35,38,42,46,53,80,84,88,90,101,184,287,377,541,544,557,692 'prefix':129 'present':487 'preserv':71,445,720 'primari':350 'proceed':270 'processpay':608 'pull':8 'read':50 'reader':334 'reflect':15,300,431,491 'refresh':37 'reject':649,650 'relev':331 'remain':453 'remov':274,467,500 'render':553 'replac':479 'request':9 'revert':320,477,498 'rule':409,652,697 'run':403 'runtim':384,586 'save':617 'say':218 'scope':344 'section':140,394,723 'see':392 'sequenc':170,575 'sequencediagram':601 'servic':595 'session':62 'show':440 'signific':237 'sinc':198,206,226,253,359 'skill' 'skill-update-pr' 'skip':256 'sourc':351 'source-tobihagemann' 'stale':470 'stat':247 'state':18,171,387,494,618,628,678 'statediagram':639 'statediagram-v2':638 'status':629 'step':76,110,174,279,396,509,532 'still':447 'stop':221 'stripecli':610,612 'structur':136,424,466 'studi':118 'style':75,115,408,422,708 'submit':644 'summari':672 'sync':41 'ters':147 'test':160,729 'text':451,521,571 'timestamp':190 'titl':11,36,47,54,67,94,121,126,400,415,517,546,711,716 'tone':143,425 'topic-agent-skills' 'topic-claude-code' 'topic-claude-skills' 'topic-developer-tools' 'topic-skills' 'transit':388,632 'trivial':264 'truli':693 'truth':353 'type':684 'typo':266 'understand':364 'unless':690 'updat':2,4,28,31,34,45,66,179,258,399,414,480,488,536,539 'update-pr':1 'updatedat':98,186 'use':22,182,355,528,659 'user':25,513,725 'v2':640 'verb':667 'via':559 'view':89 'vs':145,148,310 'warrant':390,505 'webhook':597 'whether':177,193 'whole':376 'work':474 'workflow':631 'write':74,407,412","prices":[{"id":"36f89c76-53f4-4318-9158-8c88115ee97e","listingId":"a9a702d1-891f-477b-8594-da8d22492e22","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"tobihagemann","category":"turbo","install_from":"skills.sh"},"createdAt":"2026-04-18T22:04:15.010Z"}],"sources":[{"listingId":"a9a702d1-891f-477b-8594-da8d22492e22","source":"github","sourceId":"tobihagemann/turbo/update-pr","sourceUrl":"https://github.com/tobihagemann/turbo/tree/main/skills/update-pr","isPrimary":false,"firstSeenAt":"2026-04-18T22:04:15.010Z","lastSeenAt":"2026-04-22T00:54:13.163Z"}],"details":{"listingId":"a9a702d1-891f-477b-8594-da8d22492e22","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"tobihagemann","slug":"update-pr","github":{"repo":"tobihagemann/turbo","stars":280,"topics":["agent-skills","claude-code","claude-skills","developer-tools","skills"],"license":"mit","html_url":"https://github.com/tobihagemann/turbo","pushed_at":"2026-04-21T12:22:12Z","description":"A composable dev process for Claude Code, packaged as modular skills.","skill_md_sha":"0c712f482bbe7cc57610ced283434acbe3008594","skill_md_path":"skills/update-pr/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/tobihagemann/turbo/tree/main/skills/update-pr"},"layout":"multi","source":"github","category":"turbo","frontmatter":{"name":"update-pr","description":"Update an existing GitHub pull request's title and description to reflect the current state of the branch. Use when the user asks to \"update the PR\", \"update PR description\", \"update PR title\", \"refresh PR description\", or \"sync PR with changes\"."},"skills_sh_url":"https://skills.sh/tobihagemann/turbo/update-pr"},"updatedAt":"2026-04-22T00:54:13.163Z"}}