pr-writer — скилл для Claude Code: что делает и как установить
Составляет и обновляет описания пулл-реквестов с фокусом на ревьюера. Пригодится перед открытием PR или при синхронизации описания с новым диффом ветки.
npx skills add getsentry/skills --skill pr-writer -a claude-codeЧто делает pr-writer
Скилл анализирует текущую ветку, статус рабочей копии и полный дифф относительно базовой ветки через git и GitHub CLI. Вместо шаблонных списков изменений или дампов коммитов он формулирует сопроводительную записку. В фокусе — изменившееся поведение системы, затронутые интерфейсы и риски для тех, кто проверяет код.
Заголовки формируются по правилам conventional commits с типами вроде feat, fix или ref. Скилл сразу отсекает шаблонные секции вроде Summary или Test Plan, если они не несут практической пользы. Черновики создаются командой gh pr create --draft, а существующие пулл-реквесты обновляются через вызов gh api.
Для работы скиллу обязательно требуется авторизованная утилита gh. Если на машине нет доступа к репозиторию через GitHub CLI, скрипт не сможет даже прочитать параметры базовой ветки.
Какие задачи решает
- составить понятное описание пулл-реквеста по полному диффу ветки
- переписать описание PR после правок без пересказа истории коммитов
- сформировать заголовок по спецификации conventional commits
- оформить черновик PR через GitHub CLI без лишних шаблонных секций
Примеры запросов агенту
- Подготовь описание для нового PR по текущей ветке
- Обнови заголовок и тело открытого пулл-реквеста под свежий дифф
- Сформируй черновик PR через gh с фокусом на критические изменения
Как установить pr-writer
1Через Skills CLI (Vercel)
npx skills add getsentry/skills --skill pr-writer -a claude-code2Вручную: положить файлы
~/.claude/skills/pr-writer/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/pr-writer/
1Через Skills CLI (Vercel)
npx skills add getsentry/skills --skill pr-writer -a codex2Вручную: положить файлы
.agents/skills/pr-writer/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add getsentry/skills --skill pr-writer -a cursor2Вручную: положить файлы
.cursor/skills/pr-writer/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install getsentry/skills pr-writer2Вручную: положить файлы
.github/skills/pr-writer/SKILL.md1Через Skills CLI (Vercel)
npx skills add getsentry/skills --skill pr-writer -a gemini-cli2Командой платформы
gemini skills install https://github.com/getsentry/skills --path skills/pr-writerВручную: положить файлы
.devin/skills/pr-writer/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add getsentry/skills --skill pr-writer -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о pr-writer
Как установить pr-writer в Claude Code?
Выполните команду npx skills add getsentry/skills --skill pr-writer -a claude-code.
Что делает скилл pr-writer?
Он изучает дифф ветки через git и собирает заголовок с описанием для ревьюеров. Инструмент отсекает служебные логи коммитов и создаёт черновик через GitHub CLI.
Что нужно настроить перед запуском pr-writer?
На компьютере должна быть установлена и авторизована утилита gh. Скилл использует её для чтения метаданных репозитория и публикации описания через API.
Исходный текст
SKILL.md · Apache-2.0
---
name: pr-writer
description: 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.
---
# 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:
```bash
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:
```bash
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:
```markdown
<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:
```bash
gh pr create --draft --title '<title>' --body-file /tmp/pr-body.md
```
Update existing PRs with `gh api`:
```bash
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:
```markdown
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:
````markdown
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": [...]}}
```
````
© getsentry · Apache-2.0 · getsentry/skills