ajyadav013/claude-kit/code-review-and-quality

Claude Code and agent skill by ajyadav013/claude-kit

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Multi-axis code review (correctness, security, performance, design) before merging any change. Use to assess quality; not to refactor (use code-simplification) or hunt complexity only (use over-engineering-review).

Install

npx vskill@latest install ajyadav013/claude-kit/code-review-and-quality

SKILL.md

The same SKILL.md was published earlier as ajyadav013/claude-kit/code-review-and-quality.

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. If it improves the codebase and follows the project's conventions, approve it.

When to Use

  • Before merging any PR or change
  • After completing a feature implementation
  • When another agent or model produced code you need to evaluate
  • When refactoring existing code
  • After any bug fix (review both the fix and the regression test)

The Five-Axis Review

Every review evaluates code across these dimensions:

1. Correctness

Does the code do what it claims to do?

  • Does it match the spec or task requirements?
  • Are edge cases handled (null, empty, boundary values)?
  • Are error paths handled (not just the happy path)?
  • Does it pass all tests? Are the tests actually testing the right things?
  • Are there off-by-one errors, race conditions, or state inconsistencies?
2. Readability & Simplicity

Can another engineer (or agent) understand this code without the author explaining it?

  • Are names descriptive and consistent with project conventions? (No temp, data, result without context)
  • Is the control flow straightforward (avoid nested ternaries, deep callbacks)?
  • Is the code organized logically (related code grouped, clear module boundaries)?
  • Are there any "clever" tricks that should be simplified?
  • Could this be done in fewer lines? (1000 lines where 100 suffice is a failure)
  • Are abstractions earning their complexity? (Don't generalize until the third use case)
  • Would comments help clarify non-obvious intent? (But don't comment obvious code.)
  • Are there dead code artifacts: no-op variables (_unused), backwards-compat shims, or // removed comments?

If you cannot understand it, that *is* the finding. When a reviewer genuinely can't follow what a piece of code does after a fair effort, do not approve it and do not wave it through with a guess — the incomprehensibility is itself a defect, because code the next reader (human or agent) can't understand can't be safely changed or debugged later. "I don't understand this — please clarify or simplify" is a legitimate, blocking review comment, not an admission of reviewer inadequacy; the burden is on the author to make the code understandable, not on the reviewer to decode it. (This is also a signal the code may be too complex — see over-engineering-review.)

Per Google's Code Review Developer Guide (google.github.io/eng-practices) — if a reviewer doesn't
understand a change, it is likely too complex, and the reviewer should ask for clarification or
simplification rather than approve.
3. Architecture

Does the change fit the system's design?

  • Does it follow existing patterns or introduce a new one? If new, is it justified?
  • Does it maintain clean module boundaries?
  • Is there code duplication that should be shared?
  • Are dependencies flowing in the right direction (no circular dependencies)?
  • Is the abstraction level appropriate (not over-engineered, not too coupled)?
4. Security

For detailed security guidance, see security-and-hardening. Does the change introduce vulnerabilities?

  • Is user input validated and sanitized?
  • Are secrets kept out of code, logs, and version control?
  • Is authentication/authorization checked where needed?
  • Are database queries parameterized (no string concatenation)?
  • Are outputs encoded to prevent XSS?
  • Are dependencies from trusted sources with no known vulnerabilities?
  • Is data from external sources (APIs, logs, user content, config files) treated as untrusted?
  • Are external data flows validated at system boundaries before use in logic or rendering?
5. Performance

For detailed profiling and optimization, see performance-optimization. Does the change introduce performance problems?

  • Any N+1 query patterns?
  • Any unbounded loops or unconstrained data fetching?
  • Any blocking operations in async contexts?
  • Any unnecessary re-renders in UI components?
  • Any missing pagination on list endpoints?
  • Any large objects created in hot paths?

Cover Every Changed File: Partition, Plan, Then Weight Depth

On a large changeset the signature failure of an AI reviewer is silently skipping files — reviewing a plausible subset while implying the whole. Coverage is a mechanical property: guarantee it with engineering, not model discretion, before deciding where to spend depth (next section).

  • Enumerate deterministically. Take the changed-file list from the diff itself and treat it as the

checklist of record — every file is reviewed or explicitly marked out-of-scope with a reason. The model never decides which files "seem worth" looking at. ``bash git diff --name-only <base>...<head> # the coverage checklist — nothing falls off it ``

  • Bundle related files into one review unit. Group files that must be understood together — a

function and its tests, an interface and its implementations, paired translation/config files (messages.en.json + messages.zh.json), a schema and its migration. A bundle reviewed as a unit catches cross-file contract breaks that a one-file-at-a-time pass misses.

  • Review each bundle in isolated context, concurrently. Give each bundle its own focused context

(its own sub-agent/lane) instead of streaming the whole changeset through one window — divide-and-conquer keeps quality stable on very large changes and parallelizes naturally (the .claude/rules/mandatory-workflow.md lane model, within the Brooks's-law caution in .claude/rules/tool-design.md §7). Context gathered for one bundle is for understanding only — a discovery in file B doesn't become a comment on the unrelated file A.

  • Plan before the deep pass on a big diff. For a large change, first emit a one-paragraph change

summary plus risk points ranked high→low and the context each needs, then review against that plan. A cheap planning pass beats diving in file-by-file blind.

  • Reconcile at the end. Merge the per-bundle findings and confirm every file on the enumerated list

got a verdict. Coverage = every file accounted for; depth = how hard you looked, allocated next.

Partition-for-coverage (deterministic file selection, related-file bundling, isolated-context
concurrent review, plan-phase for large diffs) is a stack-agnostic adaptation of the hybrid
architecture in the Apache-2.0
`alibaba/open-code-review` — engineering guarantees
coverage, the model supplies judgment. Re-derived in prose; not vendored.

Where to Focus: Change Hotspots & Coupling

Once every changed file is accounted for (above), allocate depth — you can't give every line equal attention; on a large change or an unfamiliar codebase, spend the most scrutiny where defects actually cluster. The project's own git history surfaces this for free, no special tooling required:

  • Hotspots (churn × complexity). Files that change often and are large/complex carry the most risk. List the frequently-changed files and weight review toward the complex ones among them — a rarely-touched file is usually stable, while a hotspot edited in this change deserves extra correctness and test scrutiny.

``bash # Most-churned files over the last 6 months — pair the top hits with their size/complexity git log --since="6 months ago" --name-only --pretty=format: | sort | uniq -c | sort -rn | head -20 `` Use the project's own complexity tooling if it has one; file size is only a rough proxy for complexity.

  • Co-change coupling (hidden dependencies). Files historically committed together often share an implicit contract. If this change touches one side of a known pair but not the other, ask whether the coupled file also needs updating — git log on a changed file reveals what usually moves with it.
  • Single-owner / bus-factor files. Code with one dominant author has had fewer eyes. Treat changes there with extra care and prefer a second reviewer.

These are deterministic signals an agent can derive from git log alone. If a codebase-intelligence MCP server is configured (e.g. the optional repowise server in the catalog), its get_risk / get_health tools surface the same hotspot, coupling, and change-risk signals precomputed — use them when available, but treat the output as advisory input to your judgment, never a blocking gate.

Change Sizing

Small, focused changes are easier to review, faster to merge, and safer to deploy. Target these sizes:

~100 lines changed → Good. Reviewable in one sitting.
~300 lines changed → Acceptable if it's a single logical change.
~1000 lines changed → Too large. Split it.

Count *quantified* lines, not raw diff lines. A raw +N/-M overstates review burden — a thousand lines of regenerated lockfile or a vendored snapshot is not a thousand lines to read. Before judging a change against the thresholds above, normalize:

  • Exclude what needs no line-by-line review — generated/auto-formatted output, lockfiles, vendored

code, large fixtures/snapshots, pure moves/renames. Verify these by intent, not by line (see "When large changes are acceptable").

  • Weight by reviewability, not character count — whitespace, import reordering, and comment-only

edits cost little attention; new branching logic costs a lot. Two diffs with the same +/- can be a 10-minute review and a 2-hour one.

  • Calibrate "large" to the repo, not an absolute — the same line count is routine in one codebase

and alarming in another; read the thresholds as percentiles of this project's typical change.

The point is to size by how much a reviewer must actually reason about, so the split decision tracks real review load rather than a misleading raw number.

The quantified-lines methodology (exclude generated/whitespace/comment lines, weight by reviewability,
calibrate to repository context) is a stack-agnostic adaptation of the MIT
prose; not vendored.

What counts as "one change": A single self-contained modification that addresses one thing, includes related tests, and keeps the system functional after submission. One part of a feature — not the whole feature.

Splitting strategies when a change is too large:

StrategyHowWhen
StackSubmit a small change, start the next one based on itSequential dependencies
By file groupSeparate changes for groups needing different reviewersCross-cutting concerns
HorizontalCreate shared code/stubs first, then consumersLayered architecture
VerticalBreak into smaller full-stack slices of the featureFeature work

When large changes are acceptable: Complete file deletions and automated refactoring where the reviewer only needs to verify intent, not every line.

Separate refactoring from feature work. A change that refactors existing code and adds new behavior is two changes — submit them separately. Small cleanups (variable renaming) can be included at reviewer discretion.

Change Descriptions

Every change needs a description that stands alone in version control history.

First line: Short, imperative, standalone. "Delete the FizzBuzz RPC" not "Deleting the FizzBuzz RPC." Must be informative enough that someone searching history can understand the change without reading the diff.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ajyadav013/claude-kit/code-review-and-quality/badge)](https://verified-skill.com/skills/ajyadav013/claude-kit/code-review-and-quality)

Something wrong with this skill or its page? Tell us.