PR title and description writer

Writes or refreshes a PR title in Sentry's conventional format and a short reviewer-facing description without template headings or test logs, then opens a draft or updates the PR. Use when opening a PR or after commits change its scope.

Git & PRsPack: Sentry skills160 linespr-writer
Author
Source
getsentry/skills/skills/pr-writer @ a582c51
License
Apache-2.0 · Copyright 2025 Functional Software, Inc. dba Sentry

About this skill

What it does

The skill writes or refreshes a PR title and description as a short cover note for reviewers: changed behavior and its reach first, then why, risk or migration where that helps. It reads the existing PR, the commits and the full diff against the base, not just the last commit. On main or master it creates a feature branch first.

Titles follow Sentry's <type>(<scope>): <subject> with a fixed type list and ! only for a broken external contract; vague subjects like "update" are banned. The body takes the smallest shape that fits: one paragraph for a small change, root cause for a fix, before/after examples and migration notes for a contract change, a starting point for a broad one. A Mermaid diagram or rollout note appears only when it saves review work.

Left out by default: Summary and Test Plan headings, pasted commands and CI logs, commit lists, file-by-file tours, customer names and PII. Issue references must be verified; repository PR templates are ignored. A new PR opens as a draft; an existing one is rewritten around the whole diff through gh api, without narrating review rounds.

SPEC.md is the maintainers' contract; EVAL.md and evals/ hold an AXIS regression case for Codex (npx @netlify/axis) that assumes Sentry's repository layout. Neither is needed to use the skill.

When to use it, and when not

Use it when opening a PR or after commits that change its scope; the spec has it refresh the PR then unasked. It needs an authenticated gh.

Skip it if your team requires its PR template or a Test Plan section: the skill drops both. Commits, release notes and CI fixes are outside it.

How to run it

The install command below puts the folder in place. The agent picks the skill up by its description; to call it yourself:

  • Claude Code: /pr-writer, or ask for the skill by name.
  • Codex: $pr-writer.
  • Cursor: type / in the Agent chat and pick pr-writer.

Example: /pr-writer Refresh the title and description of PR 812 after today's commits.

How it differs from similar skills

PR description writer from our catalog fills the repository's template or its own Why / What / How tested / Risks sections, and opens the PR only on request. pr-writer keeps to prose, drops test logs and opens a draft itself. Conventional commit messages from the same pack uses the same type list, so titles and commits match.

Install

Run one command — it saves SKILL.md and the files it uses into your agent's skills folder. Claude Code and Codex pick up a new skill without a restart; if it does not show up, restart the agent.

Claude Code — macOS, Linux
curl -fsSL --create-dirs -o ~/.claude/skills/pr-writer/SKILL.md https://anymodel.org/en/skills/sentry/pr-writer/SKILL.md -o ~/.claude/skills/pr-writer/EVAL.md https://anymodel.org/en/skills/sentry/pr-writer/EVAL.md -o ~/.claude/skills/pr-writer/LICENSE https://anymodel.org/en/skills/sentry/pr-writer/LICENSE -o ~/.claude/skills/pr-writer/SPEC.md https://anymodel.org/en/skills/sentry/pr-writer/SPEC.md -o ~/.claude/skills/pr-writer/evals/axis.config.json https://anymodel.org/en/skills/sentry/pr-writer/evals/axis.config.json -o ~/.claude/skills/pr-writer/evals/scenarios/concise-docs-pr.json https://anymodel.org/en/skills/sentry/pr-writer/evals/scenarios/concise-docs-pr.json
Codex, Cursor — macOS, Linux
curl -fsSL --create-dirs -o ~/.agents/skills/pr-writer/SKILL.md https://anymodel.org/en/skills/sentry/pr-writer/SKILL.md -o ~/.agents/skills/pr-writer/EVAL.md https://anymodel.org/en/skills/sentry/pr-writer/EVAL.md -o ~/.agents/skills/pr-writer/LICENSE https://anymodel.org/en/skills/sentry/pr-writer/LICENSE -o ~/.agents/skills/pr-writer/SPEC.md https://anymodel.org/en/skills/sentry/pr-writer/SPEC.md -o ~/.agents/skills/pr-writer/evals/axis.config.json https://anymodel.org/en/skills/sentry/pr-writer/evals/axis.config.json -o ~/.agents/skills/pr-writer/evals/scenarios/concise-docs-pr.json https://anymodel.org/en/skills/sentry/pr-writer/evals/scenarios/concise-docs-pr.json
Claude Code — Windows PowerShell
foreach ($f in 'SKILL.md','EVAL.md','LICENSE','SPEC.md','evals/axis.config.json','evals/scenarios/concise-docs-pr.json') { $p = Join-Path "$HOME\.claude\skills\pr-writer" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/sentry/pr-writer/$f" -UseBasicParsing -OutFile $p }
Codex, Cursor — Windows PowerShell
foreach ($f in 'SKILL.md','EVAL.md','LICENSE','SPEC.md','evals/axis.config.json','evals/scenarios/concise-docs-pr.json') { $p = Join-Path "$HOME\.agents\skills\pr-writer" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/sentry/pr-writer/$f" -UseBasicParsing -OutFile $p }

Any other agent: save the file into its skills folder, or give it the link to the file: https://anymodel.org/en/skills/sentry/pr-writer/SKILL.md

SKILL.md

Raw

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": [...]}}
```

Connect through AnyModel API

This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.

More from the pack Sentry skills

AGENTS.md and CLAUDE.md writer

Writes or trims a repository's AGENTS.md to under 60 lines of commands, conventions and pointers to existing docs, checks every path, and makes CLAUDE.md a symlink to it. Use when a repo needs agent instructions or its current file has grown long or stale.

Claude Code settings audit

Detects a repository's stack and proposes a Claude Code settings.json allow list of read-only commands for the tools it actually uses, plus docs domains and Sentry or Linear MCP entries. Use when setting up Claude Code permissions or auditing existing ones.

Code review, Sentry practices

Reviews a change by Sentry's guidelines: runtime errors, performance and N+1 queries, side effects, compatibility, security, design and tests, with a polite tone and approval once only minor issues remain. Use when reviewing a pull request or branch.

Code simplifier

Simplifies recently changed code without changing behaviour: less nesting, no nested ternaries, clearer names, no redundant abstractions, while following CLAUDE.md conventions. Use when code works but reads heavier than it should and needs a cleanup pass.

Conventional commit messages

Commits in Sentry's Conventional Commits style: a feature branch instead of main, a typed capitalised subject up to 70 characters, Fixes or Refs footers, no personal data. Use when asked to commit changes or draft a commit message.

Django access control review

Audits Django and DRF code for IDOR and broken access control by learning the app's authorization model and tracing each endpoint from ID to query, reporting only confirmed gaps with enforcing fixes. Use when reviewing views, viewsets or tenant isolation.

Find bugs in branch changes

Reviews the commits on the current branch for security holes, bugs and quality issues with an eleven-item checklist and reports verified findings with file, line, severity and fix, without editing code. Use when you want a security-first pass before a PR.

GitHub Actions security review

Audits GitHub Actions workflows for attacks an outsider without write access can run: pwn requests, expression injection, comment commands, token theft, poisoned agent configs, unpinned actions. Use when reviewing CI security or changing workflows.

Iterate a PR until CI is green

Drives an open PR to green: fixes failing CI and high and medium review comments, verifies locally, commits, pushes and repeats, stopping at human approval or draft gates. Use when a PR is red or has review feedback to work through.

Prompt optimizer

Writes, repairs or ports system and agent prompts against a small eval set, comparing candidate rewrites on the same cases and checking the winner on held-out ones. Use when a prompt is unreliable, moves to another model family or needs evals.

Secret leaks through serialization

Finds secrets that leak when a credential field on a dataclass, pydantic model or JS object meets code that logs or traces whole objects, searching the whole repository for the other half. Use when a change adds such a field or a wholesale sink.

SECURITY_MODEL.md for review tools

Writes and maintains SECURITY_MODEL.md, telling security review tools a repository's exposure, invariants, reportable finding classes and owner-confirmed exclusions, with a script that flags stale references. Use when preparing a repo for automated review.

Agent skill security scanner

Audits an agent skill before installation: a static scan for prompt injection, hidden Unicode, secrets, risky scripts and structural traps, then a review of intent and permissions ending in a verdict. Use when a skill comes from an outside source.

Skill writer by the Agent Skills spec

Creates and improves agent skills by Sentry's workflow: sources with provenance, the simplest execution shape, SPEC.md and SOURCES.md, precision passes after each change and a structural validator. Use when building a skill that a team will maintain.

Security review, Sentry

Reviews a file, diff or component for exploitable vulnerabilities with OWASP-based references, researches the codebase before flagging and reports only findings reached by attacker-controlled input. Use when a change needs a low-noise security review.

Django performance review

Reviews Django and DRF code for N+1 queries, unbounded querysets, missing indexes and write loops, validating table size and hot paths before reporting. Use when a Django view or endpoint is slow or a change touches large tables.