Skip to Content
WorkflowsCode Review Workflow

Code Review Workflow

Ensure code quality, security, and performance using the automated Reviewer agent.

Overview

Goal: automated code analysis and actionable feedback. Agents Used: Reviewer. Command: /review

Workflow

1. Initiate Review

You can review the entire project or specific files.

/review # or /review "check security of src/auth"

2. Analysis

The Reviewer agent scans the code for:

  • Security: Vulnerabilities, secrets exposure, unsafe data handling.
  • Performance: N+1 queries, unoptimized loops, large bundle sizes.
  • Quality: Anti-patterns, code duplication, variable naming, type safety.
  • Best Practices: Adherence to framework guidelines (e.g., Next.js, React).

3. Report

The agent outputs a structured report:

# Code Review Report ## 🔴 Critical Issues - `src/api/auth.ts`: API Key hardcoded in line 42. Move to environment variables. ## 🟡 Improvements - `src/components/List.tsx`: Missing unique `key` prop in map function. - `src/utils/helpers.ts`: Complex function `calculateTotal` lacks documentation. ## 🟢 Best Practices - Good use of TypeScript interfaces in `src/types`.

Best Practices

  • Pre-Commit: Run /review before committing changes to catch issues early.
  • Specific Scope: For large projects, review specific directories to get faster, more targeted feedback.
  • Security First: Use /review "security audit" to specifically focus on vulnerabilities.
Last updated on