PR Context Diagram
БесплатноБез исполняемых скриптовНе проверенCreate or update pull request descriptions that are easy for humans and agents to review. Use when asked to create a PR, improve a PR body, add context…
от no7dw141 установка в других каталогахОб этом скилле
PR Context Diagram
Goal
Produce a PR description that lets a reviewer quickly answer:
- What broke or was missing before?
- What changed now?
- Why is the new behavior correct?
- How was it verified?
- What risks, drawbacks, or future work remain?
Optimize for both humans and follow-up coding agents. Make the PR body self-contained enough that another agent can review the diff without reconstructing the whole conversation.
Workflow
Inspect the branch and diff before writing.
- Run
git branch --show-current,git status --short,git log --oneline <base>..HEAD, andgit diff --stat <base>...HEAD. - Treat
main,master, anddevas protected branches for this workflow unless the user explicitly says otherwise. - Read the key changed files around the behavioral changes.
- If a PR already exists, fetch the current body with
gh pr view.
- Run
Reconstruct the problem from evidence.
- Include the failing symptom or error text if available.
- Identify the operation path, affected endpoint/tool, and data shape.
- Separate root cause from adjacent operational issues.
- Do not claim a fix covers cases that were not tested.
Write a before/after comparison.
- Use short prose for the old behavior.
- Use short prose for the new behavior.
- Highlight only the parts that changed, not the whole system.
- Name the key difference explicitly before the diagrams, for example: "old path rebuilt shared strings globally; new path preserves or merges them by operation type."
Choose the right diagram type before writing Mermaid.
- Do not force a sequence diagram when the change is not primarily about request/response or actor interaction.
- Use the simplest diagram that makes the changed behavior obvious to a reviewer.
- Prefer one main diagram type per PR section, not a random mix.
- Add a short sentence before the diagrams that explains why this diagram type is the right one.
Add Mermaid diagrams.
- Include one
Beforeand oneAfterdiagram when that comparison is clearer than a single diff-style diagram. - When the change is small, one
Key Differences Highlighteddiagram plus prose is often enough. - Highlight changed areas visually; do not rely on prose alone.
- Add a short color guide before the diagrams.
- For multi-layer fixes, add one diagram per important path if it improves clarity.
- Keep labels concrete: API, cache, serializer, validator, storage, worker, schema contract, pipeline stage, worksheet, etc.
- Before creating or updating the PR, scan every Mermaid block for GitHub parse hazards. In flowcharts, quote node labels that contain brackets, braces, parentheses, slash-heavy paths, dots, colons, pipes, question marks, or other punctuation.
- Prefer flowchart node syntax such as
A["Read pg_sources[n]"]andB{"Source exists?"}over raw labels such asA[Read pg_sources[n]]orB{pg_sources[n] exists?}.
- Include one
Add verification evidence.
- List exact test commands and whether they passed.
- List manual/local/dev verification with document IDs or URLs when relevant.
- Include readback checks, not only write success.
- Include logs consulted and what they confirmed.
Add drawbacks and future improvements.
- Distinguish accepted tradeoffs from known bugs.
- Mention concurrency, performance, data growth, compatibility, or observability risks when relevant.
- Give actionable next steps without blocking the PR unless the risk is severe.
Create or update the PR.
- Before any PR action, confirm the current branch is not
main,master, ordev. - If the current branch is protected, stop and create or switch to a working branch first:
- bug fix ->
fix-{name} - feature ->
feat-{name}
- bug fix ->
- Do not make new commits directly on protected branches unless the user explicitly requests it.
- Prefer
gh pr create --base <base> --head <branch> --title ... --body-file ...for long descriptions. - Use a temporary body file for long Markdown to avoid shell quoting problems.
- Confirm the PR with
gh pr view --json number,title,url,baseRefName,headRefName,state.
- Before any PR action, confirm the current branch is not
Branch Safety
Before creating or updating a PR:
- Run
git branch --show-current. - If the current branch is
main,master, ordev, stop and do not create or update the PR from that branch. - Create or switch to a working branch first:
- bug fix ->
fix-{name} - feature ->
feat-{name}
- bug fix ->
- Move the intended commits onto that working branch before running
gh pr create. - Do not make new commits directly on protected branches unless the user explicitly requests it.
- If the user explicitly wants PR work from a protected branch, call out the risk clearly in the response and scope the action to exactly what they requested.
Diagram Selection
Choose the diagram type from the change shape, not from habit.
Use sequenceDiagram when
- the main question is who called whom, in what order
- a r
Установить PR Context Diagram в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл PR Context Diagram?
Create or update pull request descriptions that are easy for humans and agents to review. Use when asked to create a PR, improve a PR body, add context, compare before/after behavior, add Mermaid diagrams, summarize verification, or document drawbacks and future improvements for code changes.
Как установить скилл PR Context Diagram?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл PR Context Diagram запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic