Agent skill

PR Design Doc

by OpenHands in OpenHands/OpenHands

For a non-trivial pull request, write a self-contained HTML design doc under the temporary .pr/ directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the…

MITAuto-check passedDevelopment

Install PR Design Doc

skills CLI
$ npx skills add OpenHands/OpenHands --skill pr-design-doc -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OpenHands/OpenHands pr-design-doc --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OpenHands/OpenHands.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/pr-design-doc .claude/skills/pr-design-doc && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pr-design-doc
GitHub stars
90k
Token cost
~2.4k tokens
SKILL.md length
1,206 words
Files
2 (incl. references)
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

For a non-trivial pull request, write a self-contained HTML design doc under the temporary .pr/ directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the…

  • Works in 7 steps: Check out and verify the PR head. Do not… → Read both sides of each logical file.… → Classify each file. Logic change… → …
  • Updating a non-trivial PR
  • SKILL.md covers When to use it, The .pr/ workflow, Workflow and What the page contains, plus 2 more sections
  • Calls git and gh

What it does

PR Design Doc is an agent skill from OpenHands/OpenHands. For a non-trivial pull request, write a self-contained HTML design doc under the temporary .pr/ directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the proposal at a glance - code/API design, and the before/after of the change, grounded to real code. Use when opening or updating a non-trivial PR, or when the user says "add a design doc", "document this PR for reviewers", "show the before/after", "make the design reviewable", or "write the .pr/ page".

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/html-craft.md`).

It sits in Development, covering Architecture decision records and Pull requests. It works with OpenAI. The repository describes itself as: 🙌 OpenHands: AI-Driven Development. The licence is MIT.

When your agent uses it

  • Updating a non-trivial PR
  • The user says add a design doc
  • Document this PR for reviewers
  • Show the before/after

Example prompts

  • “add a design doc”
  • “document this PR for reviewers”
  • “show the before/after”
  • “/pr-design-doc”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Check out and verify the PR head. Do not write or commit the design doc from the base
  2. Read both sides of each logical file. Compare
  3. Classify each file. Logic change (behavior moved) → draw before/after. Mechanical
  4. If the change is an API change, lead with the API. Show the signature/schema/type
  5. Find the cross-file story. If one call chain threads several files, draw a single
  6. Build the page per references/html-craft.md - one
  7. Commit under .pr/, push to the verified PR head, and link it. Confirm that the push

What it can do on your machine

Read from SKILL.md and the folder at commit 7ea83ba. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • htmlpreview.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

PR Design Doc loads about 2.4k tokens when it runs, and up to ~7.4k if it reads all its reference files. Until then it costs about 129 tokens; SKILL.md has 1,206 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~129
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OpenHands/OpenHands at commit 7ea83ba, republished under its MIT licence (© OpenHands). 1,206 words, ~2,404 tokens.

Download SKILL.mdSave it as .claude/skills/pr-design-doc/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
pr-design-doc
description
For a non-trivial pull request, write a self-contained HTML design doc under the temporary `.pr/` directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the proposal at a glance - code/API design, and the before/after of the change, grounded to real code. Use when opening or updating a non-trivial PR, or when the user says "add a design doc", "document this PR for reviewers", "show the before/after", "make the design reviewable", or "write the .pr/ page".
triggers
/pr-design-doc, /design-doc
license
MIT
metadata.tags
pull-request, design-doc, html, review, before-after, htmlpreview

pr-design-doc - a reviewable design doc for a non-trivial PR

A diff shows what changed line by line. It does not show the design: the shape of the change, the API before and after, and why this approach. Reviewers reconstruct that by hand, slowly. The scarce resource is the maintainer's attention and trust budget - not the agent's effort. Spend extra effort to hand them one self-contained HTML page that conveys the big picture and the before → after core difference, with every claim clickable back to the real code, then link it from the PR description.

This is the same craft as a "show me this change" explainer, aimed at one job: making a non-trivial PR easy to review.

When to use it

  • Opening or updating a non-trivial PR: new/changed public API, a new module or subsystem, a behavior change in core logic, a migration, or anything a reviewer can't fully judge from the diff in a couple of minutes.
  • Skip it for trivial PRs - a typo, a one-line guard, a dependency bump, a docs tweak, a simple bug fix. A design doc adds more to review. Use judgment; if the diff is the explanation, don't add a page.

The .pr/ workflow

Use the temporary .pr/ directory for PR-only artifacts. Before relying on automatic cleanup, verify that the target repository has an enabled .github/workflows/pr-artifacts.yml workflow that removes .pr/ after approval.

  • Same-repository PR with verified cleanup workflow: the workflow removes .pr/ after approval.
  • Fork PR, or repository without a verified cleanup workflow: remove .pr/ manually before merge.

The design doc is a temporary review aid and must not ship in the merged tree. Automated approval can trigger cleanup before human review. Keep the essential design summary in the PR description: intent, important before/after behavior or API shape, compatibility, risk, and code references. Use commit-pinned document links so cleanup does not break access.

Workflow

  1. Check out and verify the PR head. Do not write or commit the design doc from the base branch or an unrelated checkout. Start with a clean worktree, then inspect and check out the PR:

    bash
    gh pr view <n> --json title,body,url,baseRefName,baseRefOid,headRefName,headRefOid,headRepository,headRepositoryOwner,isCrossRepository,files,additions,deletions
    gh pr checkout <n>
    git rev-parse HEAD
    gh pr view <n> --json headRefOid --jq .headRefOid

    The final two SHAs must match before you continue. If they do not, stop and fix the checkout. Compute the merge-base SHA with git merge-base <baseRefOid> <headRefOid>. Group changed files by area and keep both the merge-base SHA and head SHA for source links.

  2. Read both sides of each logical file. Compare git show <merge-base-sha>:<path> with the verified head. Capture the function-level behavioral difference - what the code did vs does now.

    • new file → no "before"; one "after" diagram + a line on the role it adds.
    • deleted file → "before" diagram + who/what takes over.
    • edited file → a before/after pair, with the delta highlighted.
  3. Classify each file. Logic change (behavior moved) → draw before/after. Mechanical change (rename, constant, config, import move) → a one-line before → after row, no diagram. Don't dilute the signal by drawing mechanical edits.

  4. If the change is an API change, lead with the API. Show the signature/schema/type before and after side by side (function signature, endpoint + payload, config field, event shape). Name the compatibility impact plainly: additive, breaking, or behind a flag.

  5. Find the cross-file story. If one call chain threads several files, draw a single overview before/after at the top; per-file cards drill in.

  6. Build the page per references/html-craft.md - one self-contained, offline, editorial HTML file with hand-drawn SVG figures. Save it to the repo's .pr/ directory, e.g. .pr/design.html (or .pr/<topic>.html). Before writing, reject a symlink at .pr or at the exact output path; never follow a branch-controlled symlink outside the worktree.

    bash
    test ! -L .pr && test ! -L .pr/design.html
    mkdir -p .pr
  7. Commit under .pr/, push to the verified PR head, and link it. Confirm that the push remote resolves to headRepository.nameWithOwner; never push the artifact to the base repository's default branch.

    bash
    git add .pr/design.html
    git commit -m "docs(.pr): design doc for <PR topic>"
    git push <head-repo-remote> HEAD:<headRefName>
    git rev-parse HEAD

    Use the resulting full SHA as <doc-commit-sha> in document links. Refresh the document and its link when substantive changes affect the design; a cleanup-only commit does not need a new link. Query the base repository's visibility before choosing the link:

    bash
    gh repo view <base-owner>/<base-repo> --json visibility,url
    • Public repository: add an htmlpreview link near the top of the PR description, pointing at the PR head repository and commit containing the document:
      📄 Design doc: https://htmlpreview.github.io/?https://github.com/<fork-owner>/<repo>/blob/<doc-commit-sha>/.pr/design.html
    • Private or internal repository: link the access-controlled GitHub blob at the same document commit and include local download/open instructions, or use an existing access-controlled artifact service. Never send the document through htmlpreview or another public host.
Show full SKILL.md (480 more words)Show less

What the page contains

  1. What changed (decision first) - one paragraph: the intent, net effect, and why the reviewer should care. Put the highest-impact conclusion, risk, or API-compat note in a ★ callout, with the most important changed path:line nearby. Stats (N files · +A / −D) are context, not the lead. If there's a cross-file flow, the overview before/after SVG goes here.
  2. API before → after (when the PR changes an interface) - signatures/schemas/types side by side, with the compatibility verdict stated.
  3. Left rail / index - changed files grouped by area, each tagged (🟢 added · 🔴 removed · ✏️ changed · ⚙️ mechanical) with +/− counts; click to jump.
  4. Per-file cards - for each logical file: a claim-carrying title, a one-line summary of how its behavior changed, before/after diagrams with real symbol names + file:line (changed nodes in orange), and the diff in a collapsed <details>. Mechanical files get a small before → after table, no diagram.
  5. (optional) Risk / follow-ups - only if grounded in what you read.

Non-negotiable principles

  1. Optimize for scarce reviewer attention. The first screen answers, in ~15 seconds: what this PR does, whether it's risky, where to look first, and what evidence backs the claim. Lead with the conclusion, not your process.
  2. Show the difference, not just the after. For any logic or API change, draw before and after and make the delta visually loud (color + line style). The contrast is the product.
  3. Ground everything to code, beside the claim. Every box, node, and sentence names a real symbol + path:line, and links to the correct source revision where possible: the merge-base SHA for before-state evidence and the verified head SHA for after-state evidence. One click from "this changed" to the exact code.
  4. Hand-draw the carrying diagrams. Prefer bespoke inline SVG for the before/after that makes the argument; Mermaid is fine only for quick auxiliary graphs.
  5. Self-contained & offline. One HTML file, inline CSS/SVG, no external scripts or assets, opens by double-click, and survives being copied to another machine.
  6. .pr/ only, and temporary. The doc is a review aid, not project docs. Keep it in .pr/ and ensure it is removed before merge. Rely on automatic cleanup only when the repository's workflow has been verified; otherwise remove it manually. Do not move design HTML into docs/ or ship it in the merged tree.

Anti-patterns

  • ❌ Dumping the raw diff / file tree and calling it a "design doc" - adds nothing over the PR page.
  • ❌ Empty nodes ("process data", "handle request") - every node is a real symbol + location.
  • ❌ Only the after-state when something changed - reviewers want the contrast.
  • ❌ A design doc on a trivial PR - noise. Skip it.
  • ❌ Committing the HTML outside .pr/ (e.g. docs/), where it would merge into main.
  • ❌ Publishing a private-repository design doc through htmlpreview, GitHub Pages, or another public host. Use the private/local preview path in the craft reference. Use GitHub Pages only with explicit user authorization after verifying private Pages access control.

© OpenHands, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .agents/skills/pr-design-doc of OpenHands/OpenHands.

  • SKILL.md
  • references/html-craft.md

Open the folder on GitHubat commit 7ea83ba

Compare with similar skills

PR Design Doc next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

PR Design Doc compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR Design Doc this skillOpenHands/OpenHands90k—~2.4kAutomated safety check: PassMIT
Open Code Review CLIalibaba/open-code-review44k—~3.1kAutomated safety check: PassApache-2.0
Deep Reviewdyad-sh/dyad22k—~1.4kAutomated safety check: PassCustom licence
Close Task Commit Push PRdevoxx/DevoxxGenieIDEAPlugin684—~1kAutomated safety check: NotesMIT
Git Commit Push PRdevoxx/DevoxxGenieIDEAPlugin684—~698Automated safety check: NotesMIT
Community Triageroryeckel/wyoming_openai218—~2.9kAutomated safety check: PassApache-2.0

Similar skills

  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    44k GitHub stars~3.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Deep Review

    dyad-sh/dyad

    Deep multi-agent code review run locally — a fleet of parallel finder agents reviews the diff from independent angles, then adversarial verifier agents reproduce each finding before it is reported.

    22k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Close Task Commit Push PR

    devoxx/DevoxxGenieIDEAPlugin

    Close the active backlog task (detected from branch name), commit all changes, push to remote, and open a pull request.

    684 GitHub stars~1k tokensUpdated 8 days ago
    DevelopmentAuto-check: notes
  • Git Commit Push PR

    devoxx/DevoxxGenieIDEAPlugin

    Commit all changes, push to remote, and open a pull request in one go.

    684 GitHub stars~698 tokensUpdated 8 days ago
    DevelopmentAuto-check: notes
  • Community Triage

    roryeckel/wyoming_openai

    GitHub issues, pull requests, bug reports, scope questions, and support threads.

    218 GitHub stars~2.9k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Prose

    static-web-server/static-web-server

    Author or edit any prose for the Static Web Server (SWS) project — documentation, design docs, READMEs, PR descriptions, issue bodies, commit message bodies, or other human-readable text — following…

    2.4k GitHub stars~971 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from OpenHands/OpenHands

All 8 skills in this repo
  • Verify Openhands

    OpenHands/OpenHands

    This skill should be used to "verify OpenHands features", "test the Canvas UI like a user", "drive Agent Canvas", "check a UI change in the real app", "create or update the feature map", "run the…

    90k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Desktop Electron

    OpenHands/OpenHands

    This skill should be used when the user asks to "change the desktop app", "package Electron", "build a universal macOS app", "bundle Node or uv", "fix Electron startup", or changes electron/…

    90k GitHub stars~302 tokensUpdated today
    Auto-check passed
  • E2E Testing

    OpenHands/OpenHands

    This skill should be used when the user asks to "add an E2E test", "run live E2E", "run mock-LLM tests", "debug Playwright CI", "test the Docker image", or changes tests/e2e, Playwright configs, E2E…

    90k GitHub stars~308 tokensUpdated today
    Auto-check passed
  • Frontend API Contracts

    OpenHands/OpenHands

    This skill should be used when the user asks to "add an API call", "change a backend", "update settings persistence", "change conversation events", "fix backend auth", "add Agent Server support", or…

    90k GitHub stars~390 tokensUpdated today
    Auto-check passed
  • Frontend Development

    OpenHands/OpenHands

    This skill should be used when the user asks to "add UI copy", "add a translation", "optimize the frontend bundle", "change onboarding", "change conversation UI", "add a query key", "change MSW…

    90k GitHub stars~324 tokensUpdated today
    Auto-check passed
  • Local Stack Runtime

    OpenHands/OpenHands

    This skill should be used when the user asks to "change the dev stack", "add a runtime service", "change the launcher", "update Docker", "bump Agent Server", "change ingress routing", or changes…

    90k GitHub stars~375 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about PR Design Doc

What does PR Design Doc do?

For a non-trivial pull request, write a self-contained HTML design doc under the temporary .pr/ directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the…. PR Design Doc is an agent skill from OpenHands/OpenHands.pr/ directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the proposal at a glance - code/API design, and the before/after of the change, grounded to real code.

When should I use PR Design Doc?

PR Design Doc fits situations like: updating a non-trivial PR; the user says add a design doc; document this PR for reviewers; show the before/after.

How do I install PR Design Doc in Claude Code?

Run `npx skills add OpenHands/OpenHands --skill pr-design-doc -a claude-code`. Or copy the skill folder (.agents/skills/pr-design-doc in OpenHands/OpenHands) into .claude/skills/pr-design-doc in your project. Claude Code loads it when a task matches its description.

How do I install PR Design Doc in Codex?

Run `npx skills add OpenHands/OpenHands --skill pr-design-doc -a codex`. Or copy the skill folder (.agents/skills/pr-design-doc in OpenHands/OpenHands) into .agents/skills/pr-design-doc in your project. Codex loads it when a task matches its description.

Can I use PR Design Doc in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenHands/OpenHands --skill pr-design-doc -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pr-design-doc, .gemini/skills/pr-design-doc, .github/skills/pr-design-doc and .opencode/skills/pr-design-doc in your project.

What does PR Design Doc need to run?

Going by SKILL.md and its folder, PR Design Doc needs the command-line tools its instructions call (git and gh).

Does PR Design Doc access the network?

SKILL.md names 1 domain. As links in the text: htmlpreview.github.io. This is read from the text; nothing was executed.

Is PR Design Doc safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does PR Design Doc use?

PR Design Doc is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PR Design Doc use?

About 2.4k tokens (SKILL.md is roughly 9.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5k tokens, read only when the agent opens those files.

What are the alternatives to PR Design Doc?

Skills that share tags, products or a category with PR Design Doc: Open Code Review CLI (alibaba/open-code-review, 44k stars), Deep Review (dyad-sh/dyad, 22k stars), Close Task Commit Push PR (devoxx/DevoxxGenieIDEAPlugin, 684 stars) and Git Commit Push PR (devoxx/DevoxxGenieIDEAPlugin, 684 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR Design Doc?

OpenHands (a GitHub organization) maintains it in OpenHands/OpenHands, which has 90,141 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 7, 2026.

Source: OpenHands/OpenHands on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.