Agent skill

PR Body

by andrew-blake in andrew-blake/melcloudhome

A skill your agent uses when composing or revising a pull request description in this repo, including PRs that sit in a stack.

MITAuto-check passedDevelopment

Install PR Body

skills CLI
$ npx skills add andrew-blake/melcloudhome --skill pr-body -a claude-code

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

GitHub CLI
$ gh skill install andrew-blake/melcloudhome pr-body --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/andrew-blake/melcloudhome.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/pr-body .claude/skills/pr-body && 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-body
GitHub stars
142
Token cost
~4.5k tokens
SKILL.md length
2,381 words
Files
3
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when composing or revising a pull request description in this repo, including PRs that sit in a stack.

  • Works in 6 steps: ## Summary: required. Opens with the… → ## Key changes: when the diff touches… → ## What changes for users: when a user… → …
  • Revising a pull request description in this repo
  • SKILL.md covers Overview, Source contract, Handoff and The shape, plus 5 more sections
  • Calls git and gh

What it does

PR Body is an agent skill from andrew-blake/melcloudhome. Use when composing or revising a pull request description in this repo, including PRs that sit in a stack.

Its SKILL.md is about 4.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `handoff.md`).

It sits in Development, covering Pull requests. It works with Home Assistant and Git. The repository describes itself as: MELCloudHome - Home Assistant Integration. The licence is MIT.

When your agent uses it

  • Revising a pull request description in this repo
  • Including PRs that sit in a stack

Example prompts

  • “/pr-body”

Requirements

  • Docker

Workflow steps

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

  1. ## Summary: required. Opens with the problem the change solves, as it
  2. ## Key changes: when the diff touches more than five files. One bullet
  3. ## What changes for users: when a user will notice something, such as a
  4. ## Risks accepted: when merging accepts a known risk, such as an
  5. ## AI Disclosure: required. Reproduce the template's two boxes and
  6. ## Testing: required. What ran and what it showed, as three kinds of

What it can do on your machine

Read from SKILL.md and the folder at commit fdb0b32. 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

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    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 Body loads about 4.5k tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 2,381 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~4.5k

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 andrew-blake/melcloudhome at commit fdb0b32, republished under its MIT licence (© andrew-blake). 2,381 words, ~4,478 tokens.

Download SKILL.mdSave it as .claude/skills/pr-body/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
pr-body
description
Use when composing or revising a pull request description in this repo, including PRs that sit in a stack.

PR Body

Overview

A PR body tells a reviewer what changed, what to check, and what risk they are accepting by merging. It is written from the diff and the linked decision record.

Source contract

Inputs: git diff <base>..HEAD, git diff --shortstat <base>..HEAD, the linked ADR/plan/issue, the author's problem statement when no issue exists, and .github/pull_request_template.md.

Resolve the base from the branch; a caller need not supply it. gh stack view --json names the branch below this one in a stack; that is the base. With no stack, the base is the trunk. Sanity-check either answer against git log --oneline <base>..HEAD: the commits shown must be this branch's own work, and a parent's commits appearing there means the base is wrong.

The session transcript is not an input. A sentence that exists because of something that happened while the work was done (an investigation, a wrong turn, a precedent you discovered, an objection raised earlier) belongs in the ADR or nowhere.

Handoff

Three rules that bind even if you read nothing else. Detail and reasoning: REQUIRED: follow handoff.md.

  • A subagent writes the body. The author names the branch and passes the issue (or, with none, a problem statement), the ADR paths and a list of verified facts, no narrative. The writer resolves the base itself.
  • With neither an issue nor a problem statement in the brief, the writer writes no body and hands back asking the author for the problem statement.
  • The body goes in a file, never pasted into chat as the deliverable.
  • If that file already exists, ask before writing and wait for the answer.

The shape

Three sections are required, from .github/pull_request_template.md. Three more are conditional, each on something you can check rather than judge. Nothing else: a named-but-optional section is how a template rots, and Motivation, Background, Implementation notes and Screenshots all invite the narrative the source contract removes.

The file opens with the title as an H1, so the one line a reviewer reads first is reviewed and versioned with the body rather than improvised at the command line.

Write every paragraph, bullet and checkbox as one unwrapped line. GitHub renders a newline inside a paragraph as a line break, so hard-wrapped prose ships its wrapping to the reviewer; the prettier step in handoff.md repairs it, but composing unwrapped is what keeps the diff of a later edit readable.

Write the title last, from the finished body. Composing the body is what establishes what the change is; a title written first frames the body instead, and you cannot tell whether a title merely repeats the Summary's opening sentence until that sentence exists.

Rules, all drawn from this repo's merged titles:

  • Conventional-commit form, type(scope): summary. Lowercase after the colon, no trailing period.
  • Types in use here: fix, feat, refactor, perf, docs, ci, chore, test. Scope is the area touched: atw, ata, sensor, coordinator, i18n, mock, diagnostics, dev.
  • Type by the effect on a user, not by the shape of the diff. Something broken now working is a fix even when the diff adds a lot; #257, #258 and #266 are all endpoint or parsing changes typed that way.
  • 50 to 75 characters. The merged corpus runs 53 to 82 and clusters there; GitHub truncates beyond about 70 in some views.
  • Name what changed. The why belongs to the Summary, and the title should not restate its first sentence.
  • Try the positive form before reaching for a contrast. Merged titles do use X, not Y (#255, #257, #264), but reframing around what is being removed came out shorter than the original in every one of those cases, and it names the actionable half: stop trusting live context for outdoor temperature beats source outdoor temperature from comfort-graph, not live context by 13 characters and says the same thing. Keep the contrast only when the positive form loses a fact.
markdown
# fix(atw): source water temperatures from the internaltemperatures report

Then, in order:

  1. ## Summary: required. Opens with the problem the change solves, as it stands without the change, from the linked issue or the brief's problem statement. Then what changed, from the diff, citing the related #number inline. One pointer to the ADR, plan or issue that holds the evidence.

  2. ## Key changes: when the diff touches more than five files. One bullet per behaviour a reviewer can verify in the diff. Below that, fold it into the Summary.

  3. ## What changes for users: when a user will notice something, such as a state that reads differently, a discontinuity in recorded history, an automation that has to adapt. One section, one bullet each, with the remedy. Internal changes nobody outside the repo can observe do not belong here. Each bullet carries a fact the Summary does not state. When the Summary's opening sentence is the whole user-visible change, the section is absent.

  4. ## Risks accepted: when merging accepts a known risk, such as an assumption shipped without evidence, a downside taken deliberately. Each bullet says what the risk is, what it costs if it lands, and how it would show up. A way back is named only when it exists today: reverting this PR, or a follow-up that is tracked, written as "tracked" with the issue linked when there is one. A code change nobody has designed or tracked is a follow-up that does not exist yet, so it stays out of the body. This is what a maintainer hunts for months later when the risk lands.

  5. ## AI Disclosure: required. Reproduce the template's two boxes and leave both unchecked. The second reads "I reviewed and ran the change myself", a claim about the human author that nobody else can make for them. They tick one before opening the PR.

  6. ## Testing: required. What ran and what it showed, as three kinds of box in this order:

    • One box for the routine gates: lint, type-check, pre-commit and every suite that passed, named together on one line with the HA version, e.g. - [x] \make pre-commit`, `make test-api`, `make test-integration` (HA 2026.2.3) and `make test-e2e`: passed at the head.`
    • One box per check that exercises this change: a regression test proven by deletion, a run on the HA floor, a devserver or production observation. Variations of one check share its box, so every deletion check is one box.
    • One unchecked box per check a reviewer of this diff would expect and did not get, followed by what that check would show for this diff that the ticked boxes do not. Evidence the tests only simulate keeps its box: a real capture of a response the tests fake, a device or account the change was not run against. A check with nothing to show gets no box: a suite the diff cannot reach, a devserver whose mock cannot show the change, a second route to a check already ticked (a Docker target whose suite ran in a venv), and a /security-review on a diff with no auth, API-client or workflow change.

    Each box is one claim on one line. A suite's result is "passed" and the environment it ran in (the HA version); CI shows the counts at the head. The evidence behind a claim (each mutation tried, timings, value comparisons, what a scrub left) lives in the record. Refer to the head as "the head", without a commit hash: the branch's hashes disappear when the PR is squash-merged.

Every ticked box holds at the head. A check that ran before later commits is re-run at the head when it is cheap (lint, type-check, the suites, the security review). Evidence too costly to repeat, such as a devserver or production run, is ticked with its scope in the claim: "on code that differs from the head only in comments", which a diff can confirm. A later code change makes that claim false, which is the signal to earn the box again.

Word every box as the claim it asserts, never as a negation. Ticking is what makes the claim true, so - [ ] No prod soak inverts its own meaning the moment someone ticks it. Write the claim, - [ ] Prod deployment and soak, and put why it is unticked after it. Only a box that will not be earned in this PR carries such a note; a box waiting on a re-run gets the re-run.

An unticked box says what you did not verify. It does not assert that nobody did: other sessions, other machines and runs that left no artefact in the repo are all invisible from here. "Not run here" is warranted; "has not happened" is not.

Show full SKILL.md (966 more words)Show less

When the base is another branch

If <base> is not the trunk, the PR sits in a stack. Four things follow:

  • Diff against the parent: git diff <parent>..HEAD. Diffing against the trunk shows the parent's changes as if they were yours.
  • The Summary's first line names what this builds on and what it needs from it. One line. The parent PR describes itself, so restating any of its content belongs nowhere. Cite the parent's PR number if it has one; before that, name the branch and expect a number to replace it.
  • Write a stack bottom-up. The lower layer needs nothing from the layer above, so it is drafted, opened and numbered first, which is what gives the layer above both a number to cite and a body to measure against.
  • Compare this body's wc -w against the parent's before handing it over. A layer smaller than its parent gets a shorter body.

Name the category

State why a fact matters. Never restate the fact.

write thisnot this
for real devices the prefix is the building nameone of them is a street address
the cassette carries account identifiersthe account is <address>
the log names a shared devicethe device is <name>
measured on a real accounta real account with 8 units

A body is public the moment the PR opens. Applies to device names, building names, addresses, account identifiers, UUIDs, and counts of a person's units or accounts.

Evidence lives in the record

Measurements, probe counts, failure rates, rejected alternatives and provenance go in the ADR or plan. The body carries the conclusion and a link. A number repeated in both places dates the body the moment it is re-measured.

Design rationale for a tool lives in that tool's docstring.

Proportion

Measure the prose sections. The Testing list and the disclosure boxes sit outside the count: their length tracks how much was verified, and trimming them to hit a number is the one cut that loses a reviewer something.

Weigh it against review surface rather than raw lines. Deleted fixtures, cassettes and generated files inflate --shortstat without adding anything to read, so count the files someone must actually review.

Compare like with like. The merged corpus predates What changes for users and Risks accepted, so its numbers describe Summary plus Key changes and nothing else: about 40 to 100 words when one or two files need review (#255, a two-line i18n fix, is 40), 200 for a 20-file endpoint change (#257), 390 for an 11-file feature (#268), 550 for a 33-file refactor (#269). Hold those two sections against that range.

The other two sections are justified by whether their content is real, not by a word budget: a user-visible change nobody would otherwise notice, and a risk somebody inherits by merging, are both worth their length. Cutting them to hit a number removes the part of the body a reviewer most needs.

So when a body reads long, the question is whether Summary and Key changes have drifted past the corpus for a comparable review surface. File count predicts length poorly, and padding to reach a number is always wrong.

The writer applies this before handing back. Count Summary plus Key changes, find the corpus range for the review surface, and when the count is above it, cut to it. The hand-back reports the count before and after.

Across a stack, compare against the parent's body. With no parent body written yet, use the calibration above and say in your handover that the comparison was unavailable.

Common mistakes

Observed in baseline testing, every one of these from an author who had the diff in front of them.

mistakefix
Restating a sensitive value the reason merely refers toName the category
Opening with how the problem was discoveredOpen with the problem as it stands, then what changed
A Summary that restates the diff in proseLead with the problem; the diff carries the wording of the change
Framing: a sentence that announces, counts or signposts ("The skill sizes a body to its change.")Delete it; if no fact goes with it, it was framing
Over-compression: a dangling participle or a verb with no clear subject ("…, keeping evidence the tests simulate")Give every verb a subject, or split the sentence
Reproducing the ADR's measurement tableOne clause plus the link
"moved from X to Y", "previously", "used to"State current behaviour only
Any negation carrying the emphasis: X, not Y, X rather than Y, isn't an option, is not the argumentSay what is true, positively. Contrast two real options by naming both
Rebutting a position the PR never raisesDelete the paragraph
Explaining why a card, flag or graph existsPut it in the docstring
Arguing for the method instead of reporting what ranSay what ran and what it showed. A Testing preamble that defends the approach is commentary
An em dashA colon where it introduces an elaboration, commas or brackets where it wraps an aside. A body full of them reads as generated
A sentence that defers to a source ("docs/entities.md says so")State the fact, or link the source; a source cited this way vouches for more than it says
since meaning "because"because, or two sentences
A trailing reassurance after a cost ("it shows only as log noise")End the bullet at the cost
A cause, cost or remedy that neither the brief nor the diff holdsLeave it out of the body and list it in the hand-back
Hard-wrapping paragraphs or bulletsOne line each; GitHub renders the wrap as line breaks
Every box checked when verification is partialLeave the box unchecked and say why
Overwriting a body that was handed over for editingRead it first, keep the author's wording, report the change

© andrew-blake, 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 2 other files in .claude/skills/pr-body of andrew-blake/melcloudhome.

  • SKILL.md
  • .markdownlint.jsonc
  • handoff.md

Open the folder on GitHubat commit fdb0b32

Compare with similar skills

PR Body 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 Body compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR Body this skillandrew-blake/melcloudhome142—~4.5kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Open Code Review CLIalibaba/open-code-review45k—~3.1kAutomated safety check: PassApache-2.0
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Pull Request Title and Body Writeropeninterpreter/openinterpreter69k2 repos~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • 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.

    45k GitHub stars~3.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Pull Request Title and Body Writer

    openinterpreter/openinterpreter

    Rewrites the title and body of one or more pull requests with gh, leading with why the change was made, then what changed, and describing only the net result.

    69k GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    86k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed

More from andrew-blake/melcloudhome

  • Grounding A Design

    andrew-blake/melcloudhome

    A skill your agent uses when about to propose, brainstorm, review or revise a design, fix approach or plan for a feature or behaviour change in this repo, including "brief" or "quick" design…

    142 GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Categories

Questions about PR Body

What does PR Body do?

A skill your agent uses when composing or revising a pull request description in this repo, including PRs that sit in a stack. PR Body is an agent skill from andrew-blake/melcloudhome. Use when composing or revising a pull request description in this repo, including PRs that sit in a stack.

When should I use PR Body?

PR Body fits situations like: revising a pull request description in this repo; including PRs that sit in a stack.

How do I install PR Body in Claude Code?

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

How do I install PR Body in Codex?

Run `npx skills add andrew-blake/melcloudhome --skill pr-body -a codex`. Or copy the skill folder (.claude/skills/pr-body in andrew-blake/melcloudhome) into .agents/skills/pr-body in your project. Codex loads it when a task matches its description.

Can I use PR Body 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 andrew-blake/melcloudhome --skill pr-body -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-body, .gemini/skills/pr-body, .github/skills/pr-body and .opencode/skills/pr-body in your project.

What does PR Body need to run?

Going by SKILL.md and its folder, PR Body needs the command-line tools its instructions call (git and gh). Our summary lists: Docker.

Does PR Body access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is PR Body 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 Body use?

PR Body is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PR Body use?

About 4.5k tokens (SKILL.md is roughly 18k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to PR Body?

Skills that share tags, products or a category with PR Body: Finishing a Development Branch (obra/superpowers, 297k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars), Open Code Review CLI (alibaba/open-code-review, 45k stars) and Create Pull Request (cline/cline, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR Body?

andrew-blake (a GitHub user) maintains it in andrew-blake/melcloudhome, which has 142 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 9, 2026.

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