agentleFS
LazyIsEfficientLazyIsEfficient/agentic-os/.claude/skills/code-review-and-quality/SKILL.md

code-review-and-quality

Skill17 starsChanged 5 months agoMITView on GitHub

Conducts multi-axis code review across correctness, readability, architecture, security, and performance. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Triggers on "review my PR", "review this diff", "code review", "review this changeset", "is this ready to merge", "pre-merge review".

45 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use constraint-driven-development, code-simplification 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.
  • vinvcnSkill

    constraint-driven-development

    把一个项目的质量线确立为书面契约,并阻止 agent 悄悄降低它。通过访谈确定用户在意哪些维度,当用户心里没有数字时提供合理的默认阈值,把一切记录进 CONSTRAINTS.md,并盯住 diff 中质量线被削弱的迹象——新增的 @ts-ignore 或 eslint-disable 抑制注释、被跳过或删除的测试、被剥掉的断言、未实现的 stub、被调低的阈值。当没有任何质量线被写下来时使用;当用户说 "set up constraints" 或 "define our standards" 时;当用户希望把他们在意的维度——无障碍性、Web 性能、覆盖率——设置成被强制执行的约束时;当 agent 为了变绿不断静默检查或跳过测试时;当你需要一个覆盖率或性能阈值却不知道该选什么数字时;或者当 agent 写下的代码超出任何人会读的体量时。

    Also in 4 projects that use this

  • az9713Skill

    code-simplification

    Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

    Also in 31 projects that use this

  • borhen68Skill

    observability-and-instrumentation

    Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.

    Also in 12 projects that use this

  • az9713Skill

    deprecation-and-migration

    Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.

    Also in 19 projects that use this

  • mycelium-hqSkill

    doubt-driven-development

    Use when correctness matters more than speed: about to commit non-trivial code, make an architectural call under uncertainty, work in unfamiliar code, or assert what the compiler cannot check (''this is safe'', ''thread-safe'', ''this scales'', ''matches the spec''). Strongest on high-stakes surfaces (production deploys, security-sensitive logic, data migrations, irreversible operations) and when the user asks to sanity-check, red-team, double-check, or get a second opinion on a decision.

    Also in 18 projects that use this

  • galandoSkill

    source-driven-development

    Version-aware, source-driven development — fetch official docs before writing framework code

    Also in 21 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 2

    Common

    Most of the 42 edited versions we read keep these.

  • 7

    Distinctive

    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:

    Review every change before merge: No exceptions. "It's small" is not an exemption.

    line 21
  2. Distinctive:

    Label every finding: Use Critical / Nit / Optional / FYI prefixes so the author knows what's required.

    line 23
  3. Distinctive:

    Approve improvements, not perfection: If the change improves overall code health, approve it.

    line 24
  4. Distinctive:

    Split large changes: Ask the author to split anything over ~300 lines rather than reviewing one massive changeset.

    line 26
  5. Distinctive:

    Require cleanup before merge: Don't accept "I'll fix it later" — later never comes.

    line 27
  6. Distinctive:

    Treat dependency additions as changes: Every new dependency needs justification: size, maintenance status, license, known vulnerabilities.

    line 28
  7. Distinctive:

    Quote before flagging: Every finding must include the specific lines that support it.

    line 29
  8. Common:

    No regression tests with bug fix PRs

    line 38
  9. Common:

    After review is complete:

    line 44

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

Code Review and Quality

Overview

Multi-dimensional code review with quality gates. Every change gets reviewed before merge — no exceptions. Review covers five axes: correctness, readability, architecture, security, and performance.

The approval standard: Approve a change when it definitely improves overall code health, even if it isn't perfect. Perfect code doesn't exist — the goal is continuous improvement. Don't block a change because it isn't exactly how you would have written it.

Universal Rules

  1. Review every change before merge. No exceptions. "It's small" is not an exemption.
  2. Review tests first. Tests reveal intent and coverage before you read a line of implementation.
  3. Label every finding. Use Critical / Nit / Optional / FYI prefixes so the author knows what's required.
  4. Approve improvements, not perfection. If the change improves overall code health, approve it.
  5. Don't rubber-stamp. "LGTM" without evidence of review helps no one. Quantify problems when possible.
  6. Split large changes. Ask the author to split anything over ~300 lines rather than reviewing one massive changeset.
  7. Require cleanup before merge. Don't accept "I'll fix it later" — later never comes.
  8. Treat dependency additions as changes. Every new dependency needs justification: size, maintenance status, license, known vulnerabilities.
  9. Quote before flagging. Every finding must include the specific lines that support it. "This function looks risky" without a quote is an opinion, not a finding. If you can't quote the evidence, you don't have a finding yet.

Red Flags

  • PRs merged without any review
  • Review that only checks if tests pass (ignoring other axes)
  • "LGTM" without evidence of actual review
  • Security-sensitive changes without security-focused review
  • Large PRs that are "too big to review properly" (split them)
  • No regression tests with bug fix PRs
  • Review comments without severity labels
  • Accepting "I'll fix it later"

Verification

After review is complete:

  • All Critical issues are resolved
  • All Important issues are resolved or explicitly deferred with justification
  • Every finding is backed by a specific quoted passage from the actual code
  • No findings were generated from assumed code structure — only from what was read
  • Tests pass
  • Build succeeds
  • The verification story is documented (what changed, how it was verified)

Tier discipline

Tier definitions: review-tiers (.claude/rules/review-tiers.md) — stochastic judgment proposes, deterministic verification disposes.

  • Tier 0: the CI gates themselves (tests, build, linters, validators). These hard-block on their own authority; cite them instead of re-finding what they catch.
  • Tier 1 (may gate, evidence attached): correctness and security findings demonstrated by a failing test, failing command, or concrete counterexample input — the artifact is the gate, the review only chose which artifact to produce. The missing-regression-test blocker is Tier 1: the evidence is the absent test.
  • Tier 2 (advisory, never gates): readability, architecture taste, "could be simpler", unevidenced performance concerns. Severity labels (Critical, blocking) on unevidenced findings are proposals to the operator, not gates — log them to findings-ledger rather than writing blocking language.

References

  • references/review-axes.md — Five-axis review checklist: correctness, readability, architecture, security, performance
  • references/review-process.md — Step-by-step process, change sizing, descriptions, multi-model pattern, dead code hygiene, disagreements, honesty, dependency discipline, full review checklist
  • references/security-checklist.md — Detailed security review guidance
  • references/performance-checklist.md — Performance review checks

Related skills

  • skill-library-review — applies the same review discipline to agent and skill definitions rather than source code
  • adversarial-claims-reviewer — applies the same adversarial discipline to formal/technical claims in documents rather than source code
  • findings-ledger — where this skill's Tier 2 (unevidenced) findings get recorded and tallied for recurrence

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.