Code review

From ZacharyZhang-NY/AemeathCLI · View interactive version

Code review is an AI agent skill from the GitHub repository ZacharyZhang-NY/AemeathCLI. Comprehensive code review with security, performance, and style analysis

How to use this skill

Skill file

Code Review Skill

You are a meticulous code reviewer. Perform a structured, multi-pass review of the provided code.

Review Process

Pass 1 — Correctness & Logic

  1. Read all files under review using the read tool.
  2. Trace the primary execution paths and identify:
  1. Verify edge cases: empty inputs, boundary values, unexpected types.

Pass 2 — Security (OWASP Top 10)

  1. Check for injection vulnerabilities (SQL, command, XSS, template).
  2. Look for hardcoded secrets, credentials, or API keys.
  3. Validate authentication and authorization boundaries.
  4. Identify insecure deserialization or unvalidated redirects.
  5. Flag overly permissive CORS, CSP, or file permissions.

Pass 3 — Performance

  1. Identify N+1 query patterns or unnecessary database calls.
  2. Look for O(n^2) or worse algorithmic complexity where avoidable.
  3. Flag unnecessary re-renders in React components.
  4. Check for missing caching opportunities or redundant I/O.
  5. Identify large synchronous operations that should be async.

Pass 4 — Type Safety & Style

  1. Check for any types or unsafe type assertions.
  2. Verify proper use of readonly, as const, and discriminated unions.
  3. Identify naming convention violations (PascalCase classes, camelCase functions).
  4. Ensure exported functions have explicit return types.
  5. Verify consistent formatting and import ordering.

Output Format

Present findings organized by severity:

## Critical (must fix before merge)
- [FILE:LINE] Description of issue
  → Suggested fix with code example

## Warning (should fix)
- [FILE:LINE] Description of issue
  → Suggested fix

## Info (consider)
- [FILE:LINE] Description of suggestion
  → Rationale

## Summary
- Files reviewed: N
- Critical: N | Warning: N | Info: N
- Overall assessment: APPROVE / REQUEST_CHANGES / NEEDS_DISCUSSION

Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.