Index of every page on this site: llms.txt
All skills
jd-solanki avatar

/create-pr

@372cfb1
by JD Solankijd-solanki/ai6 stars
2
Run it yourself

Open one pull request as a draft, with a body the reviewer can act on.

Use this Skill: https://skilld.dev/gh/jd-solanki/ai/create-pr

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈20 tokens for metadata: the name and description. ≈2.1k when used: this file.

Description uses 1.0% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈82 characters, or 1.0%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Create PR

Read /writing-for-humans skill first. It carries the title, the shape, the evidence rules, and the de-slopping pass. This skill adds only what a pull request needs on top.

The work is already written and committed. This turns it into a pull request a reviewer can act on. It opens as a draft. Marking it ready for review is the author's call, never yours.

The body carries what the diff can't

The diff is already open in the reviewer's tab. Anything they can read there is not your job to restate: bullets that say "adds X", "moves Y", "renames Z" pad the body without giving the reviewer something new. The body is these sections, in this order:

  1. ## What problem this solves — the issue that already exists, or the feature that is missing. What was true before, and what forced the change: the trigger, the report, the deadline, the security note.
  2. ## How this PR solves it — the idea holding the lines together, and the alternative you rejected. The reviewer reads the diff for the lines; they read this for the shape, so show it: see Show the shape.
  3. ## Screenshots and videos — only when the diff changes what a user sees; a pull request with no UI change has no such section. See Screenshots and videos.
  4. ## What happens when this merges — the effect downstream. Behaviour that changes for users, a migration that has to run, a follow-up this unblocks. Name the door: one-way when the merge is hard to walk back (a destructive migration, a published contract, deleted data), two-way when a revert undoes it. Then the blast radius: what breaks if the change is wrong (consumers, layout, mobile, a scheduled job).
  5. ## QA steps — how a person tries the change by hand before it merges: the QA scenarios /write-qa-scenarios writes for this change, happy and unhappy paths, each an unticked checkbox. Whoever tries a scenario and sees it pass ticks its box.
  6. ## Notes — what a careful reader still cannot infer from the diff after reading it. Invariants that hold across the change, a decision that looks arbitrary but was deliberate, a gotcha that will trip the next person, a constraint from outside the repo.

Anything belonging to none of them gets its own section after them, named the way a colleague would name it.

Every section survives on the test "could the reviewer figure this out from the diff alone?" A section that fails comes out rather than getting padded. What problem this solves and QA steps stay regardless — the reason for a change and how to try it are never in the diff — so a body carrying only those two is a fine pull request.

Show the shape

Pick the smallest visual that makes the approach clear, and place it beside the sentence it supports. Usually one, sometimes two:

  • Logic or an algorithm: pseudocode.
  • Runtime control flow: a call tree.
  • UI structure: a component tree, with the state and module boundaries that matter.
  • File responsibilities or a broad refactor: a shallow file tree, one comment per folder.
  • Interaction or data flow between parts: a Mermaid diagram.
  • A change to a shape that already exists: a diff block of that tree or flow.
 submitForm
   createSession
     persistPrompt
+    expandSkillMention
     launchAgent

Keep only the calls, files and boundaries the reviewer needs to see the idea. A visual that copies the code diff fails the diff-alone test like any bullet.

Screenshots and videos

Pixels are the one thing a UI diff cannot show. Capture them with /capture-media, purpose showcase, from the running app: it picks the media this change needs, highlights, before / after screenshots, a video for a flow, and hides personal data. Capture them on every run of this skill, so the media always shows the code being reviewed.

Lay them out with any highlight first, then one row per surface and state:

| Location | Before | After |
| --- | --- | --- |
| Explore › Logs | ![Explore › Logs before](./shots/logs-before.png) | ![Explore › Logs after](./shots/logs-after.png) |
| Explore › Logs, loading | ![Explore › Logs, loading before](./shots/logs-loading-before.png) | ![Explore › Logs, loading after](./shots/logs-loading-after.png) |
  • Location is a › breadcrumb to the surface, then the state after a comma. Trace the changed components to every page, drawer or modal that renders them, and every state the change touches.
  • A surface that is new gets — for Before.
  • A video goes on its own line under its row or highlight, since a table cell does not play it.
  • Save the files to shots/ in a temp directory, beside the body file. Step 5 uploads them.

Read the diff, don't imagine it

git diff <base>...HEAD and git log <base>..HEAD before you write a word.

Every claim in the body traces back to a line you read. A body that describes a change the diff does not contain costs the reviewer more than an empty body: they have to find the lie before they can start reviewing.

Reading the diff also settles which sections are real. If a bullet you drafted turns out to sit in plain view of the diff, it fails the test and comes out.

The title becomes history

Your title is the line the squashed merge commit carries, so write it for git log.

Link the ticket

Closes owner/repo#123 at the bottom of the body, so merging closes the ticket. Reference the ticket by ID rather than pasting a link: some trackers put private detail in the URL.

No ticket exists? Write the body anyway and leave the line off. Do not open a ticket just to link it.

Length

One change per PR. A refactor and a fix in the same diff make the reviewer grade two things at once, and they will do both worse.

Process

1. Check where you are

You need a branch that is not the default one, and a clean tree with your work committed. On the default branch, or holding uncommitted changes? Say so and stop.

Done when: you know the base branch, the current branch, and that nothing is uncommitted.

2. Read the change

The diff, the log, and the ticket it closes.

Done when: from what you read, you can state the problem, the approach, the downstream effect with its door and blast radius, the QA scenarios a reviewer will try, every Note you plan to include, and, for a UI change, every highlight and every row of the screenshots and videos.

3. Draft the body

Title, then the sections in order, then any section that fits none of them, then the ticket line. Drop a section that fails the diff-alone test rather than filling it.

4. Clean it up

Run the draft through /writing-for-humans: the title, the evidence, the secrets check, and the humanizer pass. Extra tells in a pull request:

  • A bullet per file that only restates the filename.
  • A second section of checks beside ## QA steps (How you know, Verification). Fold it into QA steps, or cut it if it only restated the diff.

5. Open it

Push the branch and open the pull request as a draft:

gh pr create --draft --base <base> --title "<title>" --body "<body>"

With screenshots or videos, pass the body as --body-file <dir>/body.md and add --attach ./shots/<file> per file, run from <dir>: gh uploads each one and rewrites its reference in the body to the hosted asset. Editing an existing body works the same way with gh pr edit <n> --body-file <dir>/body.md --attach ./shots/<file>.

Return the link, and say plainly that it is a draft waiting for them to mark it ready for review.

Labels go on after it exists (gh pr edit <n> --add-label ...), and only labels the repo already has.

Where it goes

GitHub through the gh CLI is the fallback. Before you settle for it, check git remote -v: GitLab takes glab, where the draft flag is --draft on glab mr create.

A repo pull request template at .github/pull_request_template.md is the house style, and it wins. Fill its sections; sections that do not apply to this change come out rather than getting padded. A template with no QA section still gets ## QA steps, after its own sections.

Boundaries

Opens the pull request. Reviewing it, merging it, and marking it ready for review belong to a person.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts16d3 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides a structured process for creating draft pull requests using GitHub or GitLab CLI tools. It includes strong security advice, such as blurring personal data in screenshots and checking for leaked tokens. It is rated as low risk because it processes untrusted repository content (diffs and tickets) to generate PR bodies, which is a common surface for indirect prompt injection.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

Signed by skilld at 372cfb1. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 5 days ago
Other metadata
metadata
{
  "credits": [
    {
      "skill": "show-me",
      "author": "Dex Horthy",
      "organisation": "Humanlayer",
      "url": "https://github.com/humanlayer/skills/blob/main/plugins/show-me/skills/show-me/SKILL.md"
    },
    {
      "skill": "pr",
      "author": "Matt Pocock",
      "url": "https://github.com/mattpocock/skills/blob/main/skills/engineering/pr/SKILL.md"
    },
    {
      "skill": "pr-screenshots",
      "author": "Josh Goldberg",
      "organisation": "Sentry",
      "url": "https://github.com/getsentry/skills/blob/main/skills/pr-screenshots/SKILL.md"
    }
  ]
}

README badge

README badge for jd-solanki/ai/create-pr