Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

pr-description-writer

БесплатноЗапускает вложенные скриптыНе проверен

Write PR descriptions with evidence, verification steps and a one-way/two-way merge-risk call. Use when opening a PR, when asked to write or fix a PR body, or…

borgheiот borghei★ 1 250 звёзд на GitHub

Об этом скилле

PR Description Writer

A PR description exists so the reviewer can decide how hard to look, where to look, and whether the merge can be undone. Most descriptions fail all three: they narrate the commits, assert "tested, works", and call the change "low risk" while it ships a DROP COLUMN. This skill writes the body in five sections (summary, why, evidence, how to verify, merge risk), classifies the change from its real file list and diff, and lints the result so an honest classification is enforced rather than hoped for.

This skill is for the author. Reviewing someone else's PR (blast-radius analysis, security scanning, coverage deltas) is a separate job covered by the engineering/pr-review-expert package; this one only produces and checks the description.

When to use this skill

  • Opening a PR: the branch is ready and needs a body
  • Rewriting a weak body: "fix this PR description", "make this reviewable"
  • Before requesting review: a mechanical check that evidence, steps and rollback are there
  • PRs with migrations, API or contract changes, deletions: where getting the merge-risk call wrong costs an incident
  • CI gate: fail PRs whose body claims "reversible" while touching migrations

Clarify First

The merge-risk call and the evidence decide whether the description is useful, and both depend on facts the author has but the diff may not show. Settle the inputs below before writing. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

  • Base branch and file list: the classification comes from git diff --name-only <base>...HEAD. The wrong base produces the wrong door.
  • Evidence available: whether screenshots, test output or a staging run exist. If none do, the agent says so and proposes the command to produce them, rather than writing "verified".
  • Deploy and rollback mechanics: who deploys, whether migrations run automatically, whether a flag guards the change. A one-way PR's rollback plan is unusable without these.
  • Audience: internal team only, or external API consumers too. This moves a contract change from conditional to one-way.

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, draft it from the diff and state your assumptions at the top of the body.

Quick Start

# 1. Classify the change from its real file list and diff
T=$(mktemp -d)
git diff --name-only main...HEAD > "$T/changed.txt"
git diff main...HEAD > "$T/pr.diff"
python3 engineering/pr-description-writer/scripts/risk_classifier.py \
  --files "$T/changed.txt" --diff "$T/pr.diff" --emit-section

# 2. Write the body from assets/pr-body-template.md, then lint it against the same files
python3 engineering/pr-description-writer/scripts/pr_body_lint.py \
  --body pr.md --files "$T/changed.txt" --diff "$T/pr.diff"

# 3. Open the PR only when the lint passes
gh pr create --base main --body-file pr.md

Tools Overview

Tool Purpose Exit codes
scripts/risk_classifier.py Classify each changed path (schema migration, public API, persisted format, data deletion, infra, auth, deps, CI, config, code, tests/docs), scan the diff for destructive SQL and removed contract fields, compute door and blast radius, and draft a Merge risk section (--emit-section) 0 classified, 1 door at or above --fail-on, 2 usage error
scripts/pr_body_lint.py Check the five sections exist and are filled, evidence is concrete, verification is runnable, the door is stated with a rollback for one-way, no credentials leaked, and (with --files) that the claimed door matches the files 0 pass, 1 errors (or warnings with --strict), 2 usage error

Both take --format text|json. Both read - as stdin, so they chain with git diff --name-only and gh pr view --json body.

Workflows

Workflow 1: Write a new PR body [RECOMMENDED]

  1. Get the file list and diff against the real base branch.
  2. Run risk_classifier.py --emit-section. Read the per-file categories; if a path is misclassified, the body must say why (e.g. a migrations/ folder holding fixtures).
  3. Draft the body from assets/pr-body-template.md:
    • Summary: behaviour change in one or two sentences, plus at most one small picture (structure diff, call tree, file tree, or mermaid sequence).
    • Why: the problem in user terms, plus the ticket link.
    • Evidence: before and after, strongest tier available (screenshot > test output > command output > CI link). Redact tokens and customer data.
    • How to verify: numbered steps with exact commands and expected results.
    • Merge risk: classification, blast radius, rollback plan. Paste the classifier's draft and replace its bracketed placeholder.
  4. Validate with the linter, using --files and `-
Полный SKILL.md на GitHub

Установить pr-description-writer в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/pr-body-template.mdassets/sample_changed_files.jsonassets/sample_migration.diffassets/sample_pr_body_flawed.mdassets/sample_pr_body_good.mdreferences/merge-risk-classification.mdreferences/pr-body-anatomy.mdscripts/pr_body_lint.pyscripts/risk_classifier.py

FAQ

Что делает скилл pr-description-writer?

Write PR descriptions with evidence, verification steps and a one-way/two-way merge-risk call. Use when opening a PR, when asked to write or fix a PR body, or when checking a description before requesting review.

Как установить скилл pr-description-writer?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл pr-description-writer запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить pr-description-writer с