agentleFS
sohaibdevvsohaibdevv/AI-AGENT-SKILLS/skills/code-review-and-quality/SKILL.md

code-review-and-quality

Skill2 starsChanged 6 months agoMITView on GitHub

Conduct staff-engineer-level code reviews across correctness, security, performance, readability, and architecture

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, observability-and-instrumentation and 7 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

  • 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

  • JetBrainsSkill

    modern-web-guidance

    Search tool for modern web development best practices. MANDATORY: Execute FIRST for all HTML/CSS and clientside JS tasks. Do NOT skip — web APIs evolve rapidly and training weights contain obsolete patterns.

    Also in 3 projects that use this

  • luischanciSkill

    interview-me

    Interactive interview to formalize a research idea into a structured specification with hypotheses and empirical strategy.

    Also in 15 projects that use this

  • Jonathan0823Skill

    minimalist-ui

    Clean editorial-style interfaces. Warm monochrome palette, typographic contrast, flat bento grids, muted pastels. No gradients, no heavy shadows.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 42 edited versions we read keep these.

  • 5

    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:

    Before any PR is merged

    line 14
  2. Distinctive:

    When reviewing AI-generated code

    line 15
  3. Distinctive:

    Read the PR description. If it's missing, ask for it.

    line 68
  4. Distinctive:

    Run the code locally for non-trivial PRs.

    line 72
  5. Distinctive:

    Leave specific, actionable comments.

    line 73

“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

Overview

Code review is the most important quality gate in software development. A good code review catches bugs, prevents security vulnerabilities, improves design, and transfers knowledge - before code reaches production. This skill runs a structured review across five dimensions.

When to Use

  • Before any PR is merged
  • When reviewing AI-generated code
  • As part of the /review workflow

Process

Dimension 1: Correctness

  • Does the code do what the spec says?
  • Are all edge cases handled? (empty inputs, null, zero, max values, concurrent access)
  • Are error conditions handled? (network failure, invalid input, resource exhaustion)
  • Are there off-by-one errors?
  • Are there race conditions in concurrent code?
  • Does the code handle partial failures?

Dimension 2: Security

  • Is all user input validated before use?
  • Are all database queries parameterized?
  • Is no sensitive data logged?
  • Are all auth/authz checks correct?
  • Are there injection vulnerabilities? (SQL, shell, LDAP, XML)
  • Are there new attack surfaces (new endpoints, new data types)?
  • See security-and-hardening for full checklist.

Dimension 3: Performance

  • Are there N+1 query patterns?
  • Are there missing database indexes?
  • Is expensive computation done in a hot path?
  • Are large data sets loaded into memory when streaming would work?
  • Are there blocking synchronous calls that should be async?
  • Does the change affect the critical path? Profile it.

Dimension 4: Readability and Maintainability

  • Does the code express its intent clearly?
  • Are names accurate? (Function names that lie are worse than no names)
  • Is complexity necessary, or is there a simpler solution?
  • Are there long functions that should be extracted?
  • Is there duplicated logic that should be shared?
  • Are there magic numbers or strings that should be constants?
  • Will a new engineer understand this in 6 months?

Dimension 5: Architecture

  • Does this change fit the existing design?
  • Does this create new coupling that will be hard to remove?
  • Does this introduce a new pattern when an existing one could be used?
  • Does this create a new dependency that adds risk?
  • Does this make the system harder or easier to test?

Review process

  1. Read the PR description. If it's missing, ask for it.
  2. Understand the spec/ticket the PR is implementing.
  3. Review the tests first - they tell you what the author thinks the code should do.
  4. Review the implementation against each dimension above.
  5. Run the code locally for non-trivial PRs.
  6. Leave specific, actionable comments. Not "this is wrong" - "this will fail when X because Y; consider Z."

Anti-Rationalizations

"The tests pass - it's good to go" Tests passing proves the code passes the tests. It does not prove the tests are correct, complete, or that the code is secure.

"It's a small change - it doesn't need a full review" Small changes have caused large incidents. The review checklist is short enough to run on any change.

Verification Requirements

  • All five dimensions reviewed
  • Comments are specific and actionable (not vague)
  • Security dimension completed for any change touching auth, data, or external APIs
  • Tests reviewed before implementation

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.