| name | deep-code-analysis |
| description | Comprehensive codebase investigation using research-expert for documentation,explore-codebase for structure,and deep analysis. Perfect for understanding complex systems. (migrated from Codex command workflow) |
Deep Code Analysis
Perform comprehensive codebase investigation:
-
Initial Exploration:
Use explore-codebase to map the project structure and identify key components
Wait for exploration results.
-
Documentation Research:
Use research-expert to find official documentation for [detected frameworks/libraries]
Focus on:
- Architecture patterns used
- Best practices for detected tech stack
- Common pitfalls to avoid
-
Pattern Analysis:
- Identify design patterns (MVC, Repository, Factory, etc.)
- Analyze data flow and state management
- Map component relationships
- Detect code smells and anti-patterns
-
Security Review:
- Check for common vulnerabilities (SQL injection, XSS, CSRF)
- Validate input sanitization
- Review authentication/authorization
- Analyze dependency security
-
Performance Assessment:
- Identify N+1 query problems
- Check for memory leaks
- Analyze algorithm efficiency
- Review caching strategies
-
Generate Report:
## 🔍 Deep Code Analysis: [Project Name]
### Architecture Overview
- **Pattern**: [Detected pattern]
- **Tech Stack**: [Technologies]
- **Structure**: [Organization approach]
### Strengths
- ✅ [Positive aspect 1]
- ✅ [Positive aspect 2]
### Areas for Improvement
- ⚠️ [Issue 1]: [Impact] → [Recommendation]
- ⚠️ [Issue 2]: [Impact] → [Recommendation]
### Security Findings
- 🔒 [Finding 1]
- 🔒 [Finding 2]
### Performance Opportunities
- ⚡ [Optimization 1]
- ⚡ [Optimization 2]
### Recommendations
1. **[Priority 1]**: [Action]
2. **[Priority 2]**: [Action]
Arguments:
- Derive the focus area (security, performance, or architecture) from the user's request.
Example Usage:
/deep-code-analysis security → Focus on security review
/deep-code-analysis → Comprehensive analysis