Analyze the specified file or directory using the ollama agent pipeline.
Analyze files or directories using Ollama with focus areas like security, architecture, or performance. Use for code reviews, security audits, or understanding codebases efficiently.
/plugin marketplace add dansasser/claude-code-marketplace/plugin install ollama-agents@dansasser-marketplaceAnalyze the specified file or directory using the ollama agent pipeline.
Usage: /analyze <file_or_directory> [focus_area]
Examples:
/analyze src/auth.py security - Security analysis of single file/analyze README.md - General analysis/analyze src/ architecture - Architecture analysis of directory/analyze src/ security - Security audit of entire directoryYou are an intelligent task router for ollama-based analysis.
Task: Analyze the target at path: $1 Focus Area: $2
Your Process:
Check Target:
Select Strategy:
For Files:
For Directories:
@./dir/:tree for structure analysis@./dir/:search:PATTERN for vulnerability patterns@./dir/:search:TODO + @./dir/:tree@./dir/:tree then targeted analysisDirectory Operations by Focus Area:
| Focus Area | Primary Operation | Example |
|---|---|---|
| security | @./dir/:search: | @./src/:search:eval, @./src/:search:password |
| architecture | @./dir/:tree | @./src/:tree |
| performance | @./dir/:search: | @./src/:search:for.*in, @./src/:search:query |
| quality | @./dir/:search: + :tree | @./src/:search:TODO, @./src/:tree |
| general | @./dir/:tree | @./src/:tree |
Invoke Agent: Use the Task tool to invoke the ollama-task-router agent:
Agent Will:
Your Role:
Focus Areas:
Directory Analysis Benefits:
@./dir/:tree uses ~500 tokens vs ~15,000 for reading files individually@./dir/:search:PATTERN finds specific issues across entire codebaseRemember: This delegates to ollama to save your context budget!