agentleFS
SirCharanSirCharan/claude-code-harness/skills/code-review-discipline/SKILL.md

code-review-discipline

Skill0 starsChanged 5 months agoMITView on GitHub

High-signal code-review discipline — apply when reviewing a diff/PR or running the built-in /code-review, /review, or the code-reviewer agent, and whenever you want a review or "check this code". Enforces a confidence gate (only report findings you're >80% sure are real bugs) and a false-positive skip list (don't flag handled-upstream cases, fixed-cardinality "N+1", pure style nits, or speculative "consider adding…"). Goal: zero-noise reviews where every reported item is a real, evidence-backed defect. Adapted (not copied) from the ECC code-reviewer protocol. Trigger on: "review this", "code review", "check this PR/diff", "find bugs", "is this correct", or before posting review comments.

2 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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If you're <80% but it's high-impact (security/data-loss), report it explicitly flagged as "unverified — needs checking", not as a confirmed …

    line 25
  2. Distinctive:

    If there are zero must-fix findings, say so plainly — "no correctness/security issues found" is a valid, valuable result.

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Code-Review Discipline

Companion to the built-in /code-review and code-reviewer agent — this governs what counts as a finding. The failure mode of LLM review is noise: plausible-but-wrong or low-value comments that erode trust. Fix it with a gate + a skip list.

The confidence gate

  • Only report a finding you are >80% confident is a real defect (a bug, security issue, data loss, correctness/logic error, race, resource leak, or a broken contract). State the confidence implicitly by only surfacing things you can defend.
  • For each reported finding, include evidence: the file:line, why it breaks (the concrete input/path that triggers it), and the fix. No evidence → don't report it.
  • If you're <80% but it's high-impact (security/data-loss), report it explicitly flagged as "unverified — needs checking", not as a confirmed bug.
  • Separate must-fix (correctness/security) from optional (clarity/perf) and lead with must-fix. If there are zero must-fix findings, say so plainly — "no correctness/security issues found" is a valid, valuable result. Don't manufacture findings to look thorough.

False-positive skip list (do NOT flag these)

  • Handled upstream / elsewhere: "add error handling / null check / validation" when the case is already guarded by a caller, middleware, type system, or earlier guard. Trace the call path first.
  • Fixed-cardinality "N+1": loop-over-query patterns where N is bounded and tiny (e.g. iterating a small fixed-size list). Only flag N+1 when N scales with user/data input.
  • Pure style / taste: formatting, naming preference, "could be more idiomatic", import ordering — the formatter/linter owns these. Not review findings.
  • Speculative "consider adding…": tests/docs/abstraction/logging that aren't required for correctness and weren't asked for. Mention at most once, as a single optional note — never as a list.
  • Defended trade-offs: a deliberate choice the code or a comment already justifies (e.g. a documented in-memory cache, an intentional any with a reason). Don't re-litigate.
  • Hypotheticals with no trigger: "this could break if X" where X can't actually occur given the types/inputs. If you can't name a real triggering input, skip it.
  • Framework/library misreads: behavior that's actually correct per the framework's contract — verify the API before claiming misuse.

Output shape

For each must-fix: path:line — <one-line defect> — <triggering input/path> — <fix>. Then optional notes (≤3, terse). Then a one-line verdict (ship / fix-then-ship / needs-rework). Keep output terse; no filler, no praise padding.

When NOT to use

Trivial diffs (typo, one-line rename), or when you explicitly want a broad/exploratory review rather than a defect hunt — then widen the lens but keep the evidence requirement.

Source

Adapted from the ECC (affaan-m/ECC, MIT) agents/code-reviewer.md confidence-gate + false-positive skip-list pattern; converges with SuperClaude's evidence-based SelfCheck. Re-implemented as a general-purpose skill.

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.