agentleFS
portabletextportabletext/editor/.agents/skills/reviewing-prs/SKILL.md

reviewing-prs

Skill285 starsChanged 16 days agoMITView on GitHub

Review a PR in this repo against the house conventions before it is marked ready. Use when asked to review, pre-flight, or check a PR ("review this PR", "pre-flight", "is this PR ready"), and as a self-check before handing off any PR. Routes each artifact in the diff to its canonical skill (commits, changesets, writing-tests, code-comments, pr-descriptions) and verifies the PR's claims empirically instead of stylistically.

7 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

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

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 2

    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:

    Read the skill, then audit the artifact against it:

    line 20
  2. Very specific:

    Run the gates the diff touches: check:types, check:lint, check:format, check:knip, and the affected package's test suites.

    line 52
  3. Distinctive:

    When asked to fix rather than report, apply the findings and re-run the gates.

    line 68

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

Reviewing PTE PRs

This skill owns the review procedure. The rules live in the canonical skills; read each one before auditing its artifact, and cite it in findings. Never restate a rule from memory: memory is how drift starts.

Gather

  • gh pr view <n> (title, body, draft state) and gh pr diff <n>.
  • git log origin/main..HEAD --format='%h %s' plus each commit's body.
  • Bucket the changed files: source, tests, .changeset/*.md, docs, config.

Route each artifact to its skill

Read the skill, then audit the artifact against it:

  • Commits → commits: subjects name the mechanism; a commit carrying a changeset is fix:/feat:; contract pins sit in their own test: commit while regression tests ride the fix; no ticket IDs anywhere; fixup! discipline once in review.
  • Changesets → changesets: present iff the change is user-facing; first line mirrors the commit subject verbatim; consumer-observable prose; secondary behavioral changes named explicitly.
  • Test files → writing-tests: canonical suite placement; every integration test is its own Scenario:; deterministic keys; full-value toEqual; no sleeps; no summarizer indirection; comments held to the source-file bar.
  • Comments in the diff → code-comments: default is no comment; why-only; nothing diff-relative; if the commit body already tells it, the comment is a duplicate and goes.
  • PR body → pr-descriptions: draft state, narrative shape, no internal context, behavioral changes volunteered, body sized to the diff.

Verify claims empirically

A stylistic pass is half a review. For every claim the PR makes, find the evidence or produce it:

  • A claimed regression test must be red pre-fix: check out the pre-fix source (or revert the fix hunks in the working tree) and run it, unless the PR or commit body records the red run.
  • Break something to trust something: prove at least one pinned test red by reverting or breaking the mechanism it claims to pin, even when the commit body records a red run. A review that broke nothing verified nothing empirically, and the strongest findings come from watching which tests do not notice a broken mechanism.
  • Run the gates the diff touches: check:types, check:lint, check:format, check:knip, and the affected package's test suites.
  • Spot-check "full value" assertions for smuggled partial matchers.
  • A named behavioral change must have a test proving the new behavior; an unnamed one found in the diff is a blocker, not a nit.
  • A new walk, guard, path or key helper or plain util in the diff is a duplicate until shown otherwise: search the editor's src/traversal, src/selectors, src/utils, src/paths and @portabletext/schema for it. An unmarked copy is a should-fix.

Report

  • Findings ordered: blocker / should-fix / nit. Each names file:line, the rule (skill and section), and the concrete fix.
  • End with a verdict: ready to hand off, or the shortest list of changes that gets there.
  • When asked to fix rather than report, apply the findings and re-run the gates; history is rewritten (fold, not append) while the PR is a draft.

Anti-patterns

  • Rubber-stamping with a summary of the diff instead of an audit.
  • Restating skill rules from memory instead of reading the skill.
  • Style opinions not backed by a skill: raise them as questions, not findings.
  • Reviewing the investigation instead of the change: the diff, its commits, and its claims are the review surface.

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.