Pull request
Claude Code plugin: skills, commands, and tooling for SpecScore-driven specification authoring (specstudio:ideate, specstudio:specify, …)
npx -y skills add specscore/specstudio-skills --skill pull-requestAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Gate-and-create-one-PR twin of the ship skill. Enforces the project's pre-PR gates on the current branch via the shared reviewer-gates layer, then creates exactly one pull request — built-in git push + gh pr create by default, or a project-configured delegate skill — and emits pull_request.created. It gates, creates one PR, and records; it never merges, deploys, stacks multiple PRs, retries a delegate, or orchestrates. Trigger: "pull-request", "/pull-request", "open a PR", "specstudio:pull-request".
SKILL.md
9.8 KB, ~2.2k tokens by cl100k_base, as published. Nobody here has run it
Pull Request
Open a pull request for the current branch only after the project's pre-PR gates pass. Pull-request gates, creates one PR, and records — it never merges, deploys, stacks, retries, or orchestrates. The verify gate runs before the PR exists, so a branch below the project's bar (e.g. failing tests or coverage) never reaches an open PR.
Implements the Pull Request Skill Feature.
When to Use
- The user is on a feature branch with commits ahead of the base branch and wants to open a pull request.
- The user wants the project's verify gate (tests, coverage) plus any configured review to run before the PR is created, not after CI flags it.
Refuse and redirect when:
- The current branch is the repository's default branch → print the reason and recommend creating a feature branch first. Create no PR; exit non-zero. (AC:
rejects-default-branch) - The current branch has no commits ahead of the base branch → print "nothing to open a PR for" and create no PR; exit non-zero. (AC:
refuses-when-no-commits-ahead) - The user asks to create the PR before the reviewer gate releases → refuse; the PR is available only after
pull_request.pre_dispatchreleasesApproved.
Pre-Flight
Pre-flight refusals exit immediately, write nothing, create no PR, and dispatch no reviewer and no delegate. The skill operates on the current branch only and creates at most one pull request per invocation — it never accepts, batches, or coordinates multiple branches or stacked PRs. (AC: rejects-default-branch)
Machine gates
These are hard gates the skill enforces itself, before any reviewer or delegate is dispatched.
-
Default-branch guard. Resolve the repository's default branch and the current branch. Refuse when they are the same — there is no PR from the default branch into itself. Print the reason and recommend creating a feature branch. (AC:
rejects-default-branch) -
Commits-ahead guard. Refuse when the current branch has zero commits ahead of the base branch (
git rev-list --count <base>..HEADis0) — there is nothing to open a PR for. Print the reason; create no PR. (AC:refuses-when-no-commits-ahead)
Checklist
Create a task for each and complete in order:
- Pre-flight machine gates (Pre-Flight steps 1–2): default-branch guard, then commits-ahead guard. Any refusal exits immediately.
- Reviewer gate (
## Reviewer Gate): firepull_request.pre_dispatch, load and rungates.pull_request.pre_dispatchreviewers (AND-composed, including thetype: deterministicverify reviewer). Halt onIssues Found; proceed only on release. - PR creation (
## PR Creation): ifpull_request.delegateis configured, dispatch it once; otherwise run the built-ingit push+gh pr createpath. Derive and confirm the title/body first. - Emit (
## Lifecycle Event): on successful creation, apply publication policy and emitpull_request.createdexactly once.
Reviewer Gate
After the pre-flight machine gates pass, the skill fires the pull_request.pre_dispatch gate-point event and evaluates the reviewer gate keyed on it — gates.pull_request.pre_dispatch in specscore.yaml — via the shared reviewer-gates loader and runner. The skill carries no hardcoded baseline reviewer; the reviewer list comes exclusively from the gate config.
- Fire and load. Fire
pull_request.pre_dispatch(single-fire per run; see events.md). Load and validategates.pull_request.pre_dispatch.reviewersvia the loader with event keypull_request.pre_dispatch. If the gate is unconfigured or invalid, the loader refuses per its contract — surface its error verbatim and halt; create no PR. - Run. Dispatch the validated reviewer list via the runner: serial, in declared list order, AND-composed. The gate releases only when every entry returns
Approved. (AC:gate-releases-only-on-all-approved) - Verify reviewer. The project verify check (tests, coverage) is expressed as an existing
type: deterministicreviewer whoserun:command's exit code is the verdict (zero →Approved; non-zero →Issues Foundwith diagnostics captured asBlocker(s)). The skill introduces no new reviewer type — it uses only the types reviewer-gates already defines (ai,human,deterministic,auto-approve). The configuredrun:command must be read-only with respect tospec/; side effects outsidespec/(e.g. acover.outat the repo root) are conformant. - Outcome. On release (
Approved), proceed to PR creation. OnIssues Found, halt: surface the failing reviewer'sBlockerfindings, run nogit pushorgh pr create, and open no PR. A non-zero verify command therefore blocks PR creation before any push runs. (AC:verify-gate-blocks-pr-below-threshold)
PR Creation
When the reviewer gate releases, the skill creates exactly one pull request. It dispatches once and reacts to a single outcome — it never sequences, retries, or orchestrates.
Title and body
Before creating the PR, derive a draft title and body from the current branch's commits — title from the latest/squash subject; body summarizing the commits — and present them to the user for confirmation or edit. Create the PR with the confirmed title and body. (AC: derives-and-confirms-title-body)
Built-in path (default)
When no pull_request.delegate is configured, the skill creates the PR itself:
- Push the current branch to its remote (
git push -u origin <branch>). - Open exactly one ready-for-review (non-draft) pull request whose base is the repository's default branch, using the confirmed title/body (
gh pr create --base <default-branch> --head <branch> --title … --body …).
It creates the PR exactly once and interposes no orchestration. (AC: creates-ready-pr-against-default-branch)
Config schema (pull_request: in specscore.yaml)
pull_request:
delegate:
skill: <skill-name> # the PR-creation skill to dispatch (e.g. commit-push-pr)
args: <string> # opaque args handed to the delegate verbatim
delegate.skill and delegate.args are the only recognized fields. The pull_request: schema MUST NOT grow any field expressing sequencing, retry, merge, or multi-PR behavior.
Delegate override
When pull_request.delegate is configured, the skill dispatches that single delegate skill instead of the built-in path, passing delegate.args. It invokes the delegate exactly once and does not run the built-in git push / gh pr create path, sequence multiple delegates, or retry a failed delegate. (AC: dispatches-configured-delegate)
Lifecycle Event
Runs only on successful PR creation — the built-in path completing, or a configured delegate returning explicit success.
- Publication + event. Build the checkpoint manifest, apply publication-policy.md for the
pull_request.createdcheckpoint, then emitpull_request.createdexactly once withpublication_resultper events.md. The event carries the created PR's identifier (URL/number) and the base/head branches. If creation fails, emit no event. (AC:emits-created-once)
Architectural Boundary
This boundary is load-bearing and applies across the whole skill: pull-request gates, creates one PR, and records — it never orchestrates. Concretely, the skill MUST NOT:
- merge, auto-merge, or approve the PR;
- deploy, build, or release;
- stack, batch, or coordinate multiple PRs in one run;
- retry a failed delegate, or interpose orchestration between itself and the delegate.
Those belong to other skills (ship, the merge step) or to the delegate, never to this skill. The pull_request: config block MUST expose only delegate.skill and delegate.args. (AC: bars-orchestration)
Red Flags
- Running
git pushorgh pr createbefore thepull_request.pre_dispatchgate releases (Approved). - Carrying a hardcoded reviewer instead of loading
gates.pull_request.pre_dispatch. - Introducing a new reviewer type for the verify gate instead of the existing
type: deterministic. - Opening the PR as a draft, or against a base other than the repository's default branch, without explicit configuration.
- Creating the PR without first confirming the derived title/body with the user.
- Merging, auto-merging, deploying, stacking multiple PRs, or retrying a delegate.
- Adding any
pull_request:config field beyonddelegate.skill/delegate.args. - Emitting
pull_request.createdwhen creation did not succeed.
References
- Feature: Pull Request Skill — the SpecScore Feature this skill implements.
- ship SKILL.md — the sibling gate-and-dispatch skill whose structure this mirrors.
- reviewer-gates/loader.md, reviewer-gates/runner.md — load + run the
gates.pull_request.pre_dispatchreviewer list. - events.md — the
pull_request.pre_dispatchandpull_request.createdevent payloads this skill fires/emits.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most pr commit review skills give in ~2.2k tokens
Counted across 888 of the 1,342 authors here whose files we hold, read 2026-08-07
- Use conventional commits formatin 127 of 888, across 115 files
- Keep subject line under 72 charactersin 62 of 888, across 48 files
- Delete branches after mergein 51 of 888, across 38 files
- Use imperative mood in subject linein 51 of 888, across 42 files
- Use imperative mood in commit messagesin 44 of 888
- Verify directory is ignored before creating worktreein 43 of 888, across 12 files
- Generate a conventional commit messagein 43 of 888
- Add unignored worktree directories to gitignorein 42 of 888, across 10 files
- Make atomic commitsin 39 of 888, across 27 files
- Run tests before committingin 36 of 888, across 25 files
- Verify clean test baselinein 35 of 888, across 9 files
- Split unrelated changes into separate commitsin 35 of 888, across 30 files
Said here and by no other author read
- refuse when zero commits ahead
- halt on issues found in reviewer gate
- fire the pre-dispatch reviewer gate
- create exactly one ready-for-review PR
- dispatch configured delegate exactly once
- emit pull request created on success
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.