Generates structured titles and descriptions for pull requests in the tldraw repository.
Install
mkdir -p .claude/skills/write-pr && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2608" && unzip -o skill.zip -d .claude/skills/write-pr && rm skill.zipInstalls to .claude/skills/write-pr
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Reference standards for writing pull request titles and descriptions in the tldraw repository. Use as supporting guidance when another skill or workflow needs PR content standards, not as the user-facing create/update PR workflow.Key capabilities
- →Draft PR titles using conventional commits
- →Structure PR descriptions for reviewers
- →Generate code change tables
- →Include API change summaries
How it works
The skill provides a template and guidelines that prioritize reviewer needs, using an inverted pyramid structure and specific sections for API and code changes.
Inputs & outputs
When to use write-pr
- →Create new pull request content
- →Update PR description
- →Generate PR titles based on changes
About this skill
Writing pull requests
Standards for PR titles and descriptions in tldraw/tldraw.
Write for the reviewer (read this first)
This is the governing rule; everything below serves it. Write the description for a reviewer who knows the codebase architecture but has not read your code or the diff. Their time is the scarce resource. The description's job is to give them the framing they can't get from the code, then get out of the way.
Default to short. A few sentences of framing is the norm, not the exception. Match length to the change: a one-line fix needs a sentence; a new system needs the fuller treatment. A description that looks long and structured is not more valuable — often it's less, because it buries the framing under scaffolding. If a reviewer would need their own AI to interpret yours, it has failed.
Order it coarse to granular. Structure the description as an inverted pyramid, most important first. A reader should be able to stop at any point and leave with a correct, coherent understanding: a skimmer gets the goal and motivation from the opening lines; someone weighing the approach reads into the design and decisions; a close reviewer continues to the specifics. Never make someone read to the end to find out what the PR is for.
Cover the following, roughly in this order — each layer more detailed than the last, and each optional once the change no longer warrants it:
- Goal, motivation, and use case. Why this change, why now, what it's for. What was wrong or missing before. This comes first, always.
- The higher-level change. The shape of the solution — behavior and structure, not a line-by-line restatement of the diff.
- API design and decisions. New or changed public surface, the approach you picked, what you ruled out and why, and anything you're unsure about. A decision you don't surface is one the reviewer can't catch.
- Example snippets and fine detail. For anything touching an API, data shape, or usage pattern, a few lines of before/after say more than a paragraph. Keep them minimal.
Do not:
- Restate the diff. No file-by-file walkthrough, no narrating what a function does, no describing how the code works step by step. Reviewers can read code.
- Generate tables or lists that mirror the code — a
Method | Descriptiontable that just re-says the signatures, an inventory of every changed file, a term glossary of self-explanatory names. - Pad with ceremony. Structure that exists to look thorough is noise.
Never invent the why. The motivation and trade-offs must come from real intent — the commits, the linked issue, or the author. If you don't know why a change was made or what was considered, ask the user; do not guess. A confident but fabricated rationale is worse than useless: it's misleading, and it's the thing reviewers most need to trust.
PR title
Use semantic PR titles (Conventional Commits format):
<type>(<scope>): <description>
Types
feat- New featurefix- Bug fixdocs- Documentation onlyrefactor- Code change that neither fixes a bug nor adds a featureperf- Performance improvementtest- Adding or fixing testschore- Maintenance tasks
Scope (optional)
A noun describing the affected area: fix(editor):, feat(sync):, docs(examples):
Examples
feat(editor): add snap threshold configuration optionfix(arrows): correct binding behavior with rotated shapesdocs: update sync documentationrefactor(store): simplify migration system
PR body
Bug fix and improvement PRs (bugfix and improvement change types) use the before/after template below. Everything else uses this one:
<description paragraph>
### Change type
- [x] `bugfix` | `improvement` | `feature` | `api` | `other`
### Test plan
1. Step to test...
2. Another step...
- [ ] Unit tests
- [ ] End to end tests
### Release notes
- Brief description of changes for users
Description paragraph
Start with: "In order to X, this PR does Y." Follow the reviewer-first rules at the top of this skill.
- X is the concrete situation that made this work necessary — the real thing someone was trying to do — not a restatement of what Y does. "In order to let apps carry undo history across editor rebuilds, this adds an API to carry undo history across editor rebuilds" is circular: X just renames Y. Push X up a level to the actual goal, e.g. "so desktop can reload the editor without losing the user's place, the way HMR preserves component state across a code edit."
- Name the real driving case, not a hypothetical. If you're inventing example scenarios to illustrate the why ("e.g. if someone toggled a plugin…"), you're reverse-engineering a justification from the finished code — you haven't written down the case that actually prompted it. Work forward from that case instead.
- Beware abstract mechanism as a stand-in for motivation. A true technical fact about the SDK ("editor config is fixed at construction time") explains a constraint, not why anyone cares. Keep going until a reader can picture the specific thing that stopped working or became possible.
- Keep it specific - avoid vague phrases like "improve user experience"
- Link related issues in the first paragraph
- Don't expect readers to also read the linked issue
Bug fix and improvement PRs
Bug fix and improvement PRs use a fixed shape instead of the description paragraph. The same reviewer-first rules apply; the structure exists so a reviewer can see what was wrong (or lacking), what it does now, and why, without reading the diff.
This PR fixes a bug where <symptom a user or developer would hit>.
### Before
<what the code did and why that produced the symptom>
### After
<what the code does now>
### Implementation notes
<optional: what exactly changed and how — decisions, trade-offs, anything non-obvious>
### Change type
- [x] `bugfix` | `improvement`
### Test plan
- [x] Unit tests — the new test fails on `main` and passes with this change
### Release notes
- Fix <symptom> | Improve <behavior>
### Code changes
| Section | LOC change |
| --------- | ---------- |
| Core code | +10 / -2 |
| Tests | +5 / -0 |
- Intro — one sentence. For a bug: "This PR fixes a bug where X," where X is the observable symptom, not the cause or the fix. For an improvement: "This PR improves X so that Y," where Y is what a user or developer can now do. Link the issue here if there is one. If the PR does more than one thing, add a second sentence ("It also ...") rather than a list.
- Before — the behavior before, and the mechanism that produced it. For a bug, name the function or path at fault; this is the one place a short description of how the old code went wrong belongs, because it is the cause the reviewer is checking the fix against. For an improvement, describe what the user or developer had to do (or couldn't do) and what in the code made it that way.
- After — the behavior after. State what the code now does, at the same level of detail as Before. Note any spec or doc that was updated alongside.
- Implementation notes — optional. Include only when there is something the Before/After pair doesn't carry: an approach you chose over another, a subtlety in the change, a follow-up you deliberately left out. Skip the heading entirely when there is nothing to say; most small fixes have nothing.
- The
### Change type/### Test plan/### Release notes/### API changes/### Code changesblocks follow as usual. For bug fixes, say in the test plan whether the new tests fail onmain.
tldraw/tldraw#10117, #10118, and #10119 are worked examples of bug fixes in this shape.
Before and after recordings
When a bug fix or improvement changes how a canvas interaction behaves — a drag, resize, rotate, crop, handle, or tool gesture that a reviewer would otherwise have to run locally to see — put a short recording in each of the Before and After sections. Prose describes the mechanism; the recordings show the symptom and its absence, and reviewers trust them more than a description of a jump or a jitter. Skip this for changes that are not visible on the canvas (data, API, docs, tooling).
scripts/record-interaction.mjs records a scripted interaction against the running examples app as a 16:9 MP4. It hides the tldraw chrome, injects a visible cursor (headless recordings have none), runs a scenario module, trims the setup frames, and transcodes with ffmpeg. scripts/example-scenario.mjs is a starting point; copy it to a scratch location and change the body to the interaction the PR affects. Do not commit scenarios.
It needs ffmpeg on the path and a Playwright Chromium build. Install scripts are disabled in this repo, so the browser is not downloaded by pnpm install; run pnpm exec playwright install chromium once. Then, from the repo root with pnpm dev serving the examples app:
# After: the current branch
node skills/write-pr/scripts/record-interaction.mjs <scenario.mjs> <scratch>/after.mp4
# Before: main's versions of the files this branch modifies, hot-reloaded by vite
git diff --name-only --diff-filter=M origin/main...HEAD | xargs git checkout origin/main --
sleep 10
node skills/write-pr/scripts/record-interaction.mjs <scenario.mjs> <scratch>/before.mp4
git diff --name-only --diff-filter=M origin/main...HEAD | xargs git checkout HEAD --
git status --porcelain # must be empty before continuing
Restrict the checkout to modified files: checking out a whole directory from main also stages files that only exist there, and files added on this branch have no main version to restore. Only use this approach when the working tree is clean.
Rules for the recordings themselves:
- Same scenario for both. The two videos must differ only in the code under test, so the reviewer compares like with like. Record After first, confirm the scenario shows the behavior, th
Content truncated.
When not to use it
- →Non-tldraw repository PRs
- →Automated PR generation without human context
Prerequisites
Limitations
- →Requires human-provided motivation
- →Must preserve existing human notes byte-for-byte
How it compares
It enforces repository-specific standards for PR content, focusing on reviewer efficiency rather than just summarizing the diff.
Compared to similar skills
write-pr side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| write-pr (this skill) | 4 | 2mo | No flags | Beginner |
| documentation-review | 11 | 6mo | No flags | Beginner |
| docs-review | 10 | 9mo | No flags | Beginner |
| workthrough | 10 | 10mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by tldraw
View all by tldraw →You might also like
documentation-review
stacklok
Reviews documentation for factual accuracy
docs-review
metabase
Review documentation changes for compliance with the Metabase writing style guide. Use when reviewing pull requests, files, or diffs containing documentation markdown files.
workthrough
bear2u
Automatically document all development work and code modifications in a structured workthrough format. Use this skill after completing any development task, bug fix, feature implementation, or code refactoring to create comprehensive documentation.
claude-md-improver
anthropics
Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project memory optimization".
anti-slop
rand
Comprehensive toolkit for detecting and eliminating "AI slop" - generic, low-quality AI-generated patterns in natural language, code, and design. Use when reviewing or improving content quality, preventing generic AI patterns, cleaning up existing content, or enforcing quality standards in writing, code, or design work.
agent-md-refactor
davila7
Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.