agentleFS
davidvornholtdavidvornholt/mailbox/.agents/skills/review-fix/SKILL.md

review-fix

Skill2 starsChanged 2 months agoMITView on GitHub

Use when asked to review a pull request and fix its findings in the same review loop. Runs one bounded review, repair, and verification cycle.

5 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 5 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. Very specific:

    Do not ask about inferable implementation details, naming, local refactors, test shape, or other reversible choices.

    line 47
  2. Distinctive:

    Create one self-contained review thread per blocker.

    line 51
  3. Distinctive:

    Keep blocker threads unresolved until their required verification and the final gate pass.

    line 55

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

Review and fix

Run one bounded cycle: establish the baseline, review the initial diff, fix merge blockers, verify the fix delta, run the final gate, report, and stop. Use a draft PR in a dedicated worktree and add new commits only. Never review until clean, start another cycle for findings created by this cycle, or fresh-review the final repair.

Model

An explicit user choice wins. Otherwise use Claude Opus 5.5 at xhigh effort in Claude Code, GPT-6 Astra at high effort in Codex, or the current model when neither is available. Use the same model for every lens. Never silently replace an explicitly requested model; report an execution blocker if it cannot run.

Scope

Post one scope comment with the intent, threat model, out-of-scope work, and selected lenses; its timestamp starts the cycle. Ask about splitting only when the PR contains independent product outcomes.

Choose distinct lenses:

DiffLenses
Prose or static copy only1
Ordinary behavior or configuration2
One high-risk family or large cross-system change3
Several independent high-risk families4 maximum

The default pair is:

  1. Behavior and invariants: correctness, error paths, state transitions, edge cases, and meaningful tests.
  2. Premise and integration: whether the change solves the stated problem and preserves architecture, compatibility, and operational contracts; it owns otherwise unassigned material findings.

Add a specialized lens only when a material risk such as authorization, persistence, concurrency, deployment provenance, untrusted output, or complex accessibility otherwise lacks an owner. Give every lens explicit exclusions. Every lens after the second must name the material failure class that would otherwise lack an owner.

Baseline and review

Reuse a successful equivalent exact-head gate that has already finished. Otherwise run the repository gate locally once; do not wait for CI. Repair only PR-introduced mechanical failures before review and record pre-existing failures.

For every required review or verification lens, spawn a separate read-only subagent using the review skill. review-pass is an optional workflow helper. If delegation is unavailable, report incomplete coverage and stop.

Review the PR base → initial head with the scope, gate result, lenses, and any model override. Retry a skipped lens once, then stop if coverage is still incomplete. Merge duplicate findings while preserving every reporting lens, and assign one decision:

  • block: demonstrated, in scope, material under the threat model, and worth stopping the merge;
  • defer: real but outside this PR or below the merge bar;
  • discard: refuted, speculative, already accepted, or not worth scheduling;
  • ask: a costly, durable product or architecture choice remains unresolved.

Do not ask about inferable implementation details, naming, local refactors, test shape, or other reversible choices. Choose the smallest sound option. Collect every unavoidable ask into one decision brief with the options, consequences, and a recommendation.

Fix

Create one self-contained review thread per blocker. A worker subagent reproduces the failure first, makes the smallest correction, and runs focused checks. If it cannot reproduce the failure, leave the thread unresolved and reclassify the finding instead of fixing it speculatively.

Add at most one regression test per failure class, preferably by extending existing or table-driven coverage. The test should fail on the pre-fix behavior when practical. Do not add a dependency, parser, fixture framework, generic harness, or shared guard for one finding. Use browser tests only for browser-specific behavior.

Keep blocker threads unresolved until their required verification and the final gate pass.

Verify

Review only the fix commits. Skip fresh review for prose or static-copy changes and isolated tests that do not alter shared fixtures, schemas, workflows, seeded or generated data, global mocks, or test infrastructure. Otherwise use one targeted lens, or two only for two independent invariant families.

Only an unresolved original blocker or a defect introduced by the fix may trigger one repair round; pre-existing defects are deferred or discarded. Fresh-review the repair only when it touches secrets or authorization, persistence or migrations, recovery, concurrency, retries, transaction boundaries, cache identity, artifact provenance, or untrusted output crossing an authoritative or persisted boundary. Use one targeted lens, or two only for two independent invariant families.

If repair verification finds a material defect, make one final repair, verify it mechanically only, and stop. Run the full deterministic gate locally once after the last change. Fix cycle-introduced gate failures mechanically without starting another review pass, then resolve blocker threads after verification and the final gate pass.

Report and stop

Post the report and mark the PR ready unless an ask remains. Marking it ready starts its CI run; report that run as pending instead of waiting for it. Include every phase, including skipped phases, and open with:

PhaseScopeModel / lensesFindingsOutcomeDuration
Baseline gateexact initial headdeterministic—reused or passedelapsed
Reviewbase → initial headmodel × lensesdecision countsfixed or cleanelapsed
Fix verificationfix deltamodel × 0–2 lensesdecision countsrepaired, clean, or skippedelapsed
Repair verificationrepair deltamodel × 0–2 lensesdecision countsfinal repair, clean, or skippedelapsed
Final gateexact final headdeterministic—passed or failedelapsed

Then link each finding with its decision, impact, and reporting lenses; report lens yield, assumptions, tests added or extended, any new test machinery, deferred work, residual risk, and any final repair left without fresh-eyes review. Measure total wall-clock duration from the scope comment to the report.

Hand the merge decision to the human and stop unconditionally.

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.