Logo: Update Pr

Update Pr

Communautéit
tobihagemann
update-pr

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".

Iwwersiicht

Editeurtobihagemann
Repositoryturbo
Skill-Nummupdate-pr
Stären
417
Forks
32
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    tobihagemann huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Update Pr an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/tobihagemann/turbo/tree/main/claude/skills/update-pr
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tobihagemann/turbo.git /tmp/turbo
mkdir -p .claude/skills
cp -r /tmp/turbo/claude/skills/update-pr .claude/skills/update-pr
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Update Pr an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Update Pr automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Update Pr net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Update PR Title and Description

Read 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.

Step 1: Fetch Current PR

Fetch the current PR details:

bash
gh pr view [PR_NUMBER] --json number,title,body,baseRefName,commits

Omit PR_NUMBER to auto-detect from current branch.

Step 2: Analyze the Existing Style

Before drafting, study the current title and body to identify:

  • Title format — length, prefix conventions (e.g., feat:, fix:), capitalization
  • Body structure — headings, bullet points, sections, line length
  • Tone — formal vs. casual, terse vs. detailed
  • Content patterns — does it explain the "why", list changes, include test plans?
  • Diagrams — does the body contain Mermaid code blocks (sequence, state, or other)?
  • Screenshots — does the body embed uploaded images?

Step 3: Evaluate Whether an Update Is Needed

Run git fetch origin <base> so the remote ref is current before any diff below. A local branch of the same name can sit behind the remote, which puts the merge base before an already-merged pull request and pulls merged work into the description.

Read the fetched body against the current diff and list what the body leaves undescribed:

bash
git diff origin/<base>...HEAD

Check every Mermaid diagram in the body the same way, node by node and transition by transition. A diagram that omits a state still renders, so only the code reveals its staleness.

If the body and its diagrams already describe the diff, no embedded screenshot shows a look the PR has since reverted, and the session holds no final-state capture of an added or visually changed user-facing surface that the body lacks or shows in an older state, the description is up to date. Say so, then use the TaskList tool and proceed to any remaining task.

If what the body leaves undescribed is only trivial (formatting, typos, config-only), the body embeds no such screenshot, and the session holds no such capture, say so, then use the TaskList tool and proceed to any remaining task. Proceed when the body omits, misstates, or still describes behavior the diff no longer contains.

Step 4: Analyze the Full Diff

Derive 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.

  1. Work from the full diff Step 3 read (git diff origin/<base>...HEAD) — this is the primary source of truth
  2. Use what Step 3 found undescribed to understand what's new, but frame everything in the context of the whole PR
  3. Check if the changes introduce runtime flows or state transitions that warrant diagrams (see Diagrams section below)

Step 5: Run /github-voice Skill

Run the /github-voice skill to load writing style rules.

Step 6: Draft Updated Title and Description

Write an updated title and body that:

  • Matches the original style — same structure, tone, formatting, and level of detail
  • Reflects the net change — describe what the full diff shows, not the development history
  • Preserves what still applies — keep existing text that remains accurate
  • Adds what's new — integrate new changes naturally into the existing structure
  • Removes what's stale — drop descriptions of work that was reverted or replaced
  • Scopes to the target repository — write for someone who knows only the repository the PR targets; when the change is paired with work in another repository, name the interface the code calls and leave that repository's internal names, data shapes, and mechanisms out of the body; describe the change on its own terms, without reference to how a different repository or product does it
  • 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
  • Updates screenshots — leave the URL of each embedded image unaltered, removing an image only when the surface it shows is no longer part of the PR or the PR has since reverted the look it shows; add session captures as the Screenshots section directs, replacing an embedded screenshot only with a newer capture of the same surface

Step 7: Confirm with User

Output the drafted title and description as text, alongside the original for comparison, followed by the path of each capture that will upload, if any. After that, name each added surface or changed look that neither those captures nor an embedded screenshot shows in its final state, if any, with the reason it goes unshown. Then use AskUserQuestion for confirmation.

Step 8: Apply the Update

After confirmation, write the drafted title to .turbo/pr/<PR_NUMBER>-title.txt and the drafted body to .turbo/pr/<PR_NUMBER>-body.md with the Write tool, then update the PR. The title goes through a file because it carries text fetched from the PR, where backticks and $ would run inside a quoted argument.

When the body references no capture by local path, update both in one command:

bash
gh api --method PATCH "/repos/<owner>/<repo>/pulls/<PR_NUMBER>" \
  -f title="$(cat .turbo/pr/<PR_NUMBER>-title.txt)" \
  -F body=@.turbo/pr/<PR_NUMBER>-body.md

When it references captures by local path, send the title alone, then apply the body with one --attach <path> per capture, using the absolute path the body references:

bash
gh api --method PATCH "/repos/<owner>/<repo>/pulls/<PR_NUMBER>" \
  -f title="$(cat .turbo/pr/<PR_NUMBER>-title.txt)"
gh pr edit <PR_NUMBER> --body-file .turbo/pr/<PR_NUMBER>-body.md --attach <path>

When gh pr edit reports a failed upload, act on what it printed, then report which captures the PR went without:

  • No PR URL — nothing uploaded and the body was not applied. Remove each capture the body file references by local path, taking its table column with it and the table and its heading when no column remains. Then run gh pr edit <PR_NUMBER> --body-file .turbo/pr/<PR_NUMBER>-body.md without --attach.
  • A PR URL — the body was applied, referencing the captures that did not upload by local path. Fetch the posted body with gh pr view <PR_NUMBER> --json body --jq .body, remove each table column whose image is still a local path, write the result to the body file, and apply it with the same command.

Then use the TaskList tool and proceed to any remaining task.

Diagrams

GitHub renders Mermaid natively in PR descriptions via ```mermaid code blocks. Include diagrams only when they add clarity a text description can't.

Sequence Diagram

Include when the changes introduce or modify a clear runtime flow: API endpoints, event handlers, pipelines, multi-service interactions, webhook flows.

markdown
```mermaid
sequenceDiagram
  Client->>API: POST /payments
  API->>PaymentService: processPayment()
  PaymentService->>StripeClient: charge()
  StripeClient-->>PaymentService: confirmation
  PaymentService->>DB: save()
```

State Diagram

Include when the changes add or modify entity states, status enums, workflow transitions, or lifecycle hooks.

markdown
```mermaid
stateDiagram-v2
  [*] --> Draft
  Draft --> Pending: submit()
  Pending --> Approved: approve()
  Pending --> Rejected: reject()
  Approved --> [*]
```

Rules

  • Keep diagrams focused — max ~10 nodes/transitions
  • Use descriptive labels on arrows (method names, HTTP verbs)
  • Place diagrams after the summary paragraph under a ## Flow or ## State Machine heading
  • One diagram per type max — don't include both unless the PR truly has both patterns

Screenshots

Include screenshots when the PR adds a user-facing surface or changes how one looks, and this session already holds captures of that surface in its final state. Reuse those captures after viewing each one, keeping the fewest that show the change. A change in when an existing surface appears leaves its look unchanged, so add no capture of it. Take no new captures: with none on hand, leave the body's screenshots as they are.

Reference every kept capture in one row of a markdown table, with its caption in the header cell above it:

markdown
| <caption> | <caption> |
| --- | --- |
| ![<caption>](<absolute path>) | ![<caption>](<absolute path>) |

When the body already embeds screenshots, keep their layout: a replacement capture takes the old image's place, and an added capture goes beside the existing ones.

Rules

  • Use markdown image syntax with the capture's absolute path. gh points only markdown references at the uploaded asset, so a raw <img> tag keeps its local path.
  • Reference every attached capture in the body. gh appends an attached file the body never references as its own paragraph.
  • Place a new table after the summary paragraph under a ## Screenshots heading, ahead of any diagram.

Rules

  • If the existing body is empty or minimal, infer a style from the title and commit messages
  • Keep titles under 72 characters
  • Preserve any existing sections the user clearly cares about (test plans, checklists, links)
  • Don't reference .turbo/ content (filenames, acceptance criteria, step numbers, headings) in the title or body. .turbo/ is gitignored, so these references would be opaque to anyone reading without local copies.

Heefeg gestallte Froen

Wat mécht de KI-Skill Update Pr?

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".

Firwat Update Pr op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Update Pr besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Update Pr an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/tobihagemann/turbo/tree/main/claude/skills/update-pr an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Update Pr benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Update Pr benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Update Pr domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Update Pr gratis?

Jo. tobihagemann huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇