write-pr

Creates or rewrites GitHub pull request descriptions with Mermaid diagrams, outcome tables, and reviewer maps.

5|Updated Sep 9, 2017
One-click install
npx skills add https://github.com/hpcsc/dotfiles --skill write-pr-hpcsc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: write-pr
Source: https://github.com/hpcsc/dotfiles/tree/main/link/common/dot-config/.config/opencode/skills/write-pr
Command: npx skills add https://github.com/hpcsc/dotfiles --skill write-pr-hpcsc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Pull request descriptions that only list changed files force reviewers to reconstruct the system's flow from the diff, slowing review and inviting misunderstandings. This Skill writes a description that models the change first, so a reader who never saw the branch can follow it. ## Core Features & Use Cases - Three structured artifacts: Generates a Mermaid flow diagram of the path the change lives in, a before/after outcomes table for each observable case, and a question-to-file map that tells reviewers where each rule lives. - Create or update PRs via gh: Creates a new pull request with the correct base, title convention, and ticket from commit trailers, or patches an existing PR's body through the GitHub API. - Simplified Technical English prose: Writes all description prose following the ASD-STE100 guideline for unambiguous, reviewable language. - Use Case: After finishing a feature branch, ask the Skill to open a PR; it reads the full diff, renders and validates the Mermaid diagram, drafts the description, and posts it with gh pr create. ## Quick Start Ask the AI to open a pull request for the current branch using the write-pr skill with a flow diagram and outcomes table.

Frequently Asked Questions about write-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a good pull request description on GitHub?▼

Read the full diff first, then write three artifacts before the change list: a Mermaid diagram of the flow the change lives in, a table of observable before/after outcomes, and a map from reviewer questions to the files that answer them. This Skill automates that structure and posts it with gh.

How to update an existing GitHub PR description with gh?▼

Patch the body through the GitHub API instead of gh pr edit, which can fail silently. Write the description to a file, wrap it in JSON with python3, then call gh api -X PATCH on the pulls endpoint and read the body back to verify.

Does GitHub render Mermaid diagrams in pull request descriptions?▼

Yes, GitHub renders a fenced mermaid code block directly in the description. The diagram source must parse correctly, so render it locally with mmdc first; a diagram that fails to parse appears as a plain code block.

Why does my Mermaid diagram fail to render on GitHub?▼

Common causes include using the reserved word 'call' as a label, appending a :::class suffix that drops the rest of the line, or unquoted labels containing commas or slashes. Quote every label with special characters and validate with mmdc before posting.

When should I skip the flow diagram in a PR description?▼

Skip the diagram only when the change has no flow to draw, such as a rename across one package, using the --no-diagram flag. For pure refactors with no observable outcome, state that explicitly instead of inventing a before/after row.