Catalog
getsentry/pr-writer

getsentry

pr-writer

Create or refresh reviewer-facing PR titles and descriptions. Use when opening a PR, updating its title or body, or preparing branch changes for review.

NewUpdated Sep 9, 2026

PR Writer

Write the PR body as a cover note for reviewers, not a changelog, template, validation log, or file-by-file summary.

Inspect the Change

Requires authenticated gh. Inspect the current branch, working tree, PR, base branch, commits, and full diff:

git branch --show-current
git status --porcelain
gh pr view --json number,title,body,url,baseRefName,headRefName
gh repo view --json defaultBranchRef

If gh pr view reports that no PR exists, continue with first-time PR creation. For an existing PR, use its baseRefName; otherwise use the repository default branch. Set BASE, then inspect:

git log "$BASE"..HEAD --oneline
git diff "$BASE"...HEAD

If on main or master, create a feature branch first. Ensure intended changes are committed and review the whole branch diff, not only the latest commit or existing PR text.

Core Rules

  • Describe concrete changed behavior, affected surfaces, and reviewer impact before implementation detail.
  • Explain motivation, risk, tradeoffs, migration, or review focus only when useful.
  • Use the smallest structure that makes the change easier to review.
  • Replace internal prompt or process terminology with specific behavior.
  • When refreshing a PR, rewrite around the current full diff without narrating review history.

Titles

Use <type>(<scope>): <subject> or <type>: <subject>.

Allowed types: feat, fix, ref, perf, docs, test, build, ci, chore, style, meta, license, and revert.

  • Describe the dominant full-branch change with the narrowest accurate type and scope.
  • Use ! only when the change breaks an external contract, and explain the affected surface in the body.
  • Avoid vague subjects such as update, cleanup, misc, fix stuff, or address feedback. Do not add a trailing period.
  • Keep an existing title only when it still describes the whole diff.

Body Shape

Choose the minimum useful shape:

Change Include
Small or obvious One concise paragraph without headings.
Feature, bug fix, or refactor Changed behavior and effect; add root cause, unchanged behavior, or non-obvious approach when relevant.
Contract or breaking change Affected API, schema, payload, config, permission, storage, or CLI surface; include compatibility and migration guidance.
Operational, visual, or workflow change User/operator effect, measured impact, failure modes, or flow when useful.
Broad, generated, or cross-cutting change Organizing principle, why the breadth is necessary, and where review should start.

Default:

<What changed and what effect it has.>

<Why the approach, risk, migration, or review focus matters, if not obvious.>

For review-feedback updates, describe the resulting PR as a whole rather than the sequence of revisions.

Reviewer Aids

Use an aid only when it reduces reviewer reconstruction work:

  • A compact before/after or interface example for changed contracts.
  • A small Mermaid diagram for async flows or state transitions.
  • A screenshot or recording note when visual evidence exists.
  • A rollout, compatibility, risk, or review-order note when reviewers or adopters need it.

Introduce an artifact with one sentence explaining what reviewers should notice. Omit it when prose is clearer.

Boundaries

  • Do not add default Summary, Changes, or Test Plan sections.
  • Omit routine validation unless it changes risk assessment or explains meaningful regression coverage. For docs, skills, copy, or config changes, omit it by default.
  • Do not paste commands, CI logs, validation dumps, commit logs, placeholders, or exhaustive file lists.
  • Never include customer or organization names, user emails, support ticket contents, secrets, or PII.
  • Use issue references only when verified from user input, branch names, commits, PR discussion, or tracker output. Fixes <issue> closes; Refs <issue> only links.

Create or Update

Create new PRs as drafts. Write the body to a temporary Markdown file, then run:

gh pr create --draft --title '<title>' --body-file /tmp/pr-body.md

Update existing PRs with gh api:

gh api -X PATCH repos/{owner}/{repo}/pulls/PR_NUMBER \
  -f title='<title>' \
  -F body=@/tmp/pr-body.md

Refresh the title and body when follow-up commits materially change scope, approach, breaking behavior, risk, migration, or review expectations. Skip typo-only, formatting-only, and rename-only follow-ups.

Examples

Small change:

The AI Customizations section now starts collapsed so it does not consume
sidebar space before users need it. Expanding it preserves the existing saved
preference behavior.

Breaking contract:

Run logs now emit chunk-level records instead of one skill-level record.
Consumers that read top-level `findings` must iterate over
`chunk.findings` for each record.

Before:

```json
{"skill": "security-review", "findings": [...]}
```

After:

```json
{"schemaVersion": 1, "chunk": {"index": 1, "findings": [...]}}
```
Files5
5 files · 26.4 KB

Select a file to preview

Overall Score

88/100

Grade

A

Excellent

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

89

Quality

87

Clarity

90

Completeness

84

Summary

The pr-writer skill guides AI agents to create and update GitHub pull requests with concise, reviewer-facing titles and descriptions. It provides structured workflow for inspecting branch state, diff scope, and existing PRs, then applies domain-specific conventions (Conventional Commits format, optional reviewer aids like before/after examples and Mermaid diagrams) to produce natural cover notes rather than boilerplate templates. The skill emphasizes judicious use of structure and artifacts, adapting body shape to change type (simple, feature, breaking, operational, or cross-cutting) and always prioritizing reviewer clarity over exhaustive documentation.

Detected Capabilities

git command execution (branch, status, log, diff)GitHub CLI (gh) commands for PR inspection and creationfile write (temporary Markdown PR body)GitHub API PATCH for updating existing PRsmarkdown formatting and Mermaid diagram construction

Trigger Keywords

Phrases that agents use to match this skill to user intent.

open pull requestupdate pr titlerefresh pr bodywrite pr descriptionreview-facing cover note

Risk Signals

INFO

Uses authenticated gh and GitHub API for PR operations

SKILL.md: Inspect the Change section
INFO

Writes temporary markdown file to /tmp/pr-body.md for PR submission

SKILL.md: Create or Update section
INFO

Explicitly documents privacy boundary: never include customer names, emails, support tickets, secrets, or PII

SKILL.md: Boundaries section
INFO

Provides explicit guidance to omit issue references unless verified from user input, branch names, commits, or PR discussion

SKILL.md: Boundaries section

Referenced Domains

External domains referenced in skill content, detected by static analysis.

www.apache.org

Use Cases

  • Opening a new GitHub PR from a committed feature branch
  • Updating an existing PR title or body when scope changes
  • Refreshing a PR after follow-up commits materially change reviewer expectations
  • Addressing review feedback with natural, concise language that avoids template boilerplate
  • Deciding when to include optional reviewer aids (before/after, schemas, Mermaid diagrams, screenshots) based on change shape

Quality Notes

  • Excellent scope clarity: SKILL.md explicitly documents what is in-scope (draft creation, updating, optional aids) and out-of-scope (commits, CI iteration, release notes, boilerplate templates)
  • Strong guardrails against anti-patterns: documented hard negatives include no default Test Plan sections, no command dumps, no template headings, and concrete examples of what not to do
  • Comprehensive evaluation framework: EVAL.md and axis.config.json provide durable regression test cases with judge criteria for title format, body concision, template avoidance, and validation omission
  • Well-structured decision flow: Core Rules section establishes clear heuristics for title selection, body shape adaptation, and artifact justification
  • Examples are practical and negative: Includes working examples (small change, breaking contract) and explicitly calls out anti-patterns (essay-like bodies, rote validation, stale titles after follow-up commits)
  • Supporting documentation is thorough: SPEC.md covers intent, scope, runtime contract, evidence sources, and known limitations; helps maintainers evaluate regressions and extend scenarios
  • Privacy-conscious defaults: Explicitly forbids PII, secrets, customer data, and undocumented issue references; treats privacy as non-negotiable
  • Clear maintenance model: Each file has a defined purpose (SKILL.md for runtime, SPEC.md for intent/gates, EVAL.md for maintainer playbook); scaling path documented for references/ subdirectory
Model: claude-haiku-4-5-20251001Analyzed: Sep 9, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

  1. v2.0

    Contract changed: description

    ✦ AINarrowed activation scope: removes rewriting PR descriptions and limits to opening or updating PRs.

    triggering2026-09-09

    LATEST
  2. v1.0

    2026-07-11

    View This VersionInitial version

Use getsentry/pr-writer in your dev environment

Command Palette

Search for a command to run...