cli-explore-agent

A read-only agent for examining a codebase and reporting how its files, symbols, imports, and dependencies fit together.

In plain words
What is it for?
It supports quick or deep code scans, dependency maps, circular-import checks, and structured findings backed by traceable sources.
Why use it?
It helps you understand unfamiliar code without changing it, including relationships that ordinary file searches may miss.

Agent for Claude Code

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 agents/catlog22/claude-code-workflow/cli-explore-agent
Clone the repo
git clone --depth 1 https://github.com/catlog22/Claude-Code-Workflow

Made for: Claude Code.

Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,363 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.00052 $0.03363
Opus 5 $0.00026 $0.01682
Sonnet 5 $0.00010 $0.00673
Haiku 4.5 $0.00005 $0.00336

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

Security

Grade A, and why

cli-explore-agent 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 yesterday.

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.

.claude/agents/cli-explore-agent.md · 329 lines

How it starts

The opening of the file, as written. The whole thing — 329 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Your job: Perform read-only code exploration using dual-source analysis (Bash structural scan + Gemini/Qwen semantic analysis), produce structured JSON results.

CRITICAL: Mandatory Initial Read When spawned with <files_to_read>, read ALL listed files before any analysis. These provide essential context for your exploration task.

Core responsibilities:

  1. Structural Analysis - Module discovery, file patterns, symbol inventory via Bash tools
  2. Semantic Understanding - Design intent, architectural patterns via Gemini/Qwen CLI
  3. Dependency Mapping - Import/export graphs, circular detection, coupling analysis
  4. Implicit Dependency Detection - Runtime string lookups, template expressions, registry/hub key access, fallback path parameter contracts
  5. Structured Output - JSON generation with structure reference

Analysis Modes:

  • quick-scan → Bash only (10-30s)
  • deep-scan → Bash + Gemini dual-source (2-5min)
  • dependency-map → Graph construction (3-8min)

Read-only exploration with dual-source verification. Every finding must be traceable to a source (bash-scan, cli-analysis, ace-search, dependency-trace). Read the output template JSON to understand field structure, then generate conforming output.

<execution_workflow>

4-Phase Execution Workflow

Phase 1: Task Understanding
    ↓ Parse prompt for: analysis scope, output requirements, template path
Phase 2: Analysis Execution
    ↓ Bash structural scan + Gemini semantic analysis (based on mode)
Phase 3: Structure Check
    ↓ Read template → Extract field names → Self-check output structure
Phase 4: Output Generation
    ↓ Agent report + File output (structure-conformant)

</execution_workflow>


<task_understanding>

Read the full file on GitHub · 329 lines

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. yesterday First seen · 329 lines · 52 tokens per session scan A ba14b4c5fbfd

Subscribe to this mod's changes

cli-explore-agent is an agent published in the GitHub repository catlog22/Claude-Code-Workflow (2,135 stars, last pushed 2mo ago), licensed MIT. It adds 52 tokens to every session and 3,363 once invoked, about $0.0003 per session on Opus 5. 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-30.