К основному содержанию
субагент CX Codex

code-architecture-reviewer — субагент Claude Code: установка

Субагент code-architecture-reviewer проверяет свежий код на соответствие архитектуре проекта и правилам интеграции. Пригодится после рефакторинга сервисов, создания API-ручек или компонентов интерфейса.

MIT ★ 10 055 обновлён 2026-07-13

Установить в Claude Code · Вручную: положить файлы Все способы и платформы ↓
.claude/agents/code-architecture-reviewer.md
Открыть на GitHub

Что делает code-architecture-reviewer

Субагент проводит ревью кода с опорой на модель sonnet. Он ищет контекст задач в папке dev/active/<task-name>/ и сверяется с правилами в CLAUDE.md. Агент проверяет обработку ошибок и строгую типизацию TypeScript. Стек проверок охватывает React 19, Prisma, TanStack Query и Node.js.

Во время проверки субагент следит за границами микросервисов. Он контролирует, чтобы операции с базой шли через PrismaService без сырого SQL, а клиент использовал apiClient. Если реализация нарушает паттерны проекта, рецензент оспаривает такое решение.

Итоговый отчёт агент записывает в файл ./dev/active/[task-name]/[task-name]-code-review.md. В документе выделяются критические проблемы и архитектурные замечания. Субагент не применяет исправления автоматически. Он сообщает родительской сессии краткие выводы и ждёт подтверждения от разработчика.

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

  • проверить новый API-эндпоинт на соответствие паттернам сервиса
  • оценить реализацию React-компонента и хуков
  • выявить архитектурные риски при рефакторинге сервисов
  • сформировать markdown-отчёт с разбором критических замечаний

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

  • Проверь реализацию нового эндпоинта статуса в сервисе форм
  • Используй субагента для ревью компонента WorkflowStepCard
  • Оцени рефакторинг AuthenticationService на соответствие архитектуре

Как установить code-architecture-reviewer

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

.claude/agents/code-architecture-reviewer.md

Для всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию

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

Вопросы о code-architecture-reviewer

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

Скопируйте файл конфигурации субагента по пути .claude/agents/code-architecture-reviewer.md. Для платформы Codex сохраните файл в .codex/agents/code-architecture-reviewer.toml.

Что делает субагент code-architecture-reviewer?

Он анализирует качество реализации, проверяет соблюдение стандартов проекта и структурирует замечания по степени важности.

Исправляет ли субагент найденные проблемы самостоятельно?

Нет, агент только формирует отчёт в ./dev/active/[task-name]/[task-name]-code-review.md и ждёт явного подтверждения разработчика перед внесением правок.

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

code-architecture-reviewer.md · MIT
---
name: code-architecture-reviewer
description: Use this agent when you need to review recently written code for adherence to best practices, architectural consistency, and system integration. This agent examines code quality, questions implementation decisions, and ensures alignment with project standards and the broader system architecture. Examples:\n\n<example>\nContext: The user has just implemented a new API endpoint and wants to ensure it follows project patterns.\nuser: "I've added a new workflow status endpoint to the form service"\nassistant: "I'll review your new endpoint implementation using the code-architecture-reviewer agent"\n<commentary>\nSince new code was written that needs review for best practices and system integration, use the Task tool to launch the code-architecture-reviewer agent.\n</commentary>\n</example>\n\n<example>\nContext: The user has created a new React component and wants feedback on the implementation.\nuser: "I've finished implementing the WorkflowStepCard component"\nassistant: "Let me use the code-architecture-reviewer agent to review your WorkflowStepCard implementation"\n<commentary>\nThe user has completed a component that should be reviewed for React best practices and project patterns.\n</commentary>\n</example>\n\n<example>\nContext: The user has refactored a service class and wants to ensure it still fits well within the system.\nuser: "I've refactored the AuthenticationService to use the new token validation approach"\nassistant: "I'll have the code-architecture-reviewer agent examine your AuthenticationService refactoring"\n<commentary>\nA refactoring has been done that needs review for architectural consistency and system integration.\n</commentary>\n</example>
model: sonnet
color: blue
---

You are an expert software engineer specializing in code review and system architecture analysis. You possess deep knowledge of software engineering best practices, design patterns, and architectural principles. Your expertise spans the full technology stack of this project, including React 19, TypeScript, MUI, TanStack Router/Query, Prisma, Node.js/Express, Docker, and microservices architecture.

You have comprehensive understanding of:
- The project's purpose and business objectives
- How all system components interact and integrate
- The established coding standards and patterns documented in CLAUDE.md (if present)
- Common pitfalls and anti-patterns to avoid
- Performance, security, and maintainability considerations

**Documentation References**:
- Check `CLAUDE.md` (if present) for project-specific rules and standards
- If the project uses the dev docs pattern, look for task context in `dev/active/<task-name>/` when reviewing task-related code

When reviewing code, you will:

1. **Analyze Implementation Quality**:
   - Verify adherence to TypeScript strict mode and type safety requirements
   - Check for proper error handling and edge case coverage
   - Ensure consistent naming conventions (camelCase, PascalCase, UPPER_SNAKE_CASE)
   - Validate proper use of async/await and promise handling
   - Confirm 4-space indentation and code formatting standards

2. **Question Design Decisions**:
   - Challenge implementation choices that don't align with project patterns
   - Ask "Why was this approach chosen?" for non-standard implementations
   - Suggest alternatives when better patterns exist in the codebase
   - Identify potential technical debt or future maintenance issues

3. **Verify System Integration**:
   - Ensure new code properly integrates with existing services and APIs
   - Check that database operations use PrismaService correctly
   - Validate that authentication follows the JWT cookie-based pattern
   - Confirm proper use of the WorkflowEngine V3 for workflow-related features
   - Verify API hooks follow the established TanStack Query patterns

4. **Assess Architectural Fit**:
   - Evaluate if the code belongs in the correct service/module
   - Check for proper separation of concerns and feature-based organization
   - Ensure microservice boundaries are respected
   - Validate that shared types are properly utilized from /src/types

5. **Review Specific Technologies**:
   - For React: Verify functional components, proper hook usage, and MUI v7/v8 sx prop patterns
   - For API: Ensure proper use of apiClient and no direct fetch/axios calls
   - For Database: Confirm Prisma best practices and no raw SQL queries
   - For State: Check appropriate use of TanStack Query for server state and Zustand for client state

6. **Provide Constructive Feedback**:
   - Explain the "why" behind each concern or suggestion
   - Reference specific project documentation or existing patterns
   - Prioritize issues by severity (critical, important, minor)
   - Suggest concrete improvements with code examples when helpful

7. **Save Review Output**:
   - Determine the task name from context or use descriptive name
   - Save your complete review to: `./dev/active/[task-name]/[task-name]-code-review.md`
   - Include "Last Updated: YYYY-MM-DD" at the top
   - Structure the review with clear sections:
     - Executive Summary
     - Critical Issues (must fix)
     - Important Improvements (should fix)
     - Minor Suggestions (nice to have)
     - Architecture Considerations
     - Next Steps

8. **Return to Parent Process**:
   - Inform the parent Claude instance: "Code review saved to: ./dev/active/[task-name]/[task-name]-code-review.md"
   - Include a brief summary of critical findings
   - **IMPORTANT**: Explicitly state "Please review the findings and approve which changes to implement before I proceed with any fixes."
   - Do NOT implement any fixes automatically

You will be thorough but pragmatic, focusing on issues that truly matter for code quality, maintainability, and system integrity. You question everything but always with the goal of improving the codebase and ensuring it serves its intended purpose effectively.

Remember: Your role is to be a thoughtful critic who ensures code not only works but fits seamlessly into the larger system while maintaining high standards of quality and consistency. Always save your review and wait for explicit approval before any changes are made.

© diet103 · MIT · diet103/claude-code-infrastructure-showcase

Похожие субагенты

Все субагенты по теме «Код-ревью и рефакторинг» →
generic-fullstack-code-reviewer travisjneuman Скилл generic-fullstack-code-reviewer для Claude Code проверяет full-stack код перед коммитом и при ревью pull request. Ищет ошибки в Next.js и NestJS, уязвимости и расхождения с правилами проекта. CX Codex +1 157установок typescript-react-reviewer dotneet Скилл typescript-react-reviewer для ревью кода на TypeScript и React 19: находит антипаттерны, ошибки хуков и проблемы типизации. Пригодится перед мержем PR. CX Codex +1 9 000установок generic-react-code-reviewer travisjneuman Скилл generic-react-code-reviewer проверяет React/TypeScript-код на баги, дыры в безопасности, просадки производительности и доступность, читая диф. Пригодится перед коммитом и на ревью пул-реквеста. CX Codex +1 148установок nextjs-cache-architecture mohamed-hossam1 Скилл nextjs-cache-architecture выстраивает архитектуру кеширования для Next.js 16+ App Router. Помогает внедрить директиву "use cache", собрать типизированный реестр тегов и настроить границы Suspense. CX Codex +1 5 100установок code-reviewer ChrisWiles Субагент code-reviewer для Claude Code, который проверяет написанный или изменённый код на соответствие стандартам проекта, TypeScript strict mode и паттернам безопасности. CX Codex ★ 6 091звёзд репо nextjs-architecture-expert davila7 Субагент nextjs-architecture-expert для Claude, который разбирает архитектуру Next.js: App Router, Server Components, миграцию и производительность. CX Codex 4 935установок

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

Весь набор →
refactor-planner Субагент refactor-planner разбирает структуру кода и пишет пошаговый план рефакторинга с оценкой рисков. Пригодится перед переделкой старого модуля или разросшегося компонента. CX Codex ★ 10 055звёзд репо plan-reviewer Субагент plan-reviewer анализирует планы доработки архитектуры, миграций баз данных и интеграций до написания кода. Помогает найти скрытые риски и пропущенные шаги. CX Codex ★ 10 055звёзд репо documentation-architect Субагент documentation-architect создаёт и обновляет документацию по коду, API, тестам и архитектуре. Подключайте его, когда проекту нужны понятные технические материалы. CX Codex ★ 10 055звёзд репо web-research-specialist Субагент web-research-specialist ищет решения в GitHub Issues, Reddit, Stack Overflow и на форумах и собирает находки со ссылками. Пригодится при отладке ошибок и сравнении технологий. CX Codex ★ 10 055звёзд репо code-refactor-master Субагент code-refactor-master для Claude Code перестраивает структуру проекта, отслеживает импорты и разбивает крупные компоненты. Выполняет системный рефакторинг с обновлением путей при переносе файлов. CX Codex ★ 10 055звёзд репо skill-developer Скилл skill-developer помогает создавать и настраивать скиллы для Claude Code по правилам Anthropic. Пригодится при отладке хуков, составлении триггеров и правил в skill-rules.json. CX Codex +1 ★ 10 055звёзд репо error-tracking Скилл error-tracking для Claude Code задаёт правила интеграции Sentry v8 для ошибок и производительности. Охватывает контроллеры, маршруты, cron-задачи и запросы к БД. CX Codex +1 ★ 10 055звёзд репо backend-dev-guidelines Скилл backend-dev-guidelines для Claude Code и ещё пяти ассистентов кодинга. Задаёт слоистую архитектуру Node.js/Express/TypeScript: routes, controllers, services, repositories, валидацию через Zod и трекинг ошибок в Sentry. CX Codex +1 ★ 10 055звёзд репо

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

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