agentleFS
NemesLaszloNemesLaszlo/Agent-Collection/.claude/skills/review-code/SKILL.md

review-code

Skill1 starsChanged 6 days agoMITView on GitHub

Use whenever code was changed and before calling it done: after building a task or a small fix, at the end of implement, in finish-work, and when asked ("review this", "is this ready", "check my changes", "audit the Backend auth code"). Resolves the scope with git (uncommitted work across the workspace's repos, a commit range, or a folder), reviews it on fable (correctness) and opus (design) against REVIEW.md, AGENTS.md, the plan and the lenses in lenses.md, hunting gaps as much as bugs; refutes every finding with quoted evidence; fixes through the builder agents and re-reviews the delta until clean. Say "deep" for one agent per lens, or name a model to run everything on it.

78 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use review-deps, audit-test-suite 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.
  • ba0918Skill

    review-deps

    A focused read-only review that treats manifests, lockfiles, and dependency diffs as first-class input and evaluates known vulnerabilities and supply chain signals. Use when the user says "review the dependencies", "look at the dependency vulnerabilities", "check the lockfile", "supply chain risk", "organize the npm audit output", "detect typosquats", "dependency health", or "review-deps". Its subject is the health of the dependencies, not test quality or code quality.

    Also in 4 projects that use this

  • yaohuangguanSkill

    audit-test-suite

    Find where an existing test suite is weak and decide what to test next, ranked by risk. Use this when asked to add missing tests, find gaps, raise coverage, assess test quality or see which areas are thin, even if the request only mentions a coverage percentage.

    Also in 3 projects that use this

  • yaohuangguanSkill

    change-data-safely

    Change a database schema or stored data without breaking running code or losing data. Use this for any migration, new or changed column, backfill, bulk update, delete, index, or change to a stored format, including in small projects. Data mistakes are often impossible to undo.

    Also in 3 projects that use this

  • mrdulasolutionsSkill

    clear-caches

    Clear extension caches, analysis data, and drafts from the database. Use when testing sender lookups, analysis, or draft generation from a clean state.

    Also in 3 projects that use this

  • GeiserXSkill

    docs-loop

    Use when the user asks to audit docs, check documentation for stale claims, or verify docs against the code.

    Also in 3 projects that use this

  • mrdulasolutionsSkill

    electron-devtools-testing

    Test the Electron app interactively using Chrome DevTools Protocol. Use when the user asks to test, verify, or interact with the running app via browser automation.

    Also in 3 projects that use this

  • +1 more from mrdulasolutions
  • +1 more from yaohuangguan

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 67 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use files whenever a repo's working tree also holds other work (repos.sh shows the counts): reviewing someone else's in-flight edits as …

    line 40
  2. Very specific:

    Deep: run scripts/review.workflow.js (this folder) with the Workflow tool and

    line 64
  3. Distinctive:

    Every lens runs as its own agent on its group's model, a reconcile pass merges duplicates, each blocker, major and sensitive finding meets …

    line 68
  4. Very specific:

    Ask the owner about findings that need their intent and about every finding on a sensitive area, as a choice with your proposed fix first.

    line 87
  5. Very specific:

    Run the checks the fixes touch (AGENTS.md, Commands and checks), then bash .claude/skills/review-code/scripts/scope.sh next …

    line 90
  6. Distinctive:

    Run builds or tests in parallel agents, or edit files from a reviewer.

    line 116

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

A review reads code against REVIEW.md, AGENTS.md, the plan when there is one, and every lens in lenses.md (this folder) plus the project lenses in REVIEW.md. It tries to refute each finding and acts on what survives. Depth follows the size and the risk, so a small fix costs two agents and a large or sensitive change gets the full treatment: two models from two angles (fable on correctness, opus on design), each serious finding refuted by the model that did not find it. It reviews one of two scopes:

  • a change: uncommitted work, unpushed commits or a commit range. The loop is fix and re-review until clean.
  • a path: a folder, several, or a whole repo, as the code stands (an audit). The result is a report, whose findings become a plan.

Request: $ARGUMENTS

Repo state

!bash .claude/scripts/repos.sh 2>/dev/null || echo "run from the workspace root: .claude/scripts/repos.sh not found"

Touch points, in order

  1. Resolve the scope into a pack with scope.sh, from the workspace root. The pack lives in .local/review/<slug>/; the slug is the plan folder's name, or the task's in a few words. Never review a scope described in words.

    ScopeCommand
    this task's uncommitted work (the usual case)bash .claude/skills/review-code/scripts/scope.sh new .local/review/<slug> files <the task's files or folders>
    every uncommitted change in the named repos, when nothing else is in flight there... new .local/review/<slug> work Backend Frontend
    unpushed commits plus uncommitted edits... new .local/review/<slug> since Backend origin/master
    a finished commit range (someone else's, or past work)... new .local/review/<slug> commits Backend <A>..<B>
    an audit of folders as they stand... new .local/review/<slug> paths Backend/Services.Auth

    Use files whenever a repo's working tree also holds other work (repos.sh shows the counts): reviewing someone else's in-flight edits as part of this task is a wrong scope. The script prints the size and recommends the deep tier above 30 files or 1,500 changed lines. Secret-bearing files are listed as withheld and never read.

  2. The ground truth the reviewers read: AGENTS.md, REVIEW.md, the sub-repo CLAUDE.md of each repo in scope, the plan (_Plans/<folder>/PLAN.md and DECISIONS.md) if any, then the pack (files.txt, scope.diff, and delta.diff from round 2), then the touched files in full.
  3. Review at the tier scope.sh recommends (the owner can name another):
    • Light (a small change, nothing on a sensitive area; a few minutes): one fresh agent on opus with the pack path, the ground-truth list, lenses.md and REVIEW.md, applying every lens (and every project lens). It reads; it never edits, builds or runs tests. It refutes each finding as it goes by quoting the line that proves or kills it, marks needs-run what only running code could settle, and returns confirmed and refuted findings and a verdict. Each confirmed blocker or major goes to one fresh refuter on fable.
    • Standard (a medium change, or a small one on a sensitive area; about ten minutes): start two fresh agents in parallel, in one message, each with the pack path, the ground-truth list, lenses.md and REVIEW.md. Agent A runs on fable with the correctness lenses and the correctness project lenses; agent B runs on opus with the design lenses and the design project lenses. They read; they never edit, build or run tests (they would collide). Each applies its lenses, refutes each finding as it goes by quoting the line that proves or kills it, marks what only running code could settle as needs-run with the command, and returns confirmed and refuted findings, a verdict, and whether a deep pass is worth it, plus "notes for the other reviewer": suspicions outside its own lenses, each with where to look. Do not read the diff into this session yourself. Merge: the same defect at the same place from both is one finding, marked found by both; a note the other reviewer did not already cover becomes a candidate finding and goes to a refuter like any other, so a suspicion is never lost between the two halves. Then give each confirmed blocker, major or sensitive finding to its own fresh refuter on the other model, in parallel. A refuter that fails leaves its finding unverified, never refuted.
    • Deep: run scripts/review.workflow.js (this folder) with the Workflow tool and args: { kind: "code", label: "<slug>", pack: ".local/review/<slug>", plan: "<PLAN.md path, if any>", projectLenses: [<the "### name (group)" headings under Project lenses in REVIEW.md>] }, or for a path scope kind: "audit". Add model: "<model>" only when one was named, and readOnly: true for someone else's code. Every lens runs as its own agent on its group's model, a reconcile pass merges duplicates, each blocker, major and sensitive finding meets a refuter on the other model, and three voters judge the rest. It costs roughly 15 to 30 agents: recommend it for a large scope, a contract or migration change, a sensitive area, every audit, or when the standard pass says so; the owner decides.
    • One model only (a model named, or one model's quota out): every agent runs on it, and the record says the second opinion was lost.
  4. Settle needs-run findings yourself, one command at a time (builds and tests in parallel collide): run the named test or check, then mark the finding confirmed or refuted with the output.
  5. Record the findings in <plan folder>/review/code-review.md, or .local/review/<slug>/findings.md without a plan, one section per round: tier, models, date, scope command, then F1, F2, ... with severity, file:line, the problem and its scenario, the fix, status (open, question, fixed, verified, wontfix), who found it and how it was verified. Keep refuted findings with their reasons, and unverified findings and failed lenses under "Not covered". Number new findings on from the last round.
  6. Act on a change (the owner's own work):
    • Fix every real finding outside sensitive areas, minors and nits included. Group them by file and hand each group to the builder agent that owns it (backend-architect, frontend-developer, devops-automator, ai-engineer, a project agent, or clean-code-architect for cross-cutting ones), with the findings, the files and the plan context; never fix from the main context. A security fix gets its approach from the security-vulnerability-scanner first. A fix that moves a rule or a doc updates it in the same change.
    • Ask the owner about findings that need their intent and about every finding on a sensitive area, as a choice with your proposed fix first. Ask [owner call] findings one at a time, with both sides; a no closes the finding as accepted. Record decisions in DECISIONS.md when there is a plan.
    • Run the checks the fixes touch (AGENTS.md, Commands and checks), then bash .claude/skills/review-code/scripts/scope.sh next .local/review/<slug> for the next round. If a fix touched a file outside a files scope, start a new pack that includes it. The next round's reviewers read delta.diff and the open findings, not the whole scope, look for what the fixes broke, and flip fixed to verified by reading the new code and naming the test that covers it. A re-review round is always one fresh agent on opus (fable when the delta touches a sensitive area), whatever the first round's tier: the delta is small, and the first round already had its second opinion. Repeat until a round turns up nothing new.
    • Someone else's code (a commits scope that is not the owner's): review, never fix; the findings go to the owner to pass on.
  7. Set the verdict: clean when every question has its answer, every blocker and major is verified or a wontfix the owner approved (never on a sensitive area), the last round added no blocker or major, the checks pass on the reviewed working tree, and the docs that describe the change moved with it. Otherwise needs-fixes or needs-answers. For an audit, write the report to <plan folder>/review/ or _Plans/<topic>-YYYY-MM/ (verdict, findings by severity, refuted, not covered) and offer to turn it into a plan.

Done means

  • A change: the verdict is clean for exactly the working tree that will be committed, or the owner stopped the loop with the open findings recorded as accepted or deferred, never dropped.
  • An audit: the report is written, every finding confirmed, refuted or listed as not covered.

Never

  • Review a scope described in words instead of resolved with scope.sh.
  • Fix a finding on a sensitive area without the owner's yes, or waive a blocker there.
  • Let the author's own pass stand in for the review: the reviewers are fresh agents.
  • Run builds or tests in parallel agents, or edit files from a reviewer.
  • Drop a finding silently: refuted, accepted and unverified findings all stay in the record.

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.