analyze — команда для Claude Code: анализ кода и установка
Команда analyze проверяет код по качеству, безопасности, производительности и архитектуре. Подходит для ревью проекта или отдельной папки.
MIT ★ 23 950 обновлён 2026-09-27
.claude/commands/analyze.mdЧто делает analyze
Слэш-команда /sc:analyze находит исходные файлы, определяет языки и изучает структуру проекта. Затем она ищет проблемы в выбранных доменах, оценивает серьёзность и влияние находок, а после формирует рекомендации с планом улучшений.
Можно анализировать весь проект или конкретную папку. Фокус задаётся через --focus: quality, security, performance или architecture; глубина — через --depth quick|deep, формат результата — через --format text|json|report. Для поиска и чтения файлов команда использует Glob, Grep и Read, а для внешних проверок — Bash; отчёты и метрики записывает через Write.
Команда не запускает динамический анализ, которому нужны компиляция или работа приложения, не меняет исходники без согласия и не проверяет внешние зависимости глубже импортов и способов использования.
Какие задачи решает
- проверить качество кода в проекте
- найти уязвимости в модуле авторизации
- выявить узкие места производительности
- оценить архитектуру и технический долг
- составить план исправлений по приоритетам
Примеры запросов агенту
- Запусти
/sc:analyzeдля полной проверки проекта и подготовь отчёт. - Проведи глубокий анализ безопасности для
src/authс помощью/sc:analyze src/auth --focus security --depth deep. - Проверь качество компонентов через
/sc:analyze src/components --focus quality --depth quick.
Как установить analyze
Вручную: положить файлы
.claude/commands/analyze.mdВызов — /analyze. Для всех проектов — ~/.claude/commands/
Вручную: положить файлы
~/.codex/prompts/analyze.mdВызов — /prompts:analyze. В Codex этот формат помечен устаревшим, замена — скиллы
Вручную: положить файлы
.github/prompts/analyze.prompt.mdВручную: положить файлы
.gemini/commands/analyze.tomlGemini хранит команды в TOML: текст запроса — в поле prompt
Вопросы об analyze
Как установить analyze в Claude Code?
Разместите файл команды analyze.md по пути .claude/commands/analyze.md.
Что делает analyze?
Команда проверяет код по качеству, безопасности, производительности и архитектуре, а затем выдаёт находки с приоритетами и рекомендациями.
Может ли analyze исправить найденные проблемы?
Нет. Команда не меняет исходный код без явного согласия пользователя. Для применения рекомендаций предусмотрена команда /sc:improve.
Исходный текст
analyze.md · MIT
--- name: analyze description: "Comprehensive code analysis across quality, security, performance, and architecture domains" category: utility complexity: basic mcp-servers: [] personas: [] --- # /sc:analyze - Code Analysis and Quality Assessment ## Triggers - Code quality assessment requests for projects or specific components - Security vulnerability scanning and compliance validation needs - Performance bottleneck identification and optimization planning - Architecture review and technical debt assessment requirements ## Usage ``` /sc:analyze [target] [--focus quality|security|performance|architecture] [--depth quick|deep] [--format text|json|report] ``` ## Behavioral Flow 1. **Discover**: Categorize source files using language detection and project analysis 2. **Scan**: Apply domain-specific analysis techniques and pattern matching 3. **Evaluate**: Generate prioritized findings with severity ratings and impact assessment 4. **Recommend**: Create actionable recommendations with implementation guidance 5. **Report**: Present comprehensive analysis with metrics and improvement roadmap Key behaviors: - Multi-domain analysis combining static analysis and heuristic evaluation - Intelligent file discovery and language-specific pattern recognition - Severity-based prioritization of findings and recommendations - Comprehensive reporting with metrics, trends, and actionable insights ## Tool Coordination - **Glob**: File discovery and project structure analysis - **Grep**: Pattern analysis and code search operations - **Read**: Source code inspection and configuration analysis - **Bash**: External analysis tool execution and validation - **Write**: Report generation and metrics documentation ## Key Patterns - **Domain Analysis**: Quality/Security/Performance/Architecture → specialized assessment - **Pattern Recognition**: Language detection → appropriate analysis techniques - **Severity Assessment**: Issue classification → prioritized recommendations - **Report Generation**: Analysis results → structured documentation ## Examples ### Comprehensive Project Analysis ``` /sc:analyze # Multi-domain analysis of entire project # Generates comprehensive report with key findings and roadmap ``` ### Focused Security Assessment ``` /sc:analyze src/auth --focus security --depth deep # Deep security analysis of authentication components # Vulnerability assessment with detailed remediation guidance ``` ### Performance Optimization Analysis ``` /sc:analyze --focus performance --format report # Performance bottleneck identification # Generates HTML report with optimization recommendations ``` ### Quick Quality Check ``` /sc:analyze src/components --focus quality --depth quick # Rapid quality assessment of component directory # Identifies code smells and maintainability issues ``` ## Boundaries **Will:** - Perform comprehensive static code analysis across multiple domains - Generate severity-rated findings with actionable recommendations - Provide detailed reports with metrics and improvement guidance **Will Not:** - Execute dynamic analysis requiring code compilation or runtime - Modify source code or apply fixes without explicit user consent - Analyze external dependencies beyond import and usage patterns **Output**: Analysis report containing: - Severity-rated findings - Code quality metrics - Security vulnerabilities - Performance issues - Recommendations **Next Step**: After review, use `/sc:improve` to apply recommended fixes or `/sc:cleanup` for dead code removal.
© SuperClaude-Org · MIT · SuperClaude-Org/SuperClaude_Framework