What it does
/analyze runs a comprehensive review across four domains: code quality, security, performance, and architecture. You can target a specific domain or run all four for a full report. Each finding is reported with a severity level and a specific fix recommendation.
When to use
Use/analyze when you want an objective assessment of your codebase — before a major refactor, after a sprint, when onboarding to an existing codebase, or as a pre-ship checklist. For a focused security review run with --focus security; for a performance investigation use --focus performance.
Prerequisites
- The code you want to analyze is present in the working directory
Conversation mode
Either mode works.What happens
Quality analysis
Code smells, duplication, complexity, maintainability index, dead code, unused imports, and naming conventions are reviewed.
Security analysis
The
security-review skill is loaded for the full OWASP checklist — auth, input handling, secrets exposure, and sensitive data handling.Performance analysis
The
performance-optimization skill is loaded. Performance is measured before analyzing — no recommendations without data.Architecture analysis
The
architecture-design skill is loaded for structural analysis — component relationships, boundaries, coupling, and cohesion.Report findings
Each finding is reported with: domain, severity, location (file:line), description, and a specific fix recommendation.
Skills invoked
security-review— OWASP checklist for security domainperformance-optimization— measurement-first performance analysisarchitecture-design— structural and coupling analysis
Usage
Output format
For each finding:| Field | Description |
|---|---|
| Domain | quality / security / performance / architecture |
| Severity | critical / high / medium / low / info |
| Location | file:line |
| Issue | What’s wrong |
| Recommendation | Specific fix |
Example
security-review skill and reports findings like:
Related commands
/improve
Apply the fixes that /analyze identifies.
/review
Code review against plan compliance — complements /analyze’s technical focus.
/troubleshoot
For issues that /analyze surfaces that require deep debugging.
/design
Address architectural issues that /analyze flags by redesigning the affected components.