code-reviewer
БесплатноБез исполняемых скриптовНе проверенPerform thorough code reviews with actionable, prioritized feedback. Use when a user asks to review code, check code quality, find bugs, review a pull…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Code Reviewer
Overview
Perform structured code reviews that identify bugs, security issues, performance problems, and maintainability concerns. Provides prioritized, actionable feedback with specific fix suggestions.
Instructions
When a user asks you to review code, a file, a diff, or a pull request, follow this process:
Step 1: Understand the context
Before reviewing, determine:
- What does this code do? (feature, bugfix, refactor)
- What language and framework is it using?
- Are there tests included?
- Is this a full file or a diff/patch?
Read surrounding files if needed to understand the broader codebase context. Get the change itself with git diff main...HEAD (local branch) or gh pr diff 482 (pull request), and run the project's own linter and test command first so the review does not repeat what tooling already reports.
Step 2: Review using this checklist
Evaluate the code against each category in order of severity:
Correctness (Critical)
- Logic errors, off-by-one mistakes, wrong conditions
- Unhandled null/undefined/empty cases
- Race conditions or concurrency issues
- Incorrect error handling (swallowed exceptions, wrong error types)
- Missing input validation
Security (Critical)
- SQL injection, XSS, command injection
- Hardcoded secrets, API keys, passwords
- Improper authentication/authorization checks
- Unsafe deserialization, path traversal
- Missing rate limiting on public endpoints
Performance (High)
- N+1 queries in database loops
- Unnecessary re-renders in UI components
- Missing indexes for frequent queries
- Unbounded memory growth (loading entire datasets)
- Blocking operations on the main thread
Reliability (High)
- Missing error handling for external calls (network, file I/O)
- No retry logic for transient failures
- Missing timeouts on HTTP requests
- Resource leaks (unclosed connections, file handles)
Readability (Medium)
- Unclear variable or function names
- Functions doing too many things (> 30 lines is a smell)
- Deeply nested conditionals (> 3 levels)
- Missing or misleading comments
- Inconsistent naming conventions
Testing (Medium)
- Missing tests for new logic
- Tests that do not assert meaningful behavior
- Missing edge case coverage
- Brittle tests coupled to implementation details
Step 3: Format the review
Organize findings by severity. For each issue:
### [SEVERITY] Category: Brief title
**File:** `src/routes/users.js` line 12-18
**Issue:** What is wrong and why it matters.
**Suggestion:**
(a fenced code block in the file's language with the fixed code)
Severity levels: CRITICAL, HIGH, MEDIUM, LOW. Tag each finding by how sure you are (confirmed by reading the code, or suspected and needs a check).
Step 4: Provide a summary
End with:
- Overall assessment (approve, request changes, or needs discussion)
- Count of issues by severity
- Top 3 things to fix before merging
Examples
Example 1: Review a Node.js API endpoint
User request: "Review this Express route handler"
Code submitted:
app.post('/users', async (req, res) => {
const { name, email, role } = req.body;
const user = await db.query(
`INSERT INTO users (name, email, role) VALUES ('${name}', '${email}', '${role}')`
);
res.json(user);
});
// db is a node-postgres Pool; the handler runs under Express 4
Review output:
### CRITICAL Security: SQL Injection vulnerability
**File:** routes/users.js line 2-5
**Issue:** User input is interpolated directly into the SQL query string.
An attacker can inject arbitrary SQL via the name, email, or role fields.
**Suggestion:**
const user = await db.query(
'INSERT INTO users (name, email, role) VALUES ($1, $2, $3)',
[name, email, role]
);
### CRITICAL Security: No input validation
**File:** routes/users.js line 2
**Issue:** Request body fields are used without validation. Missing or
malformed data will cause database errors or store invalid records.
**Suggestion:**
if (!name || !email || !email.includes('@')) {
return res.status(400).json({ error: 'Name and valid email required' });
}
const allowedRoles = ['user', 'admin', 'editor'];
if (!allowedRoles.includes(role)) {
return res.status(400).json({ error: 'Invalid role' });
}
### HIGH Reliability: No error handling
**File:** routes/users.js line 3-5
**Issue:** In Express 4 a rejected promise in an async handler is not
caught: the request hangs and the rejection can crash the process
(Express 5 forwards it to the error handler).
**Suggestion:**
try {
const { rows } = await db.query(
'INSERT INTO users (name, email, role) VALUES ($1, $2, $3) RETURNING id, name, email, role',
[name, email, role]
);
res.status(201).json(rows[0]);
} catch (err) {
console.error('Failed to create user:', err);
res.status(500).json({ error: 'Failed to create user' });
}
Summary: REQUEST CHANGES
- Cr
Установить code-reviewer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл code-reviewer?
Perform thorough code reviews with actionable, prioritized feedback. Use when a user asks to review code, check code quality, find bugs, review a pull request, audit code for issues, or get feedback on implementation. Covers correctness, security, performance, readability, and best practices across languages.
Как установить скилл code-reviewer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл code-reviewer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic