Agent skill
analyze
Deep analysis mode - thorough multi-phase investigation with expert consultation
Install this agent skill to your Project
npx add-skill https://github.com/thoreinstein/opencode-config/tree/main/skill/analyze
SKILL.md
DEEP ANALYSIS MODE
Current Time: !date
Perform a comprehensive analysis using multi-phase expert consultation and parallel research.
Analysis Protocol
Phase 1: Reconnaissance (Parallel Swarm)
Launch immediately:
background_task(agent="explore", prompt="Map relevant code structure...")
background_task(agent="explore", prompt="Find related patterns...")
background_task(agent="librarian", prompt="Research best practices for...")
While swarm runs, use direct tools:
globto find relevant filesgrepto identify patternsreadto understand key code
Phase 2: Expert Analysis
Based on findings, consult specialists:
| Domain | Agent | Focus |
|---|---|---|
| Architecture | @architect |
System design, data flow, dependencies |
| Security | @security |
Vulnerabilities, threat model, risks |
| Reliability | @sre |
Scalability, SLOs, observability |
| Performance | @perf |
Profiling, bottlenecks, optimization |
| Patterns | @principal |
Code quality, best practices, tradeoffs |
Phase 3: Deep Dive
Analyze comprehensively:
- Edge cases and potential failure modes
- Performance implications under load
- Security attack surface
- Error handling completeness
- Testability and maintainability
- Technical debt assessment
Phase 4: Synthesis
Combine findings into actionable output:
## Executive Summary
[2-3 sentences: key findings and recommendation]
## Detailed Analysis
### Architecture
[Component analysis, data flow, dependencies]
### Code Quality
[Patterns, anti-patterns, maintainability]
### Security
[Vulnerabilities, risks, compliance]
### Performance
[Bottlenecks, scalability concerns]
## Issues Found
### Critical (P0)
- [Issue with location and impact]
### High (P1)
- [Issue]
### Medium (P2)
- [Issue]
## Recommendations
### Immediate Actions
1. [Action with rationale]
### Short-term Improvements
1. [Improvement]
### Long-term Considerations
1. [Consideration]
## Trade-offs
[Analysis of different approaches with pros/cons]
Analysis Focus Areas
| Area | What to Examine |
|---|---|
| Correctness | Logic errors, edge cases, assumptions |
| Security | Input validation, auth, data protection |
| Performance | Complexity, caching, resource usage |
| Reliability | Error handling, failure modes, recovery |
| Maintainability | Readability, coupling, documentation |
| Testability | Coverage, mocking, isolation |
Output
Write to Obsidian via obsidian_append_content at:
$OBSIDIAN_PATH/Analysis/YYYY-MM-DD-target.md
Note:
$OBSIDIAN_PATHmust be a vault-relative path (e.g.,Projects/myapp), set per-project via direnv. Theobsidian_append_contenttool expects paths relative to the vault root.
Document Structure
Use this template for the Obsidian document:
@~/.config/opencode/templates/analysis-report.md
Analyze
$ARGUMENTS
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
seo
Implement SEO optimizations for specified pages or entire site
runbook
Generate operational runbooks for services, procedures, or incident response
file-organizer
Intelligently organizes your files and folders across your computer by understanding context, finding duplicates, suggesting better structures, and automating cleanup tasks. Reduces cognitive load and keeps your digital workspace tidy without manual effort.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
ultrathink
Ultra-deep multi-perspective analysis for complex architectural and strategic decisions
commit
Analyze unstaged changes and suggest atomic commit groups with messages
Didn't find tool you were looking for?