agentleFS
helderbertohelderberto/agent-skills/skills/create-pull-request/SKILL.md

create-pull-request

Skill16 starsChanged 7 months agoMITView on GitHub

Create a GitHub pull request — concise body on the repo's PR template, conventional-commit title, ticket refs. `--draft` for a draft PR, `--diagram[=type]` to add a mermaid diagram of the change.

  • Commits and pushes

13 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask the user, all at once: effort in hours (required), what was done in their words (required), testing not visible in the diff, tricky …

    line 19
  2. Very specific:

    Commit anything uncommitted first (never open a PR on a dirty tree), push with -u if needed, gh pr create with a HEREDOC body (--draft if …

    line 24

“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create Pull Request

Arguments: $ARGUMENTS

  • --draft — create as draft.
  • --diagram — append a ## Diagram section with a mermaid diagram of the change (GitHub renders it natively). Optional =flow|sequence|class|state forces the type; otherwise pick by the shape of the change (below).

Workflow

  1. In parallel: base branch (git remote show origin | grep 'HEAD branch'), ticket id from the branch name ([A-Z]+-[0-9]+), PR template (.github/pull_request_template.md, .github/PULL_REQUEST_TEMPLATE.md, .github/PULL_REQUEST_TEMPLATE/, docs/pull_request_template.md, pull_request_template.md).
  2. In parallel: git diff <base>...HEAD and the full commit list — review every commit, not just the latest.
  3. Ask the user, all at once: effort in hours (required), what was done in their words (required), testing not visible in the diff, tricky parts, and any template field the diff can't answer (breaking change? type of change?).
  4. Draft title and body.
    • Title matches ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(.*\))?: .+$.
    • Template found → it is the body, verbatim structure: fill every section and placeholder, check applicable boxes, add nothing outside it except ## Diagram when requested. No template → ## Summary + ## Test plan.
    • Reference the ticket (Resolves TICKET-123).
  5. Commit anything uncommitted first (never open a PR on a dirty tree), push with -u if needed, gh pr create with a HEREDOC body (--draft if requested). Return the URL.

Writing the body

Concise and readable by someone who didn't see the diff. Each section 1–4 sentences or a short bullet list. Lead with the why, then the what; the diff already shows the how. Incorporate the user's answers — don't paraphrase the diff back at them. Cut a template section's boilerplate prose only if the template marks it optional; otherwise fill it in one line.

Diagram (--diagram)

Pick the type by what changed:

ChangeType
request/response, handlers, integrationssequenceDiagram
pipeline, branching logic, data migrationflowchart
models, types, schemaclassDiagram / erDiagram
UI or process statesstateDiagram-v2
module refactorflowchart before → after, or a dependency graph

Rules: ≤ ~12 nodes; only the path the PR touches, not the whole system; mark new or changed nodes with a classDef changed style so unchanged context reads as context. If the change is linear (one file, one function) a diagram adds nothing — say so in one line instead of forcing one.

flowchart LR
  A[Request] --> B[validateInput]:::changed --> C[Service] --> D[(DB)]
  classDef changed stroke:#e67e22,stroke-width:2px

Rules

  • gh CLI only. Never force push. Never push from main/master without confirmation.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.