workbench-soft/agent-skills/create-pr

Claude Code and agent skill by workbench-soft/agent-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when the user asks to open, create or update a pull request or write its description, in any repository: "open a PR", "write the PR body", "сделай PR". Writes a body under 30 lines: problem, before and now, how the agent did it (skills, code read and why), related PRs, mermaid user flows, data changes, new command output, reused code, packages and generator commands. Then creates or updates the PR with gh.

Install

npx vskill@latest install workbench-soft/agent-skills/create-pr

SKILL.md

The same SKILL.md was published earlier as workbench-soft/agent-skills/create-pr.

Create a pull request

The user's request MUST pick one of two modes:

  • Describe only: the agent MUST draft the title and body, show them, and

stop there.

  • Create or update: the agent MUST draft them, then run gh. "Make a PR"

MUST count as this mode.

1. Collect the facts

Guessing what the change does MUST NOT happen. The agent MUST read the diff:

bash
git rev-parse --abbrev-ref HEAD # current branch
git log --oneline "$base"..HEAD # commits on this branch
git diff --stat "$base"...HEAD # files touched
git diff "$base"...HEAD # the actual change
GH_PAGER=cat gh pr view --json number,title,body # PR already open?

$base stands for the branch this one was cut from. The agent MUST find it once:

bash
remote=$(git remote | grep -qx origin && echo origin || git remote | head -1)
base=$remote/$(GH_PAGER=cat gh repo view --json defaultBranchRef \
-q .defaultBranchRef.name)

Most repos call the remote origin, but a fork or a mirror can differ. The name MUST be read from git rather than typed.

The agent MUST look for these too:

  • A PR template, in .github/pull_request_template.md or under

.github/PULL_REQUEST_TEMPLATE/, MUST be used when present.

  • The commit and PR rules of the repo MUST be read: CONTRIBUTING.md,

AGENTS.md, CLAUDE.md.

  • An issue id in the commits or the branch name (PROJ-123, JIRA-123, #42)

MUST be picked up.

Where the repo rules and this skill disagree, the repo rules MUST win. A template MUST keep the parts it requires (checkboxes, headings), with the sections below placed inside it.

2. Title

The title MUST match the repo's commit convention. The usual ones MAY be an issue id prefix, PROJ-123: add page pattern examples, or conventional commits, feat(auth): add page pattern examples.

Without a convention, the title SHOULD be one short imperative sentence on what the change does, leaving out how.

3. Body

The writing-style skill MUST be loaded before the first line, as section 4 describes.

When a Jira ticket exists for this change, its name MUST sit alone on the body's first line, ahead of the sections: PROJ-123. The name MUST go without a link. The agent SHOULD look in the branch name or the commits, MUST ask when both lack it, and MUST drop the line when no ticket exists.

The sections MUST follow in the order below. Some are conditional:

  • `Related PRs` MUST appear only when the change builds on or goes with

another PR.

  • `Data changes` MUST appear only when the diff adds or changes a database

object.

  • `Try it` MUST appear only when the change adds or changes a command.
  • `Sources` MUST appear only when the work drew on something outside the

repo.

  • `Generated by commands` MUST appear only when a command wrote or rewrote

files in the diff.

  • `How it was done` MUST appear when an agent wrote the change.

A change with no screen for a person, such as an agent, a skill or a tool, MUST still get the User flow diagrams. They MUST show the steps the agent or tool runs, before and after.

The prose MUST stay under 30 lines, not counting the diagrams and command blocks. Its reader is on a phone, in a notification, and hasn't opened the diff. The body MUST follow this template:

`markdown
## What problem this solves
<Who was hurting and how. One or two sentences, the symptom a person could see,
not the internals. Three symptoms or more go in bullets instead.>
## How it worked before
<What happened before this change, as the reader would see it. One or two
sentences, or two to four bullets.>
## How it works now
<What the change does, in order. Two to five bullets, one line each. Each one
opens with its point in bold, then the behaviour. The file name only if it
helps.>
## How it was done
<How the agent approached the work, one bullet per step. Each bullet names the
skill, agent or tool it used or changed, says in a few words what that thing is,
and why it was needed. Code it read: what it read and what that settled. Code
it copied a pattern from: where it sits.>
## Related PRs
- [<owner/repo#123>](url): <what this PR needs from it, or it from this PR>
## User flow
**Before**

flowchart LR <the flow as it was, nodes coloured by status>

**After**

flowchart LR <the flow as it is now, same node IDs>

Green new, amber changed, red removed, gray unchanged.
## Data changes
<One bullet per table: what was added, dropped or changed.>

erDiagram <the changed tables and the tables their keys point at>

flowchart LR <Before and After pair: the trigger, the step that writes, the table>

## Try it

$ <the exact command, with real arguments> <the output to expect>

## Sources
- [<what it is>](url): <what the change took from it>
## Reused code and packages
<What the change reuses from this repo, one line each: the name, where it sits,
what it does here. Then every dependency it adds: the name, what it does, its
size. Then the packages you looked at and turned down, with the reason. No new
package? Write "No new packages." and, if a well known package would have fit,
say why you wrote it by hand instead.>
## Generated by commands
<Which part of the diff came out of the commands below, in one line, so the
reviewer reruns them instead of reading it.>

<the files this command wrote>

<the exact command, run from the repo root>

A bullet MUST end within two lines. Past the cap, the agent SHOULD drop a bullet and leave the wording alone.

User flow

The diagram MUST trace the paths a person follows through the change. GitHub draws the mermaid block as an image. Each flowchart MUST come as a Before and After pair coloured by status: references/diagrams.md.

  • Every path the change adds or alters MUST appear. Paths it leaves alone MUST

stay out.

  • Each node MUST be a screen or an action, in plain words: "Picks a photo",

"Sees the size error". File and function names MUST stay out.

  • An error, cancel or retry branch MUST get an arrow of its own with a label:

-->|over 25 MB|.

  • One diagram SHOULD hold ten nodes at most. A larger change SHOULD get a

diagram per flow.

  • A label holding brackets, quotes or a colon MUST be wrapped in double quotes,

or GitHub can't render the block.

With no person involved, like a CI job or a migration, the diagram MUST show the trigger and the result.

Related PRs

Any PR this change builds on, copies from, waits on or has to ship alongside MUST get a link, in this repo or elsewhere. The reviewer can't judge the diff without it. With no related PR, the section MUST be left out, and no "None" line either.

  • The agent SHOULD look in its own session first, then the branch this one was

cut from, the ticket links and the commit messages.

  • Each line MUST hold the full URL, so the link still works from another repo.
  • Each line MUST name the tie between the two: "builds on its formatBytes",

"the API side of this change", "copies its retry logic".

  • When a merge order exists, it SHOULD be given: "merge after", "ship together".
  • A URL MUST NOT be invented. When the agent knows of a PR but can't find it,

it MUST ask the user.

The lines SHOULD read like this:

markdown
-[acme/api#412](https://github.com/acme/api/pull/412): adds the 25 MB limit this page reads. Merge it first.
-[acme/web#87](https://github.com/acme/web/pull/87): same upload fix for the old page, this PR copies its error text.
Data changes

Database objects are tables, columns, keys, indexes, constraints, views, enums and stored procedures. They turn up in migrations, *.sql, schema files and ORM models. A diff without one MUST leave the section out.

  • Tables every table added or changed MUST get a bullet: the name in bold,

then the columns added, dropped or renamed, with type and nullability.

  • Relations the erDiagram MUST include each changed table and every table

a changed key points at. A new column MUST get a "new" comment.

  • Data flow the flowchart MUST trace how data gets to each changed table:

the trigger, the step doing the write, then the table as a node.

  • Writes an arrow into a table SHOULD be labelled: -->|insert|,

-->|update|, -->|delete|.

  • Backfill a migration that fills or moves existing rows MUST get a path of

its own.

Try it

This section MUST cover a command that is new or changed: a CLI, a script, a package.json script, a Make target, a slash command, a new flag.

  • The agent MUST give the exact line a person types, with real arguments, then

its output.

  • When the command is local and safe, the agent SHOULD run it and paste the

real output, cut down to the lines a person looks at.

  • A command that needs secrets or touches shared systems MUST NOT be run. The

agent MUST work out the output from the code and put # expected, not run above it.

  • A command that validates its input SHOULD also show one bad input and the

error it gives.

The section SHOULD read like this:

console
$ todo add "Buy milk" --due friday
Added #14 "Buy milk", due Fri 10 Oct
$ todo add ""
error: the title is empty
Sources

Each resource outside the repo that shaped the change MUST get a link: a Figma frame, a Confluence page, an API doc, a Slack thread, an issue in another repo. The reviewer holds the code up against it.

  • The link SHOULD land on the exact spot: the Figma frame with its node-id,

the heading in the doc, the Slack message.

  • Each line MUST name what the change took from it: the error text, the

spacing, the rate limit.

  • The agent SHOULD look in the ticket's links and attachments, its own session,

the commit messages and the comments in the diff.

  • A URL MUST NOT be invented. When the agent used a source but lost it, it MUST

ask the user for the link.

  • The Jira ticket MUST go on the body's first line, outside this list.
  • The spec the branch adds or extends under specs/ SHOULD come first in this

list, linked to the file on the branch.

  • A pull request MUST go under Related PRs, outside this list.

The lines SHOULD read like this:

markdown
-[Upload error, Figma](https://www.figma.com/design/AbC123/Uploads?node-id=12-345): the error text and its red.
-[Upload API, Confluence](https://acme.atlassian.net/wiki/spaces/API/pages/123456): the 25 MB limit.
What belongs in Reused code and packages

Reused code MUST come first, packages after.

Reused is code already in the repo before this branch that the change now calls: a helper, a component, a hook, a service, a type. It MUST be listed.

  • The agent SHOULD spot it in the imports and calls the diff adds. Code outside

the files the branch created counts: git diff --diff-filter=A --name-only "$base"...HEAD.

  • Each line MUST give the thing, its location and its job here.
  • The list SHOULD end at five. It SHOULD lead with what a reviewer would expect

to see written from scratch.

  • When the reused code is too minor to name, the reused lines MAY go.

Packages is third party code the change now depends on, or would have. A new peer or dev dependency MUST count too.

Both lists MUST leave out the repo's own tooling: Vitest, Nx, the linter. The same MUST go for MCP servers, editors and agents. A command that wrote code MUST go under Generated by commands.

The diff MUST be checked before any line about packages. A package missing from the manifest MUST NOT be claimed: git diff "$base"...HEAD -- '**/package.json' 'package.json'.

Each rejected package MUST give its reason in a few words: size, unmaintained, its licence, it pulls in a lot, the repo already covers it, or a hand-written version takes ten lines.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/workbench-soft/agent-skills/create-pr/badge)](https://verified-skill.com/skills/workbench-soft/agent-skills/create-pr)

Something wrong with this skill or its page? Tell us.