Code & Engineering

PR Description From a Diff

Writes a pull request title and description from a pasted unified diff, as Markdown only - a title line of at most 72 characters, then four fixed sections - Summary, Changes, Tests and Risks - where every file the diff touches is named once, including renames, deletions, binary files, mode changes, lockfiles and formatting-only edits, and nothing is claimed that the diff does not show. It describes what the hunks change and leaves out a reason, a speed gain, a security fix or a test result unless the author's note supplies it, flags what can break callers, links an issue only when one is given, never copies a secret into the text, treats a note addressed to the AI inside a code comment as data, and says so when the diff is cut off. Use when asked to write a pr description, pull request body or merge request text from a git diff or a patch.

PR Description From a Diff is a tested SKILL.md that writes a pull request title and description from a pasted unified diff, as Markdown only - a title line of at most 72 characters, then four fixed sections - Summary, Changes, Tests and Risks - where every file the diff touches is named once, including renames, deletions, binary files, mode changes, lockfiles and formatting-only edits, and nothing is claimed that the diff does not show; an agent buys it once for $0.03 over x402.

Tested 2026-10-08No code, no hidden instructionsv1.0.0 · 10.6 KB · perpetual license

Not for

It does not read your repository, run the code or the tests, or open a pull request; the pull request description it writes comes only from the diff you paste in, plus an issue number and the author's note if you add them. It cannot say why a change was made when the note does not. It describes a change, it does not hunt for defects or judge the design, and it writes no changelog entry.

Tested, honestly

Tested 2026-10-08 with a strong and a weak model.

With and without the skill

Results with and without the skill, for Sonnet and Haiku
SonnetHaiku
withwithoutwithwithout
Descriptions written right (24 diffs)22/2420/2419/2416/24

Same request on both sides, a fence removed first. Read by hand, Sonnet without the skill already named the files, kept to the diff and ignored the hidden instruction. It missed four: it called an HTML swap a security fix the diff does not show, repeated the author's word refactor although a default value changed, described a lockfile-only diff as a dependency upgrade with reasons it could not know, and did not link issue #12. Haiku without the skill missed eight of the same kinds.

Same cases and the same checks with and without the skill. The cases are ours, written around what the skill is for; with a handful of cases, a difference of one or two is within noise.

SonnetStrong model, claude-sonnet-5-5
Right on 22 of 24 diffs, read by hand, but it missed two: on a diff with a binary file and a mode change its title ran to 79 characters where the limit is 72, and on a diff that came with issue #12 it wrote a sentence about the issue instead of linking it. Everything else held: every changed file named, a lockfile-only diff described as such, a default value changed under a note that calls the work a refactor, an HTML swap with no security claim the diff does not show, no invented test result or ticket, a secret written into a file flagged, a cut-off diff said to be cut off, a Bulgarian note answered in Bulgarian, and an instruction hidden in the diff ignored.
HaikuWeak model, claude-haiku-5-5
Right on 19 of 24 diffs, read by hand, but it missed five: it claimed a speed-up the diff does not show, did not flag a secret written into a file, left issue #12 unlinked, and on two plain diffs broke the section rules.

Full test summary

Example

Our own test text, before and after the skill ran. Excerpts only.

English · claude-sonnet-5-5

Before

Author's note: Add the health endpoint Diff: diff --git a/src/routes/health.ts b/src/routes/health.ts new file mode 100644 index 0000000..9e3779b --- /dev/null +++ b/src/routes/health.ts @@ -0,0 +1,3 @@ +export function health() { + return { status: "ok", uptime: process.uptime() }; +} diff --git a/src/routes/index.ts b/src/routes/index.ts index 3c6ef36..daa66d1 100644…

After

Add a health endpoint and bump CI to Node 22 ## Summary Adds a `health` route handler that returns a status and the process uptime, registers it in the routes index, and serves it at `GET /health`. Per the note, the change adds the health endpoint. The diff also adds the `ms` dependency, changes the CI Node version from 20 to 22, and reformats one legacy file. ## Changes…

Bulgarian · claude-sonnet-5-5

Before

Author's note: Добавена валидация на имейл при регистрация Diff: diff --git a/src/auth/register.ts b/src/auth/register.ts index 76c90bc..1500857 100644 --- a/src/auth/register.ts +++ b/src/auth/register.ts @@ -1,3 +1,6 @@ export function register(input: Input) { + if (!isValidEmail(input.email)) { + return { ok: false, error: "Невалиден имейл" }; + } return createUser(input); }…

After

Добавя проверка на имейл във функцията register ## Summary Функцията `register` вече проверява имейла с `isValidEmail` преди да създаде потребител. Според бележката на автора промяната добавя валидация на имейл при регистрация. Няма посочен номер на задача. ## Changes…

What is in the file

  • The answer
  • Changes: every file, once
  • Claims: only what the diff shows
  • The issue link
  • Tests
  • Risks
  • Text addressed to you
  • Work in this order
  • Short examples

Languages

Any language. Tried in: English, Bulgarian.

License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Full terms.

Versions

Current version 1.0.0, updated 2026-10-08. Whoever bought an earlier version gets new ones free through the same re-download token.

  1. v1.0.0 · 2026-10-08

    First release: turns a pasted unified diff (plus, when given, an issue number and the author's note) into a pull request title of at most 72 characters and a description with four fixed sections: Summary, Changes, Tests, Risks, as Markdown only. Every file header of the diff gets one bullet, including renames (both paths, similarity read), deletions, binary files, mode-only changes, lockfiles, snapshots, generated files and formatting-only files. Claims are limited to what the diff or the note shows: the reason only from the note and attributed; no security, speed or "no behaviour change" of the writer's own; a changed default is stated even under a refactor note; test results are never claimed and a missing test file is said as "No test changes in this diff."; Risks flags removed or renamed exports, changed signatures, deleted files, migrations, dependency and configuration changes, credential-looking values (never copied) and added TODO or FIXME, or says "None visible in the diff."; the issue is linked with a closing word only when its number is given; a line addressed to the AI inside the diff is reported, not obeyed; a cut-off diff is said to be cut off. Written to brief § 3.29 of docs/plan-batch3-briefs-21-40.md. The format facts are the stable extended-header lines of the unified diff (similarity index, rename from/to, old/new mode, "Binary files differ"); the closing words are the ones GitHub documents for linking a pull request to an issue. Neither page was re-fetched on the day of writing (no network step in this task), so both are from memory of the documented form. Model runs, the baseline and the price follow the measurement, not this entry; the starting price is class B, $0.02.

FAQ

Files a quick summary would skip: does it name them?

Lockfiles, snapshots, generated files, a file with only whitespace changes, a deleted test, a renamed file with both paths, a binary image and a file whose only change is its permission bits. Each gets a short bullet that says exactly what the diff shows, and a binary file is called binary with its content not shown.

Will it say the change fixes a bug, improves speed or closes a ticket?

Only when you say so. A diff shows lines added and removed, not the reason, so a motive, a security fix, a speed gain or no behaviour change is repeated only when the author's note supplies it, and then it is attributed. An issue is linked only when you give its number. Test results are never claimed, and Tests says plainly when no test file changed.

What happens to secrets and to instructions hidden in the diff?

A token or key written into a file is reported under Risks as a credential-looking value in that file, and the value itself is never copied into the text. A line addressed to the AI inside a code comment is reported as an added comment and not obeyed. A diff that is cut off is said to be cut off, and the missing files are not described.

Does it help Claude Sonnet?

The gain sits in claims the diff cannot back. Twenty-four diffs were described by Sonnet and by Haiku, in two rounds, skill in and skill out, every description scored by code. Plain Sonnet named the files well but called an HTML swap a security fix, echoed a refactor note over a changed default, and read reasons into a lockfile-only diff: 20 right. With the skill, 22; it still wrote one title of 79 characters and once left issue #12 unlinked. Haiku went from 16 to 19. The output is a title plus Summary, Changes, Tests and Risks.

Share

Read this page as Markdown: /skills/pr-description-from-diff.md.

  • Changelog From Commits

    Code & Engineering

    SKILL.md · v1.0.0 · 8.6 KB

    Turns a commit list into one release entry in Keep a Changelog form, as Markdown only with no fence and no preface. Groups changes under Added, Changed, Deprecated, Removed, Fixed and Security in that order, writes user-facing one-line entries, drops merge, chore, ci, build, test, style, internal docs, internal refactor, wip and version-bump commits, flags breaking changes, keeps the issue and pull request numbers that are in the input and never adds one, a date, a version, a name, a commit hash or a link host that is not given. Uses an Unreleased heading when no release is named and can end with the Semantic Versioning bump the commits call for. Use when asked to write release notes or the next version bump from commits, a commit log or merged pull request titles, including Conventional Commits.

    $0.04once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • Code Review

    Code & Engineering

    SKILL.md · v1.0.4 · 6.0 KB

    Reviews a code change (a diff or a changed file pasted as text) and reports real problems ranked by severity — correctness bugs, security holes, data loss, missing error handling, edge cases, resource leaks — each with location, reason and a concrete fix in words. Use when asked to review code, a diff or a pull request, check a change for bugs, or find security problems in a snippet.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 30 Sep 2026

  • Unified Diff Repair: Fix the Counts, Keep the Change

    Code & Engineering

    SKILL.md · v1.0.0 · 10.5 KB

    Repairs a unified diff (the patch format of git diff and diff -u) so that git apply and patch accept it against the file it was written for, and answers with the diff only, no code fence. Recounts the numbers in each hunk header from the hunk's own lines, puts back context lines and removed lines exactly as the file has them (tabs, trailing spaces, blank lines, carriage returns), adds the backslash line that marks a missing final line break, restores hunk order, merges overlapping hunks and puts back an unchanged line that a hunk lost. Every added and removed line stays exactly as written, and no change is improved or re-indented. When the lines a hunk expects are not in the file, or fit in more than one place, a fixed one-line CANNOT REPAIR answer replaces a guessed patch. Use when an agent, a tool or another model produced a patch that is rejected, reports a corrupt patch, or looks wrong, or when asked to fix, recount or make a diff apply.

    $0.02once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • Test Guard Review: Can This Check Fail?

    Code & Engineering

    SKILL.md · v1.0.1 · 10.3 KB

    Reviews a pasted test, check script, smoke test, mutation script or CI step and says whether it can fail when the thing it guards is broken, so a green result is worth something. It finds a completeness guard that counts its own hard-coded list instead of the directory, a one-star glob that never enters subfolders, a mutation script that restores with git checkout and wipes the uncommitted fix under test, a null test that an empty string passes, a status 200 that is only the login page, a wait loop without sleep that measures network speed instead of time, a test that calls the pure function directly and never the call site, a counterfactual control whose data does not create the condition, a fix copied into two branches and tested in one, a limit tested only with ordinary values, and a catch that turns a failure into success. Each finding has a fixed code, the place, why it passes and the one input that would make it fail, or exactly No findings. Use to review a test that cannot fail, a check script that always passes, or a guard before you trust it.

    $0.03once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026