Code Review

Automates the full code review process — Claude analyzes changes, checks standards, writes PR descriptions, and flags architecture problems early.

Development / Code Qualitydevelopmentcode-quality
by AgentVoltv1.0.0Published 1y ago
Free to sign up · every skill included with AgentVolt Pro

Before & after

Same prompt, same agent — the only difference is the skill.

PromptReview this pull request for bugs and architecture problems
Beforegeneric AI agent
I'll review your PR for you. Let me look at the code changes and check if they follow your coding standards. I can provide feedback on the structure and suggest improvements. It's good to check for common issues like error handling, edge cases, and performance problems. I'll look at the tests to make sure they cover the new functionality. I should also check if the PR description clearly explains what changed and why. Let me know if you have any specific areas you want me to focus on. I can write up a summary of findings when I'm done. Would you like me to focus on anything specific, or should I do a comprehensive review?
Afterwith Code Review
CODE REVIEW REPORT: PR 847

CRITICAL ISSUES (Block merge)
  1. Memory leak in useEffect hook (auth.tsx, line 42)
    Finding: clearInterval not called on unmount
    Impact: Browser memory grows 2.3 MB per login cycle in long-lived sessions
    Fix: Add cleanup: return () => clearInterval(pollTimer)
    Confidence: 100%

  2. Missing authentication on /admin endpoint (api/admin.ts, line 18)
    Finding: POST /api/admin/update-user accepts any request without admin role check
    Impact: CRITICAL — any user can promote themselves to admin
    Fix: Add auth middleware: export const handler = withAdminAuth(updateUser)
    Confidence: 100%

WARNINGS (Fix before merge)
  3. Unhandled promise rejection (stripe.ts, line 105)
    Risk: Stripe API failures silently swallowed
    Fix: Add .catch() or wrap in try/catch
    Confidence: 95%

  4. Missing TypeScript type for user_id (queries.sql, line 22)
    Type assumes string, callers pass number
    Fix: Change signature: sql\`SELECT * FROM users WHERE id = NUMBER(userId)\`
    Confidence: 90%

ARCHITECTURE CONCERNS
  Pattern: 4 new database queries in single handler (payment-webhook.ts)
  Issue: N+1 query problem emerging. Current: 15 queries per webhook event.
  Recommendation: Batch into 1-2 calls using JOIN or prefetch
  Impact if ignored: Performance degrades with volume (50 webhooks/min, scales to 500+)

STANDARDS COMPLIANCE
  Coding: 9/10 (minor userId vs user_id inconsistency)
  Test coverage: 7/10 (missing tests for Stripe failure paths)
  PR description: 8/10 (clear what changed, missing why on one decision)

GENERATED PR DESCRIPTION
  Title: Fix auth bypass and memory leak in payment flow
  Summary:
    - Adds auth gate to /admin endpoint (security fix)
    - Fixes useEffect cleanup to prevent browser memory leak
    - Refactors stripe webhook to batch database queries
  Risk level: Low (fixes localized, comprehensive tests)
  Deploy: Safe for next release
  Monitor: Watch admin endpoint access logs for abnormal activity

STATUS: BLOCKED — Fix critical issues 1-2 first. Re-request review after fixes.

About this skill


name: code-review description: Use when Automates the full code review process — Claude analyzes changes, checks standards, writes PR descriptions, and flags architecture problems early.

Code Review

Code Review automates the entire review workflow. Claude analyzes your changes against your requirements and coding standards, produces structured review reports, writes PR descriptions, and flags architecture issues before a human has to look. Stack with PR Review Toolkit for confidence-scored findings on every issue.

What you get

  • Automated structured review reports, PR description generation, architecture problem flagging, standards compliance checks, confidence-scored findings with PR Review Toolkit.

Customize your output

  • Define your coding standards, PR templates, severity levels (info/warning/error/critical), and which patterns to enforce.

Example output

Review complete: 2 critical issues (memory leak in useEffect, missing auth on /admin endpoint), 4 warnings. PR description written and ready.

Best for

Solo developers, teams wanting consistent review quality, vibe coders who need Claude to catch issues before shipping.

SKILL.md preview

SKILL.md
---
name: code-review
description: Use this skill when a set of code changes needs a structured review, a PR description, and an early architecture check.
version: 1.0.0
category: Development / Code Quality
author: AgentVolt
license: proprietary
tags:
  - development
  - code-quality
  - standard
---

# Code Review

Runs a full structured review of a code change: standards compliance, architecture risk, and a ready-to-post PR description.

## When to use

… (sign up to view the full skill)
Sign up to view, copy, and install the full skill