analyze

analyze is a command for coding agents from dansasser/claude-code-marketplace. It costs 0 tokens per session (767 once invoked), scanned A, original, MIT.

A command that sends a file or directory to an Ollama-based analysis process, optionally focused on an area such as security or architecture.

In plain words
What is it for?
Use it for general code review, security checks, architecture reviews, and finding quality issues such as TODO markers.
Why use it?
It helps review code without manually choosing how to inspect small files, large files, or whole directories.

Command

Part of the ollama-agents plugin — 5 commands, 3 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/dansasser/claude-code-marketplace/analyze
Clone the repo
git clone --depth 1 https://github.com/dansasser/claude-code-marketplace

Or install ollama-agents, the plugin that ships this one along with the rest of its 5 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyze

README.md
[![agentmods](https://agentmods.dev/badge/commands/dansasser/claude-code-marketplace/analyze.svg)](https://agentmods.dev/commands/dansasser/claude-code-marketplace/analyze)
Your own site
<a href="https://agentmods.dev/commands/dansasser/claude-code-marketplace/analyze"><img src="https://agentmods.dev/badge/commands/dansasser/claude-code-marketplace/analyze.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 767 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00767
Opus 5 $0.00000 $0.00383
Sonnet 5 $0.00000 $0.00153
Haiku 4.5 $0.00000 $0.00077

Measured 4d ago against content hash fd0238a6176c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

analyze scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/claude-ollama-agents/commands/analyze.md · 83 lines

What it actually says

Analyze File or Directory with Ollama

Analyze 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 directory

You are an intelligent task router for ollama-based analysis.

Task: Analyze the target at path: $1 Focus Area: $2

Your Process:

  1. Check Target:

    • Determine if target is file or directory
    • For files: Get size and estimate tokens
    • For directories: Use directory operations for efficiency
  2. Select Strategy:

    For Files:

    • Small files (< 20KB): Direct ollama-prompt
    • Large files (> 20KB): Use ollama-chunked-analyzer approach

    For Directories:

    • Architecture focus: Use @./dir/:tree for structure analysis
    • Security focus: Use @./dir/:search:PATTERN for vulnerability patterns
    • Quality focus: Use @./dir/:search:TODO + @./dir/:tree
    • General: Use @./dir/:tree then targeted analysis
  3. Directory 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
  4. Invoke Agent: Use the Task tool to invoke the ollama-task-router agent:

    • Pass the target path: $1
    • Pass the focus area: $2
    • Agent uses appropriate directory operations
    • Agent handles model selection and execution
  5. Agent Will:

    • Detect if target is file or directory
    • Select appropriate model (kimi-k2-thinking, deepseek, qwen3-vl)
    • Use directory operations for directories
    • Route to chunked analyzer if needed
    • Execute analysis with ollama-prompt
    • Return synthesized results
  6. Your Role:

    • Receive agent's analysis report
    • Present findings to user concisely
    • Highlight critical issues
    • Provide actionable recommendations

Focus Areas:

  • security: Vulnerabilities, attack vectors, security best practices
  • architecture: Design patterns, scalability, maintainability
  • performance: Bottlenecks, optimization opportunities
  • quality: Code quality, best practices, refactoring needs
  • general: Comprehensive overview

Directory Analysis Benefits:

  • @./dir/:tree uses ~500 tokens vs ~15,000 for reading files individually
  • @./dir/:search:PATTERN finds specific issues across entire codebase
  • More efficient and comprehensive than file-by-file analysis

Remember: This delegates to ollama to save your context budget!

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 83 lines · 0 tokens per session scan A fd0238a6176c

Subscribe to this mod's changes

analyze is a command published in the GitHub repository dansasser/claude-code-marketplace (9 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 767 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.