analyze

analyze is a command for Claude Code 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 for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

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

Good fit Use it for general code review, security checks, architecture reviews, and finding quality issues such as TODO markers.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/dansasser/claude-code-marketplace/analyze
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.

Clone the repo
git clone --depth 1 https://github.com/dansasser/claude-code-marketplace

Made for: Claude Code.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analyze

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00767
Opus 5.5 $0.00000 $0.00307
Sonnet 5.5 $0.00000 $0.00153
Haiku 4.5 $0.00000 $0.00077

Measured 2mo ago against content hash fd0238a6176c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 6mo 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.

Related

analyze compared with commands from other repositories

analyze next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
analyzedansasser/claude-code-marketplaceCommand96mo agoMITA0Claude Code
checklistgithub/spec-kitCommand149ktodayMITA13Claude Code
clarifygithub/spec-kitCommand149ktodayMITA27Claude Code
specifygithub/spec-kitCommand149ktodayMITA13Claude Code
convergegithub/spec-kitCommand149ktodayMITA35Claude Code
implementgithub/spec-kitCommand149ktodayMITA14Claude Code
speckit.bug.fixgithub/spec-kitCommand149ktodayMITA12Claude Code