agentleFS
Lesile-YinLesile-Yin/agent-skills/skills/prism-review/SKILL.md

prism-review

Skill2 starsChanged 3 months agoMITView on GitHub

Multi-lens parallel code review. Splits one change into four independent review lenses — correctness, security, performance, contracts — runs them in parallel as read-only passes, then merges findings into a severity-ranked report with noise filtered out. Use before merging non-trivial changes, and automatically escalate to deep review when auth/payment/crypto paths are touched.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    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:

    Full mode (default): run all four lenses as separate parallel passes (subagents when available, otherwise four strictly sequential passes …

    line 52
  2. Distinctive:

    Before any lens runs, build a short intent brief:

    line 62
  3. Distinctive:

    Read AGENTS.md / README / PR description if present.

    line 64
  4. Very specific:

    If the diff touches paths matching auth, session, payment, billing, crypto, secret, migration, or deletes tests, announce: "Escalating to …

    line 71
  5. Distinctive:

    After all lenses finish, the merging step:

    line 79
  6. Distinctive:

    If zero findings above ⚪: say so plainly.

    line 102

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “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

Prism Review

One change, four lenses, one merged verdict. A white beam through a prism splits into distinct bands; a code change through this skill splits into four independent examinations that never contaminate each other, then recombines into a single ranked report.

Why parallel lenses

A single reviewer carrying four concerns in their head produces two failure modes: anchoring (the first bug found colors everything after) and fatigue (lens #4 gets a skim). Independent passes avoid both, and their disagreement is signal — a finding confirmed by two lenses is almost never noise.

Scope resolution

Determine what to review, in this priority order:

  1. Files/dirs explicitly named by the user.
  2. git diff --staged if non-empty, else git diff.
  3. Diff between current branch and its base (git merge-base HEAD main).
  4. Files modified in the last 3 commits.

State the resolved scope in one line before starting. If the scope exceeds ~800 changed lines, split it and review chunk by chunk.

The four lenses

Each lens is a read-only pass: no edits, no formatting, no refactors. Full checklists live in references/lenses.md.

LensQuestion it answersTypical findings
L1 CorrectnessDoes it do what it claims, and did anything regress?Logic errors, off-by-one, broken invariants, missing migration
L2 SecurityCan anyone make it do what we didn't intend?Injection, authz gaps, secrets, unsafe deserialization
L3 PerformanceWill it stay fast under real load?N+1 queries, unbounded caches, O(n²) in hot paths
L4 ContractsDo the seams still fit?API/schema breaks, untested branches, doc drift

Running the lenses

  • Full mode (default): run all four lenses as separate parallel passes (subagents when available, otherwise four strictly sequential passes with fresh context each). Each pass receives only: the diff, the intent brief (below), and its own checklist.
  • Quick mode (user says "quick", or diff < 40 lines): a single pass with all four checklists, explicitly labeled as quick — it must not claim the confidence of full mode.

Intent brief

Before any lens runs, build a short intent brief:

  1. Read AGENTS.md / README / PR description if present.
  2. Summarize in ≤ 5 bullets: what the change is supposed to do and any stated constraints.
  3. Pass the same brief to every lens. Lenses judge against intent, not taste.

Escalation rule

If the diff touches paths matching auth, session, payment, billing, crypto, secret, migration, or deletes tests, announce: "Escalating to deep review" — and for each lens, additionally require: line-by-line reading of changed security-sensitive functions (L2), and an explicit "what must be true for this to be safe" statement per function.

Merge protocol

After all lenses finish, the merging step:

  1. Collect findings; deduplicate by root cause (two lenses, same bug → one finding, marked confirmed×2).
  2. Drop anything that is style preference, hypothetical ("might someday"), or unactionable without more info (convert those into questions instead).
  3. Rank what remains:
SeverityMeaningMerge impact
🔴 CriticalData loss, security hole, guaranteed regressionBlock merge
🟠 MajorIncorrect in realistic cases, contract breakFix before merge
🟡 MinorCorrect but fragile, missing edge handlingFix now or file issue
⚪ NoteWorth knowing, no action requiredInformational
  1. Render with templates/report.md. Every finding must carry: file:line, the lens that found it, one-sentence why-it-matters, and a concrete fix suggestion. No finding without all four.

Output contract

  • One report, severity-ordered, Critical first.
  • End with a single verdict line: VERDICT: BLOCK / FIX-FIRST / MERGE-OK.
  • If zero findings above ⚪: say so plainly; do not invent concerns to look thorough. An empty report is a valid report.

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.