pr-description

Schreibe PR-Beschreibungen und Release-Notes für das Sanity-Monorepo. Folgt der PR-Vorlage des Repos mit Beschreibung, Was zu überprüfen ist, Tests und Hinweise für…

npx skills add https://github.com/sanity-io/sanity --skill pr-description

PR Description & Release Notes

When creating a PR

Follow the repo's PR template. Always create PRs as drafts. All AI-agent PRs must include the 🤖 bot label.

1. Analyze the changes

Before writing, understand the full diff:

git log main..HEAD --oneline
git diff main...HEAD

2. PR title

Must follow conventional commits (CI-enforced):

type(scope): lowercase description
  • Types: feat, fix, chore, docs, refactor, test, perf, ci
  • Scope: package or area affected (groq, cli, form, schema, deps, etc.)
  • No backticks, quotes, or markdown in the title
  • Description starts lowercase

3. Write the PR body

Lead with why. Only elaborate on the non-obvious. The reviewer can read the diff — they need the context the diff can't give them. Default to terse; expand only where a reader would genuinely wonder.

Priorities for the Description section:

  • Heavy on why — the motivation, the problem being solved, the constraint or incident that forced this change
  • Cover why not — alternatives considered and rejected, one sentence each. This is often the most valuable part: it prevents the reviewer from suggesting a path you've already ruled out. Skip if there were no real alternatives worth mentioning
  • Light on how — only call out approach when it's non-obvious, novel, or a reviewer might reasonably have picked a different path. Skip it for routine changes where the diff speaks for itself
  • Minimal what — the diff shows what changed. One sentence of orientation at most; don't restate file-by-file changes the reviewer can see

Length test: if a sentence would tell the reviewer something they could deduce in 10 seconds from the diff, cut it. A good PR description is often 3–5 sentences total. Bulleted lists of "alternatives considered" should be one line per alternative, not a paragraph.

If you catch yourself writing "this PR renames X to Y" or "adds a new function Z", delete it. If you're explaining why X needed to be renamed or why Z exists (and why the obvious alternative wasn't chosen), keep it — but stay brief.

Use all four sections:

Description

Focus on why and why not, tersely:

  • The problem or context the diff doesn't reveal (one short paragraph)
  • Alternatives considered and why rejected (one line each, only if they were real candidates)
  • How only when non-obvious or debatable
  • What reduced to a one-line orientation

What to review

  • Which files/areas matter most
  • Anything tricky or non-obvious
  • Which packages are affected (this is a monorepo)

Testing

  • Tests added or modified
  • If no automated tests: how you tested and why automation wasn't practical

Notes for release

This section is used by the docs team to write release notes.

If not needed, write one of:

  • N/A — internal-only changes
  • N/A – Part of feature X — partial implementation not yet enabled
  • N/A – Internal only — tooling/chore work

If needed, write for end users and the docs team:

  • What changed from a user perspective
  • How to use it (code snippets if applicable)
  • Limitations or breaking changes

Always end this section with a --- horizontal rule. The release-notes automation stops at the first --- after the "Notes for release" heading, so the rule fences off anything appended below (Cursor Bugbot reviews, later edits) and keeps it out of the changelog.

4. Create the PR

Always create as draft and apply the 🤖 bot label. Do not mark as ready for review until CI passes and the prompter approves.

gh pr create --draft --label "🤖 bot" --title "type(scope): description" --body "$(cat <<'EOF'
### Description

[what and why]

### What to review

[guidance for reviewers]

### Testing

[tests added or manual testing explanation]

### Notes for release

[release notes or N/A]

---
EOF
)"

If the label was omitted at create time:

gh pr edit --add-label "🤖 bot"

After CI is green and the prompter approves, mark ready for review:

gh pr ready

Keep internal details out

PR descriptions are public. Write them free of:

  • Customer, client, and organization names
  • Project IDs, dataset names, domains, and URLs
  • People's names
  • Customer-specific schema or field names
  • Support tickets and support case details
  • Internal system, service, and architecture details
  • Long-term architecture direction, unreleased plans, roadmap, and company strategy
  • Any other sensitive internal information

Describe the problem generically: "multi-region workspaces with role-based access" in place of a customer's name. Reference a ticket by its ID or link, or say it came from Slack. When a source (ticket, Slack thread, support case, conversation) contains such details, the description states the problem generically and the specifics go in the report to the user, never in the body.

Release notes checklist

  • Description contains none of the details in "Keep internal details out": scrubbed or rewritten generically, with anything scrubbed flagged in the report to the user
  • Written for end users, not internal engineers
  • Includes code snippets for new APIs or changed behavior
  • Mentions breaking changes prominently
  • No unexplained jargon
  • Concise — a paragraph plus code example is ideal

Mehr Skills von sanity-io

Agent Development
sanity-io
Diese Fähigkeit sollte verwendet werden, wenn der Benutzer darum bittet, "einen Agenten zu erstellen", "einen Agenten hinzuzufügen", "einen Subagenten zu schreiben", "Agenten-Frontmatter", "wann die Beschreibung verwendet werden soll", "Agent…
code-review-and-quality
sanity-io
Führt eine mehrdimensionale Code-Überprüfung durch. Vor dem Zusammenführen von Änderungen verwenden. Verwenden, wenn Sie Code überprüfen, der von Ihnen selbst, einem anderen Agenten oder einem Menschen geschrieben wurde. Verwenden, wenn Sie…
code-simplification
sanity-io
Vereinfacht Code für mehr Klarheit. Verwenden Sie dies beim Refactoring von Code zur Verbesserung der Lesbarkeit, ohne das Verhalten zu ändern. Verwenden Sie dies, wenn Code funktioniert, aber schwerer zu lesen, zu warten oder zu erweitern ist…
Command Development
sanity-io
Diese Fähigkeit sollte verwendet werden, wenn der Benutzer darum bittet, "einen Slash-Befehl zu erstellen", "einen Befehl hinzuzufügen", "einen benutzerdefinierten Befehl zu schreiben", "Befehlsargumente zu definieren", "einen Befehl zu verwenden…
content-experimentation-best-practices
sanity-io
Strukturierte Anleitung für die Konzeption, Durchführung und Analyse von Content-Experimenten zur Verbesserung von Conversion und Engagement. Behandelt Hypothesen-Frameworks, Metrikauswahl, Stichprobengrößenberechnung und statistische Signifikanztests bei A/B- und multivariaten Experimenten. Enthält detaillierte Ressourcen zu p-Werten, Konfidenzintervallen, Power-Analyse und Bayes'schen Methoden zur Ergebnisinterpretation. Bietet CMS-Integrationsmuster für die Verwaltung von Varianten auf Feldebene und die Anbindung externer...
content-modeling-best-practices
sanity-io
Strukturierte Content-Modellierungsanleitung für Schema-Design, Wiederverwendbarkeit und Multi-Channel-Auslieferung. Behandelt Kernprinzipien: Behandlung von Inhalten als Daten statt als Seiten, Aufrechterhaltung einzelner Quellen der Wahrheit, Design für zukünftige Kanäle und Optimierung für Redaktionsworkflows. Enthält Entscheidungsrahmen für Referenzen versus eingebettete Objekte, Trennung von Belangen und Content-Wiederverwendungsmuster. Bietet Taxonomie- und Klassifikationsanleitung für flache, hierarchische und facettierte Ansätze. Gilt für...
create-agent-with-sanity-context
sanity-io
Erstelle KI-Agenten mit strukturiertem Zugriff auf Sanity-Inhalte über Sanity Context. Verwende dies beim Einrichten eines Sanity-gestützten Chatbots, beim Verbinden eines KI-Assistenten mit Sanity…
dial-your-context
sanity-io
Interaktive Sitzung zur Erstellung von Inhalten für das Instructions-Feld des Sanity Context MCP-Servers. Verwenden Sie diese Fähigkeit, wenn Benutzer die Anpassung des Agentenkontexts erwähnen,…