К основному содержанию
скилл CX Codex

code-review-quality — скилл для Claude Code: обзор и установка

Проверяет код по логике, безопасности, тестируемости и сопровождаемости. Нужен для ревью PR, разбора изменений и правил обратной связи в команде.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add proffesor-for-testing/agentic-qe --skill code-review-quality -a claude-code
Открыть на GitHub

Что делает code-review-quality

Скилл задаёт контекстное ревью с приоритетами Blocker, Major, Minor и Suggestion. Он направляет внимание на ошибки, обработку исключений, риски инъекций и авторизации, тесты, дублирование, утечки памяти, циклы O(n²) и N+1-запросы, а не на форматирование и вкусовые замечания.

Для больших изменений он советует делить проверку: до 200 строк можно смотреть за один раз, от 200 до 400 — частями, свыше 400 — просить разделить PR. Это повод не принимать объёмный PR как одну задачу, потому что скилл прямо ограничивает ревью 400 строками.

В состав входят субагенты qe-quality-analyzer, qe-security-scanner, qe-performance-tester и qe-coverage-analyzer. Скилл требует минимум 3 применимых наблюдения с взвешенной оценкой 3.0; если первоначальное ревью слабее, он предлагает подключить qe-devils-advocate для дополнительной проверки.

Какие задачи решает

  • найти ошибки логики и граничные случаи
  • выявить риски инъекций и проверки авторизации
  • проверить новые тесты и покрытие изменений
  • разбить крупный PR на части для ревью
  • сформулировать замечания с объяснением причины

Примеры запросов агенту

  • Проверь этот PR по логике, безопасности, тестируемости и сопровождаемости.
  • Сделай ревью изменённых файлов, расставь Blocker, Major и Minor.
  • Проверь, есть ли тесты для новых веток и обработки ошибок.

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

1Через Skills CLI (Vercel)

npx skills add proffesor-for-testing/agentic-qe --skill code-review-quality -a claude-code

2Вручную: положить файлы

~/.claude/skills/code-review-quality/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/code-review-quality/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о code-review-quality

Как установить code-review-quality в Claude Code?

Выполните по порядку: npx skills add proffesor-for-testing/agentic-qe --skill code-review-quality -a claude-code, затем ещё раз npx skills add proffesor-for-testing/agentic-qe --skill code-review-quality -a claude-code, затем используйте ~/.claude/skills/code-review-quality/SKILL.md.

Что делает code-review-quality?

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

Какие субагенты используются при ревью?

Скилл включает qe-quality-analyzer для логики и сопровождаемости, qe-security-scanner для рисков безопасности, qe-performance-tester для производительности и qe-coverage-analyzer для покрытия тестами.

Исходный текст

SKILL.md · MIT
---
name: code-review-quality
description: "Conduct context-driven code reviews focusing on quality, testability, and maintainability. Use when reviewing code, providing feedback, or establishing review practices."
category: development-practices
priority: high
tokenEstimate: 900
agents: [qe-quality-analyzer, qe-security-scanner, qe-performance-tester, qe-coverage-analyzer]
implementation_status: optimized
optimization_version: 1.0
last_optimized: 2025-12-02
dependencies: []
quick_reference_card: true
tags: [code-review, feedback, quality, testability, maintainability, pr-review]
trust_tier: 2
validation:
  schema_path: schemas/output.json
  validator_path: scripts/validate-config.json
---

# Code Review Quality

<default_to_action>
When reviewing code or establishing review practices:
1. PRIORITIZE feedback: 🔴 Blocker (must fix) → 🟡 Major → 🟢 Minor → 💡 Suggestion
2. FOCUS on: Bugs, security, testability, maintainability (not style preferences)
3. ASK questions over commands: "Have you considered...?" > "Change this to..."
4. PROVIDE context: Why this matters, not just what to change
5. LIMIT scope: Review < 400 lines at a time for effectiveness

**Quick Review Checklist:**
- Logic: Does it work correctly? Edge cases handled?
- Security: Input validation? Auth checks? Injection risks?
- Testability: Can this be tested? Is it tested?
- Maintainability: Clear naming? Single responsibility? DRY?
- Performance: O(n²) loops? N+1 queries? Memory leaks?

**Critical Success Factors:**
- Review the code, not the person
- Catching bugs > nitpicking style
- Fast feedback (< 24h) > thorough feedback
</default_to_action>

## Quick Reference Card

### When to Use
- PR code reviews
- Pair programming feedback
- Establishing team review standards
- Mentoring developers

### Feedback Priority Levels
| Level | Icon | Meaning | Action |
|-------|------|---------|--------|
| Blocker | 🔴 | Bug/security/crash | Must fix before merge |
| Major | 🟡 | Logic issue/test gap | Should fix before merge |
| Minor | 🟢 | Style/naming | Nice to fix |
| Suggestion | 💡 | Alternative approach | Consider for future |

### Review Scope Limits
| Lines Changed | Recommendation |
|---------------|----------------|
| < 200 | Single review session |
| 200-400 | Review in chunks |
| > 400 | Request PR split |

### What to Focus On
| ✅ Review | ❌ Skip |
|-----------|---------|
| Logic correctness | Formatting (use linter) |
| Security risks | Naming preferences |
| Test coverage | Architecture debates |
| Performance issues | Style opinions |
| Error handling | Trivial changes |

---

## Feedback Templates

### Blocker (Must Fix)
```markdown
🔴 **BLOCKER: SQL Injection Risk**

This query is vulnerable to SQL injection:
```javascript
db.query(`SELECT * FROM users WHERE id = ${userId}`)
```

**Fix:** Use parameterized queries:
```javascript
db.query('SELECT * FROM users WHERE id = ?', [userId])
```

**Why:** User input directly in SQL allows attackers to execute arbitrary queries.
```

### Major (Should Fix)
```markdown
🟡 **MAJOR: Missing Error Handling**

What happens if `fetchUser()` throws? The error bubbles up unhandled.

**Suggestion:** Add try/catch with appropriate error response:
```javascript
try {
  const user = await fetchUser(id);
  return user;
} catch (error) {
  logger.error('Failed to fetch user', { id, error });
  throw new NotFoundError('User not found');
}
```
```

### Minor (Nice to Fix)
```markdown
🟢 **minor:** Variable name could be clearer

`d` doesn't convey meaning. Consider `daysSinceLastLogin`.
```

### Suggestion (Consider)
```markdown
💡 **suggestion:** Consider extracting this to a helper

This validation logic appears in 3 places. A `validateEmail()` helper would reduce duplication. Not blocking, but might be worth a follow-up PR.
```

---

## Review Questions to Ask

### Logic
- What happens when X is null/empty/negative?
- Is there a race condition here?
- What if the API call fails?

### Security
- Is user input validated/sanitized?
- Are auth checks in place?
- Any secrets or PII exposed?

### Testability
- How would you test this?
- Are dependencies injectable?
- Is there a test for the happy path? Edge cases?

### Maintainability
- Will the next developer understand this?
- Is this doing too many things?
- Is there duplication we could reduce?

## Minimum Findings Enforcement
Reviews must meet a minimum weighted finding score of 3.0 (CRITICAL=3, HIGH=2, MEDIUM=1, LOW=0.5, INFORMATIONAL=0.25). If the initial review falls short, run the qe-devils-advocate agent as a meta-reviewer to find additional observations. Every review should have at least 3 actionable observations.

---

## Agent-Assisted Reviews

```typescript
// Comprehensive code review
await Task("Code Review", {
  prNumber: 123,
  checks: ['security', 'performance', 'testability', 'maintainability'],
  feedbackLevels: ['blocker', 'major', 'minor'],
  autoApprove: { maxBlockers: 0, maxMajor: 2 }
}, "qe-quality-analyzer");

// Security-focused review
await Task("Security Review", {
  prFiles: changedFiles,
  scanTypes: ['injection', 'auth', 'secrets', 'dependencies']
}, "qe-security-scanner");

// Test coverage review
await Task("Coverage Review", {
  prNumber: 123,
  requireNewTests: true,
  minCoverageDelta: 0
}, "qe-coverage-analyzer");
```

---

## Agent Coordination Hints

### Memory Namespace
```
aqe/code-review/
├── review-history/*     - Past review decisions
├── patterns/*           - Common issues by team/repo
├── feedback-templates/* - Reusable feedback
└── metrics/*            - Review turnaround time
```

### Fleet Coordination
```typescript
const reviewFleet = await FleetManager.coordinate({
  strategy: 'code-review',
  agents: [
    'qe-quality-analyzer',    // Logic, maintainability
    'qe-security-scanner',    // Security risks
    'qe-performance-tester',  // Performance issues
    'qe-coverage-analyzer'    // Test coverage
  ],
  topology: 'parallel'
});
```

---

## Review Etiquette

| ✅ Do | ❌ Don't |
|-------|---------|
| "Have you considered...?" | "This is wrong" |
| Explain why it matters | Just say "fix this" |
| Acknowledge good code | Only point out negatives |
| Suggest, don't demand | Be condescending |
| Review < 400 lines | Review 2000 lines at once |

---

## Related Skills
- [agentic-quality-engineering](../agentic-quality-engineering/) - Agent coordination
- [security-testing](../security-testing/) - Security review depth
- [refactoring-patterns](../refactoring-patterns/) - Maintainability patterns

---

## Remember

**Prioritize feedback:** 🔴 Blocker → 🟡 Major → 🟢 Minor → 💡 Suggestion. Focus on bugs and security, not style. Ask questions, don't command. Review < 400 lines at a time. Fast feedback (< 24h) beats thorough feedback.

**With Agents:** Agents automate security, performance, and coverage checks, freeing human reviewers to focus on logic and design. Use agents for consistent, fast initial review.

## Skill Composition

- **Security concerns** → Compose with `/security-testing` for security-focused review
- **Coverage check** → Run `/qe-coverage-analysis` on changed files
- **Ship decision** → Feed review results into `/qe-quality-assessment`

## Gotchas

- Agent reviews >400 lines at once and misses issues — chunk reviews to 200-400 lines maximum
- Nitpicking style while missing logic bugs is the #1 agent review failure — prioritize correctness over formatting
- Agent approves code that compiles but has subtle race conditions — always check shared state and async patterns
- Review comments without suggested fixes are unhelpful — always include a proposed alternative
- Agent doesn't check if the PR actually solves the linked issue — verify the stated problem is actually fixed

© proffesor-for-testing · MIT · proffesor-for-testing/agentic-qe

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

Всё по теме «Код-ревью и рефакторинг» →
code-review-and-quality addyosmani Пять осей проверки и лимиты на размер диффа: скилл держит правки в форме, которую можно отревьюить за один заход. CX Codex +1 73 200установок thermo-nuclear-code-quality-review cursor Строго проверяет поддерживаемость кода, качество абстракций и рост условной логики. Нужен для глубокого аудита изменений и структуры проекта. CX Codex +1 22 200установок code-review agno-team Автоматическая проверка кода на стиль, ошибки и нарушения best practices. Скилл запускает линтер, ищет баги и уязвимости, даёт структурированный feedback с уровнями критичности. CX Codex +1 472установок quality-playbook официальный github Гоняет полный аудит качества по кодовой базе в шесть фаз, каждая в своём окне контекста. Пригодится, когда обычное ревью уже не находит баги. ★ 40 418звёзд репо comprehensive-review Seth Hobson Плагин для Claude, который смотрит на код сразу с трёх точек зрения: архитектура, безопасность и практики разработки. Пригодится перед мержем крупной ветки. CX Codex ★ 41 729звёзд репо ponytail-review DietrichGebert Скилл проверяет изменения глубже обычного diff: читает связанный код, ищет ошибки, риски, проблемы нагрузки и недостающие тесты. Пригодится для ревью PR и коммитов. CX Codex +1 57 000установок

Из того же набора4

Спонсоры проекта

Компании, которые помогают держать аналитику открытой