kmaruthi2002/universal-llm-skills/code-review

Claude Code and agent skill by kmaruthi2002/universal-llm-skills

Trust tier 3
  • community
Source check pending

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

Review a code change (pull request, merge request, patch, diff, or a set of edited files) for correctness, safety, maintainability and fit with the codebase, and write feedback the author can act on. Covers understanding intent first, prioritising logic and edge cases over style, concurrency, security, tests, API and schema changes, performance, severity levels, reviewing AI-generated code, and avoiding nitpick noise. Use when asked to "review this PR", "look over my diff", "check this change before I merge", "is this code OK", or to self-review your own change. Not for auditing a whole existing system (security-audit, architecture-review) or for preparing and landing your own PR (pull-request-workflow).

Install

npx vskill@latest install kmaruthi2002/universal-llm-skills/code-review

SKILL.md

The same SKILL.md was published earlier as kmaruthi2002/universal-llm-skills/code-review.

Code Review

A code review is a second, independent reading of a change by someone whose job is to find what the author could not see. Its value is almost entirely in defects caught before they ship and knowledge shared between people. Everything else (consistency, polish) is secondary and should be cheap, or automated.

This skill covers reviewing a change. For assessing a whole system's security posture use security-audit; for judging a design before it is built use architecture-review; for the author's side of the process (scoping, describing, responding, merging) use pull-request-workflow.

Core principles

1. Understand the intent before judging the code. You cannot say whether code is correct without knowing what it is supposed to do. A perfectly clean function that solves the wrong problem is the most expensive defect a review can miss, and it is invisible if you read line by line. Read the description, linked issue, and tests first; state the intended behaviour to yourself in a sentence.

2. Correctness beats style. A missed off-by-one costs an incident; a misnamed variable costs a few seconds of a future reader's time. Spend attention in proportion to the cost of being wrong. If you have a limited budget (and you always do), spend it on logic, data, security, and failure handling first.

3. Review the change in its context, not the diff in isolation. Diffs hide what did not change: the caller that now receives a different type, the second code path that needed the same fix, the config that still references the removed flag. Open the surrounding files. Search for other users of anything whose contract changed.

4. Every comment should be actionable and ranked. The author has to decide what to do with each comment. A comment that does not say what is wrong, why it matters, and how serious it is forces a round trip. Labelling severity lets the author fix blockers first and ignore preferences without guilt.

5. Only claim what you have verified. A false positive costs the author time, erodes trust in every later comment, and sometimes leads them to "fix" correct code. If you suspect a bug, trace it or test it; if you cannot, phrase it as a question.

6. The project's norms win. Review against the codebase's conventions, the team's documented review guidelines, and its linters, not against your personal taste or another ecosystem's idioms. If a convention seems harmful, raise that separately; do not block a change for following it.

7. Review the code, not the person. Feedback is about the artifact. This is not only kindness: defensive authors stop explaining their reasoning, and reviews get worse.

Discovering context before you read the diff

Gather, cheaply and in roughly this order:

  • The stated goal: PR description, linked ticket, commit messages. If there is no description, write down what you think the goal is and confirm it in your first comment.
  • Review norms: a CONTRIBUTING file, CODEOWNERS, PR template, review checklist, style guide, ADRs. These tell you what the team cares about and what is already enforced by tooling.
  • What tooling already checks: linters, formatters, type checkers, static analysis, CI test results. Do not spend human attention on anything a machine already enforces; if CI is red, find out why before reviewing in depth.
  • The blast radius: which modules, services, public APIs, schemas, or user-facing behaviours this touches. Shared libraries, auth, billing, data migrations and concurrency primitives deserve a slower read than a leaf UI component.
  • Who else should look: if the change touches an area with an owner or a specialist (security, database, accessibility), say so rather than pretending to cover it.

If you can run code: check out the branch, build it, run the tests, and exercise the changed behaviour. Reading finds design problems; running finds the ones you would have argued about.

The review process

Pass 1 — Shape (minutes)

Read the description, the file list, and the tests before any implementation. Ask:

  • Does the change do what it says, and only that? Unrelated refactors mixed into a behaviour change make both harder to review and to revert.
  • Is this the right place for the change? (Fixing a symptom in the caller when the bug is in the callee; adding a special case instead of fixing a general rule.)
  • Is it the right size? Very large changes get rubber-stamped. If you cannot hold it in your head, say so and suggest a split along a seam you can name.
  • Is the approach sound at all? If not, stop here and say so. Line comments on a change that should be redone waste everyone's time.
Pass 2 — Correctness (most of your time)

Walk each changed code path with concrete inputs. For each function or block, try:

  • the normal case,
  • empty, zero, null/none, missing key, empty collection,
  • one, many, and the boundary (max length, last page, exactly at the limit),
  • malformed or hostile input,
  • the failure of every call it makes (network, disk, DB, parse, permission),
  • being called twice, concurrently, or out of order.

The detailed checklist below lists what to look for in each area. You do not need every item for every change; pick the areas the change actually touches.

Pass 3 — Tests

Read the tests as a specification. Would they fail if the change were reverted? Do they cover the edge cases you found in pass 2? (See "Tests" below.)

Pass 4 — Maintainability and fit

Naming, structure, duplication, comments, consistency with neighbouring code. Keep this pass short and keep its comments low-severity unless something will genuinely mislead a future maintainer.

Pass 5 — Write up

Order your feedback by severity, add a summary, give a clear overall verdict. (See "Writing the review".)

For a small change, these passes collapse into one read. For a large or risky one, do them separately; mixing them is how style comments crowd out the real bug.

What to look for

Logic and data
  • Off-by-one in loops, slices, pagination, ranges (inclusive vs exclusive end).
  • Inverted or incomplete conditions; and/or precedence; De Morgan mistakes; early returns that skip cleanup.
  • Wrong variable (copy-paste from the block above is the classic).
  • Integer overflow, division by zero, floating point used for money or equality.
  • Time: time zones, DST, naive vs aware timestamps, clock skew between machines, "now" captured once vs repeatedly, leap days, month-end arithmetic.
  • Text: encoding, normalisation, case-folding in non-English locales, byte length vs character length.
  • Mutation of shared or input data the caller did not expect; aliasing.
  • State machines: every transition handled, no impossible states representable, idempotency of retries.
  • Behaviour change for existing callers or stored data that the description does not mention.
Error handling
  • Errors swallowed, logged and ignored, or converted into success.
  • Catch blocks that are too broad (catch-all hiding programmer errors) or too narrow (missing a failure the code can actually produce).
  • Partial failure: if step 3 of 5 fails, what state are we left in? Is it recoverable?
  • Resources released on every path (files, connections, locks, transactions).
  • Retries without backoff, without a limit, or of non-idempotent operations.
  • Error messages that leak internals to users, or that lose the cause chain needed for debugging.

See error-handling for depth.

Concurrency and async
  • Shared mutable state accessed from multiple threads, tasks, requests or processes without synchronisation.
  • Check-then-act races (if not exists: create), read-modify-write without atomicity or optimistic locking.
  • Lock ordering (deadlock), locks held across I/O or await, missing release on error.
  • Unawaited promises/futures, fire-and-forget tasks whose errors vanish, cancellation not propagated.
  • Blocking calls on an event loop or UI thread.
  • Assumptions that a job runs once, that messages arrive in order, or that a cache is consistent with its source.

Concurrency bugs rarely show up in tests. If the change introduces shared state, ask explicitly how it is protected. See concurrency-and-async.

Security

Read every change that handles input, identity, money, files, or external calls with an attacker's question: what if this value is chosen by someone hostile?

  • Injection: SQL, shell, template, LDAP, path, header, log. Is untrusted data ever concatenated into an interpreted string?
  • Authorisation: is there a check that this user may act on this object (not just that they are logged in)? Is it on the server? Is it on every new endpoint, including the ones added "just for the admin UI"?
  • Authentication and sessions: token handling, expiry, comparison in constant time, logout/invalidation.
  • Output encoding for HTML/JS contexts (XSS); unsafe deserialisation; server-side requests to user-supplied URLs (SSRF); open redirects.
  • Secrets in code, config, test fixtures, logs, or error messages.
  • Cryptography: home-made schemes, weak algorithms, predictable randomness for security purposes, disabled certificate verification.
  • New dependencies: are they maintained, necessary, and from the expected source? (Typosquatting is real.)
  • Data exposure: are new fields in API responses or logs personal or sensitive?

When a security issue is plausible but you are not sure, flag it as a question and suggest a specialist look. See secure-coding and authentication-and-authorization.

Tests
  • Would the test fail without the change? A test that passes against the old code tests nothing. If you can, revert the implementation locally and run it.
  • Does it test behaviour (inputs and observable outputs) rather than implementation details that will break on any refactor?
  • Are edge cases and failure paths covered, not just the happy path?
  • Are assertions specific? (assert result or "does not throw" is rarely enough.)
  • Is it deterministic? Watch for real time, randomness, network, ordering of hash maps, shared global state, sleeps.
  • Is mocking hiding the interesting part? A test that mocks the database cannot catch a wrong query.
  • For bug fixes: is there a regression test that reproduces the original bug?

Missing tests are not automatically a blocker. Weigh against risk: untested changes to billing logic are; untested copy changes are not. See testing-strategy.

API, schema and contract changes

Anything another component, team, client, or stored record depends on deserves extra care, because the cost of a mistake is paid by people outside this PR.

  • Is it backward compatible? Removed or renamed fields, changed types, new required parameters, changed defaults, changed error codes, changed ordering.
  • If it is breaking: is it versioned, announced, and is there a migration path?
  • Database migrations: can they run on a large table without locking it? Are they reversible? Is the code compatible with both the old and new schema during a rolling deploy? See database-migrations.
  • Serialised data, queues, caches and events: will consumers running the previous version understand the new format, and vice versa?
  • Feature flags and config: new settings have safe defaults; removed ones are not still referenced elsewhere.

See api-design.

Performance

Raise performance only when there is a plausible real cost, not on principle.

  • Work inside loops that could be done once: queries (N+1), allocations, regex compilation, network calls.
  • Unbounded operations on user-controlled sizes: loading a whole table, unpaginated endpoints, unbounded caches or queues, recursion depth.
  • Missing indexes for new query patterns.
  • Algorithmic complexity that is fine at today's size but quadratic in something that grows.
  • Synchronous work on a latency-critical path that could be deferred.

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

Security

  • Security scanPassed, 90 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
0

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/kmaruthi2002/universal-llm-skills/code-review/badge)](https://verified-skill.com/skills/kmaruthi2002/universal-llm-skills/code-review)

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