Write pr

From PyModel/pythinker-code · View interactive version

Write pr is an AI agent skill from the GitHub repository PyModel/pythinker-code. Use when creating or updating a pull request in this repository — how to fill in each section of the PR template with concise, reviewer-friendly content, including the behavior-change table.

How to use this skill

Skill file

Write PR Description

Create or update the pull request for the current branch with a description that helps the

reviewer understand why the change exists, the shape of the implementation, and what existing

users lose.

Workflow

  1. Read the PR template:

Read(.github/pull_request_template.md)

  1. Identify or create the pull request:
  1. Gather the context needed to explain the change:

behavior and ownership.

  1. Write the description following the template sections. The body is in English, the PR title

stays an English Conventional Commit, and changesets stay English (see the gen-changesets

skill); section headings follow the template verbatim:

when the issue already covers it.

views (see below) over prose whenever they explain the change better.

modules and test coverage; see "Behavior Changes and Affected Users".

  1. Publish the description:

gh pr create --body-file <path>.

Behavior Changes and Affected Users

This section answers one question: after this merges, what do existing users lose? Most

regressions in this repository came from nobody answering it, not from logic errors.

Criterion: **any input that worked before the change — a config key, an environment variable, a

command-line flag, a provider response shape, session data written by an older version, a client

request, or a hook payload — must behave the same after it, unless the change is declared here

with a way back.**

How to write it:

  1. List every observable behavior the diff changes, one row each. Include behavior you consider

"unchanged" whose branch conditions moved: does a new condition now match existing inputs

before the old one; who reached a deleted or narrowed branch before. Internal packages ship in

the CLI release; "internal" does not mean invisible to users. The table shape (example in

English):

| Behavior | Before | After | Who relies on the old behavior | Escape hatch |

|---|---|---|---|---|

| reasoning parsing when reasoning_details is an array | string reasoning also read | string ignored | OpenAI-compatible gateways that send both forms | none |

  1. Name populations, never "some users". Take them from

.agents/skills/review-pr/surfaces.md: clients (TUI, print mode, desktop, web, inspector,

VS Code, ACP, SDK), provider dialects, platforms, configuration states, data written by older

versions, external scripts.

  1. Changed prompt text (system prompt, tool descriptions, reminders): one row per sentence — what

the sentence enforced before, who relied on it, what enforces it now. "No test references the

sentence" is not evidence of no impact.

  1. Replacements and bypasses (refactors, runtime rebinding, protocol swaps): additionally list

the old path's feature inventory — which env vars it honored, which fallbacks it had, which

inputs it accepted — and where each item lives in the new path.

  1. Genuinely no observable change: write None, with evidence — which branches, defaults, and

contract files are untouched.

  1. After the table: affected modules and the test coverage for each row. A flipped default or a

removed behavior must have a test pinning the old behavior for the population that keeps it,

and a changeset naming what users lose (see the gen-changesets skill). When there is no way

back, ask a maintainer to approve it explicitly in the PR.

Visual Outline for What changed

Prefer structural views over prose. Use the smallest combination that explains the

implementation. Omit categories that did not change.

Show logic or algorithm changes as a pseudocode diff:

  on(save)
-   persist immediately
+   debounce 300ms then persist
+   mark state dirty

Show runtime control flow as a call tree diff:

  submitForm
    validate
    persist
+   trackAnalytics
+   if (subscribed)
+     subscribeToEvents

Show file responsibility changes as a shallow file tree diff:

  src/
    session/
      store.ts
+     selectors.ts
+     stream/
+       parse.ts

Show component or UI structure changes as a tree diff:

  <SessionPage>
    <SessionList />
+   <SessionToolbar />
    <MessageStream />
+   <SkillResultCard />
  </SessionPage>

Show component interaction, control flow, or data flow with Mermaid (especially useful for

explaining bug mechanics):

sequenceDiagram
    UI->>Daemon: submit
    Daemon->>Worker: stream
    Worker-->>Daemon: chunk
    Daemon-->>UI: stream result

Show key data structure or type changes in a language-specific block:

interface SessionEvents {
  delta: string;
  done: boolean;
}

Rules for visual outlines:

diff notation would obscure ownership or order.

structures first, whichever fits.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.