Code review

From matteocervelli/llms · View interactive version

Code review is an AI agent skill from the GitHub repository matteocervelli/llms. Claude-native review of code for quality, structure, naming, and maintainability (no external AI). Use when reviewing a file or diff for code quality before committing. Trigger on "review this code", "code review", "is this well-written". For security, use /security-verify; for companion-AI review,

How to use this skill

Skill file

Code Review Skill

Purpose

Code review focused on quality, structure, naming, and maintainability. For security reviews, use /security-verify scan.

Quick Start

/code-review <file-path>

Review Categories

1. Code Quality (Critical)

File Organization

Naming

Type Hints (Python) / Types (TS)

Docstrings/Comments

2. Error Handling

3. Complexity

4. Testing Readiness

5. Style

Review Output

# Code Review: src/module.py

## Quality Score: 8/10

## Critical Issues (Must Fix)

- Line 45: Function `process_data` is 78 lines. Split into smaller functions.

## Important Issues (Should Fix)

- Line 23: Missing type hint on return value
- Line 67: Bare `except:` - specify exception type

## Suggestions

- Line 12: Consider extracting magic number 86400 to constant

## Strengths

- Clear function naming
- Good separation of concerns

Common Issues Checklist

Python

TypeScript

General

6. Security (Stack-Specific)

FastAPI/Python Backend:

Jinja2/HTMX Frontend:

PostgreSQL Database:

For comprehensive security scan: Run /security-verify scan.

Integration

For comprehensive validation before commit:

  1. /code-review - This skill (structure, quality)
  2. /security-verify scan - Security issues
  3. /pre-commit - Full validation suite
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.