agentleFS
xiaolongnkxiaolongnk/SuperHarness/skills/open-pr/SKILL.md

open-pr

Skill4 starsChanged 48 days agoMITView on GitHub

PR hub — create, review, and merge pull requests with a Goal+Verification body contract, so a reviewer can judge the problem and the risk before reading a single line of diff

  • Commits and pushes

62 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use review-change, commit-push 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.
  • thlaureSkill

    review-change

    Use this skill when the user asks for a code review, a correctness pass, a check before PR, or asks whether a Signalist change follows project conventions.

    Also in 4 projects that use this

  • DataCoveySkill

    commit-push

    Commit and push the changes made on this chat session to the current branch. Use best practices from Conventional Commits.

    Also in 3 projects that use this

  • Codagent-AISkill

    implement-change

    Implements an approved change in one continuous session, with tiered test runs. Use when asked to implement a change from its approved definition, or to invoke codagent:implement-change.

    Also in 3 projects that use this

  • saffron-healthSkill

    address-review

    Address PR review comments systematically. Use when responding to code review feedback on a pull request.

    Also in 3 projects that use this

  • DockerSkill

    review-pr

    Review one or more incoming Docker documentation pull requests as a maintainer. Independently validate technical claims, assess editorial fit and information architecture, choose a verdict, and draft exact inline or PR-wide feedback behind a confirmation gate. Use for requests such as "review PR 123", "is this PR correct?", "does this information belong here?", "validate this PR", or "help review backlog PRs". Do not use to maintain or fix a PR you own; use maintain-pr for that.

    Also in 10 projects that use this

  • SentrySkill

    write-tests

    Write tests following project conventions. Use when adding new tests or modifying existing ones.

    Also in 4 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 61 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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Preflight — one branch, one PR: Before opening a new PR, check whether the current branch already has an open one:

    line 39
  2. Very specific:

    Hard gate: if ## Goal or ## Verification is missing, or the Goal isn't a checkable statement (no verb implying a testable outcome), stop …

    line 103
  3. Very specific:

    If both hold, merge (gh pr merge <N> --squash or the project's preferred merge strategy) and close any issue the PR's Closes #<N> line …

    line 131
  4. Distinctive:

    If either check fails, stop and report which gate is unmet — never merge past a red check because "it's probably fine."

    line 134

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

A pull request is a lot of things skipped, usually: a stated goal, a way to check that goal without re-reading the whole diff, an honest note on risk. This skill is the fixed shape that keeps those present on every PR, whatever host you're on.

Arguments: $ARGUMENTS — first word selects the sub-command.

Sub-commandPurpose
create [context] (default)Open a PR on the current branch
review <N|URL>Verify a PR against its own Goal + Verification blocks; SHIP / BLOCK / NEEDS-HUMAN
merge <N|URL>Merge after re-confirming the review-gate checkboxes
checkInbox pass — every open PR you own, grouped by what's blocking it

Host-agnostic setup

This skill assumes a git-hosting CLI is on PATH and authenticated — gh (GitHub), glab (GitLab), or your host's equivalent. Resolve once per invocation:

if command -v gh >/dev/null 2>&1; then HOST_CLI=gh
elif command -v glab >/dev/null 2>&1; then HOST_CLI=glab
else echo "open-pr: no git-hosting CLI found (need gh or glab on PATH)" >&2; exit 1
fi

Everything below is written against gh's command shape; substitute the equivalent glab (or direct REST) call if you're on a different host. Never hand-roll the diff/PR-metadata fetch when the CLI already exposes it — that's the thing most likely to silently drift from the real API.

create — Open a pull request

  1. Preflight — one branch, one PR. Before opening a new PR, check whether the current branch already has an open one:
    gh pr view --json number,url 2>/dev/null && echo "PR already exists for this branch — push instead of opening a new one" && exit 1
  2. Gather the diff against the real base, not a stale local branch:
    git fetch origin "$(gh repo view --json defaultBranchRef -q .defaultBranchRef.name)" --quiet
    git diff origin/<base>...HEAD --stat
  3. Write the body with the mandatory sections (do not omit any):

    ## Problem
    <What's observably wrong or missing TODAY, and who/what it affects. Plain language — no
    function names or file paths yet. A reviewer should feel why this matters before any solution.>
    
    ## Goal
    <One objectively-checkable sentence: a test that now passes, a specific behavior, a file that
    now exists. NOT "improves code quality" or "fixes the bug" — those aren't checkable.>
    
    ## Verification
    1. **<check name>**:
    <exact command> # Expected: <exact condition> ``` 2. ...

    What changed

    <2-4 bullets: the mechanism — function/file names, what changed and why. Keep this OUT of Problem/Goal above; those two sections must stay readable without touching the diff.>

    Risk

    <docs-only | cleanup | bugfix-narrow | bugfix-wide | feature | infra>

    Review gate

    • Goal-Diff alignment — every changed file justified by the Goal
    • Verification green — every Verification check passes
    • Reviewed by a second agent or human
    
    **The reader test:** someone who has never opened this code should be able to restate, from
    `Problem` + `Goal` alone, what was wrong and how you'll know it's fixed — without reading the
    diff. If the Goal reads like a title ("refactor the dispatch path"), rewrite it as a checkable
    outcome.
    
  4. Open it and report the URL:
    gh pr create --title "<type>: <description>" --body-file <tmpfile> --base <base>
    Title follows the project's conventional-commit prefix (feat|fix|refactor|docs|test|chore).

review — Verify a PR against its own contract

Does: checks the PR delivers what its own ## Goal + ## Verification promise, and that the diff is fully explained by the ## Goal. Does not: replace human judgment on architecture, taste, or security — this is a mechanical gate, not a substitute reviewer.

  1. Fetch the PR and check out its head ref into an isolated worktree (never review in your main working tree — see disciplines/worktree-isolation-per-agent.md):
    gh pr checkout <N> --branch "pr-review/<N>"
  2. Hard gate: if ## Goal or ## Verification is missing, or the Goal isn't a checkable statement (no verb implying a testable outcome), stop and report that — do not invent your own checks to paper over a missing contract.
  3. Run every Verification check and record PASS/FAIL/UNKNOWN against its stated # Expected:. A check you can't run (missing fixture, needs prod access) is UNKNOWN, not a silent skip.
  4. Goal-Diff alignment: git diff origin/<base>...HEAD --name-only — for each changed file, is it justified by the Goal? A file that's neither justified by the Goal nor an obvious support file (test, doc for the change) is OUT-OF-SCOPE.
  5. Baseline sanity: grep the diff for secrets (api[_-]?key|secret|password|token|-----BEGIN), debug artifacts (console.log, print(, TODO, pdb.set_trace), and confirm the title uses a conventional-commit prefix.
  6. Verdict (first true wins):
    • Any Verification FAIL, or any OUT-OF-SCOPE file → BLOCK.
    • Any UNKNOWN check, or a secret/debug-artifact hit needing a human call → NEEDS-HUMAN.
    • Everything checked and clean → SHIP.
  7. Post the report as a PR comment (gh pr comment <N> --body-file <report>), and on SHIP, tick the review-gate checkboxes in the PR body.
  8. Clean up the review worktree whether the review passed or not — git worktree remove + delete the local pr-review/<N> branch.

merge — Merge after the gate

  1. Re-confirm every ## Review gate checkbox is ticked in the current PR body — do not trust a memory of a prior review; re-fetch the body.
  2. Confirm mergeable + CI green:
    gh pr view <N> --json mergeable,statusCheckRollup
  3. If both hold, merge (gh pr merge <N> --squash or the project's preferred merge strategy) and close any issue the PR's Closes #<N> line references (most hosts do this automatically on merge — verify rather than assume).
  4. If either check fails, stop and report which gate is unmet — never merge past a red check because "it's probably fine."

check — Inbox pass

List every open PR you own (gh pr list --author @me --json number,title,url,statusCheckRollup), and for each: is it waiting on you (new review comment, failing check) or waiting on someone else (pending review, pending CI)? Report only the ones waiting on you, grouped by what's needed (fix-CI / respond-to-comment / needs-a-review-request).

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.