# Code Reviewer

Automatic code quality and best practices analysis.

- Repository: https://github.com/alirezarezvani/claude-code-tresor (782 stars)
- Category: Security
- License: MIT
- Last updated: 2026-07-03
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add alirezarezvani/claude-code-tresor --skill code-reviewer -g -a claude-code -y`
Codex: `npx skills add alirezarezvani/claude-code-tresor --skill code-reviewer -g -a codex -y`
Cursor: `npx skills add alirezarezvani/claude-code-tresor --skill code-reviewer -g -a cursor -y`
Gemini CLI: `npx skills add alirezarezvani/claude-code-tresor --skill code-reviewer -g -a gemini-cli -y`

## Description

Automatic code quality and best practices analysis. Use proactively when files are modified, saved, or committed. Analyzes code style, patterns, potential bugs, and security basics. Triggers on file changes, git diff, code edits, quality mentions.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Code Reviewer Skill


Lightweight automatic code quality checks while you code.

## When I Activate

- ✅ Files modified or saved
- ✅ Git diff run
- ✅ Code mentioned in conversation
- ✅ User asks about code quality
- ✅ Before commits

## What I Check

### Quick Wins
- Code style and formatting issues
- Common anti-patterns
- Obvious bugs (null checks, undefined references)
- Basic security patterns (hardcoded secrets)
- Import/export issues
- Unused variables and functions

### What I Don't Do
- Deep architectural review → Use **@code-reviewer** sub-agent
- Comprehensive security audit → Use **security-auditor** skill
- Performance profiling → Use **@architect** sub-agent
- Full refactoring plans → Use **@code-reviewer** sub-agent

## Relationship with @code-reviewer Sub-Agent

**Me (Skill):** Fast, lightweight, real-time feedback
**@code-reviewer (Sub-Agent):** Deep analysis with examples and strategy

### Workflow

1. You write code
2. I auto-analyze (instant feedback)
3. I flag: "⚠️ Potential issue on line 42"
4. You want details → Invoke **@code-reviewer** sub-agent
5. Sub-agent provides comprehensive analysis

## Analysis Examples

### JavaScript/TypeScript

```javascript
// You write this code:
function getUser(id) {
  return db.query(`SELECT * FROM users WHERE id = ${id}`);
}

// I immediately flag:
// 🚨 Line 2: SQL injection vulnerability
// 💡 Use parameterized queries
```

### React

```javascript
// You write:
function UserList({ users }) {
  return users.map(user => <User data={user} />);
}

// I flag:
// ⚠️ Missing key prop in list rendering (line 2)
// 💡 Add key={user.id} to User component
```

### Python

```python
# You write:
def process_data(data):
    return data['user']['profile']['name']

# I flag:
# ⚠️ Potential KeyError - no safety checks (line 2)
# 💡 Use .get() or add try/except
```

## Check Categories

The rest: https://github.com/alirezarezvani/claude-code-tresor/blob/HEAD/skills/development/code-reviewer/SKILL.md
