code-review
БесплатноБез исполняемых скриптовНе проверенPerform automated code reviews checking for security vulnerabilities, performance issues, and code quality. Use before creating PRs, when reviewing complex…
от motormetrics★ 22 звезды на GitHubОб этом скилле
Code Review Skill
Quick Checks
# Run all automated checks
pnpm biome check .
pnpm tsc --noEmit
pnpm test
# Search for common issues
grep -r "any" apps/ packages/ --include="*.ts" # any usage
grep -r "console.log" apps/ packages/ --include="*.ts" # debug logs
grep -r "TODO" apps/ packages/ --include="*.ts" # TODOs
Review Checklist
Functionality: Code works, edge cases handled, no obvious bugs
Code Quality: Readable, small focused functions, descriptive names, no duplication
Type Safety: No any, proper TypeScript types, well-defined interfaces
Testing: New code has tests, tests cover edge cases
Performance: No unnecessary re-renders, optimized queries, no N+1
Security: No SQL injection, XSS, or exposed secrets; input validation present
Common Anti-Patterns
// ❌ Magic numbers → ✅ Use constants
if (user.age > 18) {} // Bad
if (user.age >= LEGAL_AGE) {} // Good
// ❌ Deep nesting → ✅ Early returns
if (!user || !user.isActive) return;
// ❌ Using any → ✅ Proper typing
function process(data: any) {} // Bad
function process(data: UserData) {} // Good
// ❌ SQL injection → ✅ Parameterized queries
const query = `SELECT * FROM users WHERE id = ${userId}`; // Bad
db.query.users.findFirst({ where: eq(users.id, userId) }); // Good
// ❌ N+1 queries → ✅ Single query with join
for (const post of posts) { post.author = await db.query.users... } // Bad
db.query.posts.findMany({ with: { author: true } }); // Good
// ❌ Missing memoization → ✅ useMemo for expensive ops
const data = expensiveOperation(data); // Bad
const data = useMemo(() => expensiveOperation(data), [data]); // Good
Review Comments
Use these markers for clarity:
- 🔴 Must Fix: Critical issues blocking merge (security, bugs)
- 🟡 Should Fix: Important but not blocking
- 🟢 Suggestion: Nice to have
- 💡 Learning: Educational context
- ❓ Question: Requesting clarification
Self-Review Before PR
git diff main...HEAD # View changes
pnpm biome check --write . # Format/lint
pnpm tsc --noEmit # Type check
pnpm test # Run tests
git diff --stat main...HEAD # Check PR size
Framework-Specific Checks
React: Check hooks usage, memoization, key props, useEffect deps Next.js: Server vs client components, 'use client' directive, metadata Drizzle: Proper indexing, N+1 queries, transactions
Best Practices
- Be Constructive: Focus on improvement, not criticism
- Explain Why: Provide context for suggestions
- Prioritize: Mark critical vs nice-to-have
- Be Timely: Review PRs promptly
References
- See
securityskill for security auditing - See
performanceskill for performance optimization
Установить code-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobBashFAQ
Что делает скилл code-review?
Perform automated code reviews checking for security vulnerabilities, performance issues, and code quality. Use before creating PRs, when reviewing complex changes, checking for security issues, or identifying performance problems.
Как установить скилл code-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл code-review запускает скрипты?
Нет, скилл состоит только из инструкций (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