agentleFS
dennisrongodennisrongo/claude-skills/skills/create-pr/SKILL.md

create-pr

Skill1 starsChanged 3 months agoMITView on GitHub

End-to-end pull-request flow with a review gate before publishing - pushes only with approval, one PR per repo with house defaults from config, sibling PRs cross-referenced with deploy order, and every setting re-verified after creation. Detects the provider from the git remote. Use this skill whenever the user says "create a PR", "open a pull request", "publish the branch and create a PR", "PR this", "ship this branch", "create the PRs for this task", or "raise a PR" - even if they do not name the skill. For reviewing an existing branch or PR rather than creating one, use `code-review` in branch scope.

  • Commits and pushes

196 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use update-pr, act-on-feedback and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    update-pr

    Update the pull request for the current session. Use when the user wants to push new changes to an existing PR.

    Also in 9 projects that use this

  • MicrosoftSkill

    act-on-feedback

    Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit Feedback button.

    Also in 3 projects that use this

  • ModelEngine-GroupSkill

    create-release-note

    从 PR/commit 中自动生成结构化的 Release Notes,并可选创建 GitHub Draft Release。支持 x.y.0 版本合并前一 minor 系列的 release notes。当用户要求生成发布说明、创建 release notes 时触发。参数为版本号和可选的上一版本号。

    Also in 3 projects that use this

  • frostneySkill

    native-nostalgia-stack

    Applies the user's FreePascal toolchain and its build, formatting, hook, and test contracts while leaving project-specific mechanics local. Use when scaffolding or working in a FreePascal project that follows this toolchain.

    Also in 3 projects that use this

  • frostneySkill

    software-engineering-excellence

    Applies the user's engineering standards during substantial technical work: preserve scope, use current evidence, delegate independent parts, and complete authorized outcomes. Use during substantial implementation, debugging, refactoring, or multi-part delivery work.

    Also in 3 projects that use this

  • parkchuSkill

    start-mission

    넥스트스텝(NextStep) 미션을 처음 시작할 때, 미션 저장소를 fork·clone하고 최초 작업 브랜치(step1 등)까지 만들어 준다. gh CLI로 fork하고 clone까지 이어서 처리하며, gh가 없거나 인증이 안 돼 있으면 브라우저 Fork 안내로 폴백한다. 이미 fork/clone돼 있으면 재사용하고 이어서 진행한다(재실행 안전). 사용자가 "미션 시작하려는데 저장소 세팅해줘", "새 미션 시작할래", "fork부터 해줘", "/nextstep:start-mission" 등으로 요청할 때 사용한다.

    Also in 3 projects that use this

  • +1 more from microsoft

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 179 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not use for reviewing an existing PR (use code-review in branch scope) or for local-only git work.

    line 16
  2. Very specific:

    Commit subjects on the branch follow the configured pattern (e.g.

    line 27
  3. Very specific:

    If SQL files changed, run sql-review if installed.

    line 32
  4. Very specific:

    If the branch renames a symbol, changes a default or signature, or touches shared state (schema, config, flags, events), also run …

    line 33

“Common” is measured: kept by at least 6 in 10 of the 179 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 PR

The full flow from "the branch is ready" to "verified PRs exist" — with the review gate where it belongs: before anyone else sees the code.

When to use this skill

  • "create a PR" / "open a pull request" / "raise a PR"
  • "publish the branch and create a PR" / "ship this branch"
  • "create the PRs for this task" (multi-repo)

Do not use for reviewing an existing PR (use code-review in branch scope) or for local-only git work.

Workflow

0. Anchor

State in one line: work item/ticket id, branch name, and every repo the change touches. The id comes from the branch name or the commit subjects you read this session (git log --oneline <target>..HEAD) — never from memory of the conversation, and never a number mentioned earlier for different work. If neither carries one, ask — it drives the PR title, the work-item link, and the sibling grouping; an invented id links the PR to someone else's ticket. Multi-repo detection: a change described as one task with commits carrying the same #<id> across repos is ONE work item → one PR per repo, never one PR spanning repos and never several PRs in one repo for the same id. Enumerate candidate repos from what the session names (workspace CLAUDE.md, repos you committed to in this session, or the user's list) and check each with git -C <repo> log --branches --not <target> --oneline --grep "#<id>" — this finds unmerged commits carrying the id even when that repo is not checked out on the feature branch. If you cannot enumerate the workspace's repos, ask the user for the list — never silently assume single-repo for a task described as spanning repos.

1. Preflight

  • Working tree clean? Uncommitted changes are either committed (per the project's subject convention) or explicitly left out — ask, don't guess.
  • Commit subjects on the branch follow the configured pattern (e.g. #<id> (<SCOPE>) <description>). Fix outliers only with user approval (rewriting pushed history needs explicit consent).

2. Review gate — before publishing, not after

  • Run the code-review skill in branch scope on the branch if installed (grouped by task id); otherwise run git diff <target>...HEAD against the configured target — a diff against the wrong base reviews commits that aren't yours or misses ones that are — read every hunk, and report findings in the ✅ format below — N blocking, M suggestions, each finding with file:line and a concrete failure scenario.
  • If SQL files changed, run sql-review if installed; if it is not installed, include those SQL files in this same diff review and say so in the gate report.
  • If the branch renames a symbol, changes a default or signature, or touches shared state (schema, config, flags, events), also run regression-hunt; a confirmed regression is a blocking finding.
  • Green on the exact tree you publish. The review gate runs the suite; if anything changes after it - a blocker fix, a squash, a rebase - re-run and quote the summary line before pushing. A green run on an earlier tree proves nothing about this one.
  • Confirm the base. The configured target branch is the default, but verify it is what this branch actually forked from (git merge-base, the branch's upstream, or the work item). Mismatch means ask which target is correct rather than guessing.
  • Blocking findings stop the flow — but "blocker" carries a burden of proof: name the concrete failure scenario in one sentence ("user does X → wrong Y"). No scenario → it's a suggestion, and suggestions don't stop the flow. Each real blocker is either fixed, or explicitly waived by the user — a waiver is recorded in the PR description ("Known issue: X — accepted because Y"). Zero findings is a valid outcome; proceed.
  • ❌ "Reviewed — looks good" with no findings listed and no diff quoted → that's recognition, not review.
  • ✅ "code-review (branch scope): 0 blocking, 2 suggestions (deferred, listed in PR body). Proceeding."

3. Publish

git push -u origin <branch> per repo — only with user approval; never push unasked. One approval can cover all repos of the same work item if the user says so. A rejected push means the remote moved - fetch and investigate; never force-push to recover.

4. Create — provider detected from the remote URL

Detect from git remote get-url origin output you ran this session — the remote decides, not the tooling installed (gh being on PATH doesn't make this a GitHub repo).

  • GitHub (github.com): follow the github skill — house defaults from .claude/github.json (target branch, title pattern, reviewers, auto-merge, issue link via closing keyword).
  • Any other host (GitLab, Bitbucket, Azure DevOps, on-prem servers): if an organisation provider skill for that host is installed (check the session's skill list), use it for the create and verify mechanics — the review gate, publish approval and post-creation verification in this skill still apply unchanged. With no such skill, STOP and ask the user which provider tooling to use. Do not guess a CLI or improvise raw API calls past this gate.
  • PR description template — intent, not a diff restatement. Copy-paste and fill the <placeholders>:
## What & why
<one paragraph — the user-visible outcome, not a file-by-file narration>

## Work item
<id + link>

## Testing done
<!-- only observed results, quoted, e.g. "integration suite: 84 passed" -->
<!-- A check you didn't run is listed as `not run`, never omitted -->
<result / not run>

## Deploy order / coupling
<!-- multi-repo only: which PR merges/deploys first and why, e.g. DB schema before API, API before client -->
<order + reason, or "single repo — n/a">

## Sibling PRs
<!-- multi-repo only: links to the other repos' PRs for this work item -->
<links, or "single repo — n/a">
  • Multi-repo sequencing: create all PRs first, then edit each description to add the sibling links (they don't exist until created).
  • When a push or create call fails: read the full error, change exactly one thing it names, retry once. A second failure on the same call = stop and report the exact error — never retry verbatim, never move to the next repo as if it succeeded. A partial multi-repo state ("2 of 3 PRs created; repo X failed on: <quoted error>") is reported as exactly that, never rounded up to done.

5. Verify — a setting you didn't check is not set

Re-read each PR after creation: required reviewers actually marked required, work item actually linked, auto-complete actually on, target branch correct, and — for multi-repo — sibling PR links present in every PR body with the deploy order stated. Quote the verification. If any setting is missing: re-apply that one setting and re-verify once; if it is still missing, mark it FAILED in the report table and surface it — never report it as set, and never drop the check (verification doctrine failure protocol: one retry changing exactly one thing, then stop).

Then report a table:

| repo | PR URL | reviewers | work item | auto-complete | target | siblings |

Each cell value is ✓ (verified, quoted), FAILED, or n/a. n/a only when the config does not request that setting; every ✓ is an observed re-read, never an assumption.

Examples

Example 1: single-repo PR

User: "PR this"

Claude: anchors (id #4711, branch feature/4711-rate-limits, one repo), runs the review gate (0 blockers), asks approval to push, creates the PR with configured defaults, verifies reviewers + work-item link + auto-complete, reports the URL.

Example 2: multi-repo work item

User: "publish the branches and create the PRs"

Claude: finds three repos with #4711 commits, review-gates each, pushes all with one approval, creates three PRs, updates each body with the two sibling links and the deploy order (DB → API → client), verifies all three, reports a table of URLs.

Example 3: review gate finds a blocker

User: "create a PR"

Claude: review gate flags a missing null check with a concrete failure scenario. Stops. Presents the finding: fix now, or waive? User says fix → applies the fix, re-runs the gate, then continues the flow.

Anti-patterns

  • ❌ Creating the PR first and reviewing after — the gate exists to keep unreviewed code out of reviewers' queues.
  • ❌ Pushing or creating PRs without explicit approval for the push.
  • ❌ One PR spanning multiple repos, or omitting configured reviewers / auto-complete / work-item link "to save time".
  • ❌ Reporting "PR created with required reviewers" without re-reading the PR to confirm — creation calls can partially fail.
  • ❌ Guessing the work item id from conversation memory — branch and commits are the source of truth; neither has it → ask.
  • ❌ Calling a finding a blocker with no failure scenario attached — no scenario, no stop.
  • ❌ Rounding a partial multi-repo result up to success — "2 of 3 created" is the honest report.
  • ❌ PR bodies that narrate the diff file-by-file instead of stating intent, testing, and coupling.
  • ✅ Review gate → approved push → per-repo PRs with verified house defaults → cross-referenced siblings → URL table.

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.