Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

code-review

БесплатноБез исполняемых скриптовНе проверен

This skill should be used when the user asks to "review code", "check changes", "analyze a PR", "do a security review", or "assess code quality" — providing…

TheLobbiот TheLobbi★ 22 звезды на GitHub

Об этом скилле

Code Review Skill

Systematic code review patterns covering security, performance, accessibility, quality, and testing across languages and frameworks.

Security Review

Critical Checks:

  • Authentication tokens validated; authorization on sensitive ops
  • Session management secure (httpOnly, secure, sameSite)
  • No hardcoded credentials/API keys
  • Proper RBAC implementation
  • JWT tokens with proper algorithms (not 'none')
  • Password hashing: bcrypt/argon2 (not MD5/SHA1)

Input Validation:

  • User inputs sanitized
  • SQL injection prevention (parameterized queries)
  • XSS prevention (escaping/sanitization)
  • CSRF tokens on state-changing ops
  • File upload validation (type, size, content)
  • JSON/XML size limits
  • URL validation for redirects

Data Protection:

  • Sensitive data encrypted at rest
  • TLS/HTTPS for transit
  • No sensitive data in logs
  • PII handling regulation-compliant
  • Secure random (crypto.randomBytes)
  • Secrets in env vars or secret managers
  • Encrypted database connections

OWASP Top 10: No injection, broken auth, data exposure, XXE, broken access control, misconfiguration, XSS, insecure deserialization, vulnerable components, insufficient logging

Performance Review

Database & Queries:

  • N+1 queries identified and fixed
  • Proper indexing on WHERE/JOIN columns
  • Query result sets limited (pagination)
  • Connection pooling implemented
  • Expensive queries cached
  • Batch operations instead of loops

Frontend Performance:

  • Code splitting for large bundles
  • Lazy loading routes/components
  • Images optimized and lazy loaded
  • CSS/JS minified and compressed
  • Memoization for expensive computations
  • Virtual scrolling for long lists

API & Network:

  • API responses paginated
  • GraphQL queries optimized (no over-fetching)
  • Response compression (gzip/brotli)
  • CDN for static assets
  • HTTP/2 or HTTP/3
  • Proper caching headers
  • Rate limiting implemented

Memory Management:

  • Event listeners removed
  • No memory leaks (closures, timers)
  • Large objects disposed
  • File streams closed
  • WeakMap/WeakSet for caching

Accessibility Review (WCAG 2.1 AA)

Semantic HTML:

  • Proper heading hierarchy (h1, h2, h3)
  • Semantic elements (nav, main, article, aside)
  • Form labels properly associated
  • Button vs link used correctly
  • Tables with proper headers

Keyboard Navigation:

  • All interactive elements accessible
  • Logical tab order
  • Focus indicators visible
  • No keyboard traps
  • Skip links for navigation

Screen Reader Support:

  • All images have alt text
  • ARIA labels where needed
  • Live regions for dynamic content
  • Hidden content marked properly

Color & Contrast:

  • Text contrast >= 4.5:1 (normal)
  • Text contrast >= 3:1 (large)
  • Info not conveyed by color alone

Forms:

  • Error messages associated with fields
  • Required fields clearly marked
  • Validation accessible
  • Autocomplete attributes set

Code Quality Standards

Readability:

  • Descriptive variable/function names
  • Functions < 50 lines
  • Consistent naming (camelCase, PascalCase)
  • No magic numbers
  • Proper indentation

Maintainability:

  • DRY principle followed
  • SOLID principles applied
  • Low coupling, high cohesion
  • Proper separation of concerns
  • Configuration externalized
  • Feature flags for gradual rollout

Error Handling:

  • All errors caught and handled
  • User-friendly messages
  • Errors logged with context
  • Graceful degradation
  • Retry logic for transient failures
  • Circuit breakers for external services

Comments:

  • Complex logic explained
  • Why, not what (code self-explanatory)
  • TODO/FIXME with issue tracking
  • JSDoc/TSDoc for public APIs
  • No commented-out code

Testing Requirements

Unit Tests:

  • All business logic tested
  • Edge cases covered
  • Error conditions tested
  • Mocks for external dependencies
  • Test coverage >= 80%
  • Deterministic tests (no flaky)

Integration Tests:

  • API endpoints tested
  • Database operations tested
  • External integrations tested
  • Auth flows tested

E2E Tests:

  • Critical user flows covered
  • Happy paths tested
  • Error scenarios tested

Test Quality:

  • Readable and maintainable
  • AAA pattern (Arrange, Act, Assert)
  • Meaningful descriptions
  • No interdependencies
  • Fast execution (< 10s unit tests)

Language-Specific Patterns

TypeScript/JavaScript

Type Safety:

  • No any types (use unknown if needed)
  • Strict mode enabled
  • Union types over enums
  • Proper generic constraints
  • Type guards for narrowing

Modern Patterns:

  • Destructuring and defaults
  • Optional chaining (?.) and nullish coalescing (??)
  • Async/await over promise chains
  • Arrow functions for callbacks

React Components

Best Practices:

  • Functional components with hooks
  • Props properly typed
  • Minimal, localized state
  • Effect dependencies correct
  • No inline function definitions
  • Keys correct in lists
  • useCallback/useMemo for optimization

Node.js

Server Setup:

  • Error handling middleware
  • Request validation
  • Rate limit
Полный SKILL.md на GitHub

Установить code-review в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл code-review?

This skill should be used when the user asks to "review code", "check changes", "analyze a PR", "do a security review", or "assess code quality" — providing comprehensive review across correctness, security, performance, accessibility, and testing.

Как установить скилл code-review?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл code-review запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить code-review с