SkillVaultskills Browse all 500 skills

Productivity · Version 2.1.0 · Reviewed 2026-08-02

Code Review Agent

Turn engineering context into a reliable artifact for pull request review and risk analysis with evidence, explicit trade-offs, and a verification plan.

4 method steps 6 documented failure modes 5 diagnostic checks 7 quality gates

Finds correctness, reliability, security, and maintainability issues in focused code changes.

₹99 one-time

Get this skill archive

What this skill helps you do

  • Pull request review
  • Risk analysis
  • Refactoring guidance

How Code Review Agent works

You provide

The diff, its intent, and the deployment order

It inspects

Concurrency on shared state, error paths, resource lifetimes

It decides

Blocking issues separated from suggestions

You verify

A failing test that would have caught the defect

What it checks first

Code Review Skill finds correctness, reliability, security, and maintainability issues in focused code changes. Use it when the work involves Pull request review, Risk analysis, Refactoring guidance.

  1. The diff boundary: what the change makes possible that was previously impossible, which is where new failure modes enter.
  2. Whether error paths are exercised by the tests, or only the happy path is covered while `catch` blocks stay unproven.
  3. Concurrency-visible state: any read-modify-write on shared data without a lock, transaction, or atomic operation.
  4. Resource lifetimes — connections, file handles, subscriptions, timers — and whether every early return still releases them.
  5. Whether the change is backward compatible for data and consumers already in flight during deployment.

Failure modes it recognizes

  • A check-then-act sequence that is correct under test and wrong under concurrency, overwriting a newer value.
  • An unbounded collection (cache, list, map) that grows with traffic and becomes a slow memory leak.
  • A caught-and-logged exception that allows the function to continue with invalid state instead of failing fast.
  • N+1 queries introduced by iterating over records and lazily loading a relation inside the loop.
  • A new required field or narrowed validation deployed before producers are updated, breaking in-flight requests.
  • Retry logic without a budget or jitter, converting a transient dependency blip into a self-inflicted overload.

Answers it will reject

  • Approving because tests pass — tests prove the covered paths, not the absence of the uncovered failure.
  • Style commentary that crowds out the one correctness issue, so the important comment is lost in the noise.
  • Requesting broad refactors inside an unrelated change, which increases risk and delays the fix.
  • Treating "it matches the existing pattern" as sufficient when the existing pattern is the defect being propagated.

Decision rules it applies

  • Block only on correctness, security, data loss, or irreversibility; everything else is a suggestion and should be labeled as one.
  • If the change is hard to review because it mixes refactor and behavior, ask for a split rather than guessing which lines change behavior.
  • Any new write path to shared state requires an explicit answer to "what happens if two of these run at once".
  • Prefer a reversible change with a feature flag over a correct-but-unrollbackable one when confidence is below high.

Evidence it asks for

  • Ask for the failing test that would have caught the bug, not a description of the fix.
  • Request the query count for the changed request path when a loop touches persistence.
  • Confirm the deployment order for schema plus code changes: expand, migrate, contract.

The method inside

  1. Map the artifact, actors, boundaries, and invariants relevant to pull request review.
  2. Trace concrete failure or abuse paths for risk analysis; do not report checklist items without a mechanism.
  3. Prioritize refactoring guidance findings by impact, likelihood, confidence, and cost of correction.
  4. Recommend the smallest defensible change, then define how an independent reviewer can verify it.

Deliverables

  • Pull request review assessment
  • Risk analysis decision and action plan
  • Refactoring guidance verification checklist

Evidence requirements

  • Source code, discussion, notes, or existing artifact
  • Audience, decision, and acceptance criteria
  • Repository conventions and constraints

Quality gates

  • Every material claim traces to supplied evidence or is labeled as a hypothesis.
  • The response follows the declared deliverable contract.
  • No execution, access, measurement, or verification is invented.
  • Secrets and personal data are redacted rather than repeated.
  • The user receives a concrete independent verification step.
  • The relevant failure modes in this domain were considered rather than only the reported symptom.
  • No listed anti-pattern was recommended as a solution.

Example task

Input

Review this cache invalidation change for race conditions before we merge it to the payment service.

Expected output

The read-modify-write sequence can overwrite a newer value: two concurrent requests both read the current entry, both compute a new one, and the slower write wins regardless of ordering. Use a version check or atomic compare-and-set so the stale write fails loudly rather than silently succeeding...

Boundaries and compatibility

Ideal for

  • Pull request review: produce a decision or artifact grounded in supplied evidence.
  • Risk analysis: produce a decision or artifact grounded in supplied evidence.
  • Refactoring guidance: produce a decision or artifact grounded in supplied evidence.

Out of scope

  • Inventing repository behavior or decisions
  • Replacing review by the accountable owner

Agent compatibility

  • GitHub Copilot custom agents
  • Claude Agent Skills / SKILL.md
  • Any instruction-following chat model

Tool policy: Advisory by default. No tools are assumed. If the host provides tools, use read-only evidence gathering unless the user explicitly approves a scoped write or execution action.