agentleFS
specscorespecscore/specstudio-skills/skills/pull-request/SKILL.md

pull-request

Skill0 starsChanged 5 months agoMITView on GitHub

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".

  • Commits and pushes

53 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use issue-campaign, contracts 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.
  • samchonSkill

    issue-campaign

    Defines the default solo repository-wide issue campaign for typia: exhaustive discovery, lead-vetted issue publication, one unified CI-validated implementation pull request per cycle, solo Self-Review, and repeated rediscovery until a full clean round. Use for broad audits, many issue candidates, or repeated issue-to-pull-request campaigns unless the user explicitly requests parallel or multi-agent execution; do not use for one already-defined issue or an ordinary pull request.

    Also in 3 projects that use this

  • AnthropicSkill

    contracts

    Answer a question across a corpus of contract documents with verified citations. Use when the user asks what a contract says, which contracts have a clause, what changed between amendments, or any question that needs reading and citing across a set of contract files. The corpus must be on the local filesystem (see README).

    Also in 3 projects that use this

  • mfang0126Skill

    development

    Full-stack development workflow skill. Guides the complete cycle from understanding requirements to shipping code via PR with Preview validation.

    Also in 3 projects that use this

  • dragonflydbSkill

    benchmark

    Benchmark Dragonfly (and compare against Valkey/Redis) on local or remote cloud instances, then produce a performance + memory report with charts and a raw-data appendix. Use this whenever the user runs /benchmark, or asks to benchmark / load-test / measure throughput, QPS, latency, or memory efficiency of Dragonfly or another Redis-compatible server, to compare Dragonfly vs Valkey or Redis, or to generate a benchmark report. Trigger it even when the user just describes the goal ("see how fast Dragonfly is on this box", "compare memory per key vs Valkey") without saying the word "benchmark".

    Also in 4 projects that use this

  • VercelSkill

    gh-stack

    Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack. Use for stack creation, viewing, edits, push, submit, sync, rebase, merge, or checkout; when asked to split or isolate work for review; whenever a user mentions a stack, branch layers, dependent PRs, or gh stack; or when a stack is checked out.

    Also in 3 projects that use this

  • carapace-shSkill

    git

    Use when working with Git — object model, references, index, branching, merging, rebasing, remotes, diffs, config, hooks, worktrees, submodules, and plumbing commands. Triggers on: "git", "git branch", "git commit", "git merge", "git rebase", "git checkout", "git stash", "git reset", "git submodule", "git worktree", "git blame", "git bisect", "git reflog", "git hooks", "git config".

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 48 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a task for each and complete in order:

    line 49
  2. Distinctive:

    When the reviewer gate releases, the skill creates exactly one pull request.

    line 67
  3. Very specific:

    When no pull_request.delegate is configured, the skill creates the PR itself:

    line 75
  4. Very specific:

    When pull_request.delegate is configured, the skill dispatches that single delegate skill instead of the built-in path, passing …

    line 95

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

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_dispatch releases Approved.

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.

  1. 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)
  2. Commits-ahead guard. Refuse when the current branch has zero commits ahead of the base branch (git rev-list --count <base>..HEAD is 0) — 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:

  1. Pre-flight machine gates (Pre-Flight steps 1–2): default-branch guard, then commits-ahead guard. Any refusal exits immediately.
  2. Reviewer gate (## Reviewer Gate): fire pull_request.pre_dispatch, load and run gates.pull_request.pre_dispatch reviewers (AND-composed, including the type: deterministic verify reviewer). Halt on Issues Found; proceed only on release.
  3. PR creation (## PR Creation): if pull_request.delegate is configured, dispatch it once; otherwise run the built-in git push + gh pr create path. Derive and confirm the title/body first.
  4. Emit (## Lifecycle Event): on successful creation, apply publication policy and emit pull_request.created exactly 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.

  1. Fire and load. Fire pull_request.pre_dispatch (single-fire per run; see events.md). Load and validate gates.pull_request.pre_dispatch.reviewers via the loader with event key pull_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.
  2. 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)
  3. Verify reviewer. The project verify check (tests, coverage) is expressed as an existing type: deterministic reviewer whose run: command's exit code is the verdict (zero → Approved; non-zero → Issues Found with diagnostics captured as Blocker(s)). The skill introduces no new reviewer type — it uses only the types reviewer-gates already defines (ai, human, deterministic, auto-approve). The configured run: command must be read-only with respect to spec/; side effects outside spec/ (e.g. a cover.out at the repo root) are conformant.
  4. Outcome. On release (Approved), proceed to PR creation. On Issues Found, halt: surface the failing reviewer's Blocker findings, run no git push or gh 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:

  1. Push the current branch to its remote (git push -u origin <branch>).
  2. 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.

  1. Publication + event. Build the checkpoint manifest, apply publication-policy.md for the pull_request.created checkpoint, then emit pull_request.created exactly once with publication_result per 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 push or gh pr create before the pull_request.pre_dispatch gate 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 beyond delegate.skill / delegate.args.
  • Emitting pull_request.created when 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_dispatch reviewer list.
  • events.md — the pull_request.pre_dispatch and pull_request.created event payloads this skill fires/emits.

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.