Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add josix/agent-flow/plugin install agent-flowWrote 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.
[](https://agentmods.dev/commands/josix/agent-flow/deep-dive)<a href="https://agentmods.dev/commands/josix/agent-flow/deep-dive"><img src="https://agentmods.dev/badge/commands/josix/agent-flow/deep-dive/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.
<a href="https://agentmods.dev/commands/josix/agent-flow/deep-dive"><img src="https://agentmods.dev/badge/commands/josix/agent-flow/deep-dive.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00013 | $0.03243 |
| Opus 5.5 | $0.00005 | $0.01297 |
| Sonnet 5.5 | $0.00003 | $0.00649 |
| Haiku 4.5 | $0.00001 | $0.00324 |
Grade B, and why
deep-dive scanned grade B with 1 finding 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 1mo 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
head -30 .claude/deep-dive.local.md How it starts
The opening of the file, as written. The whole thing — 354 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Deep-Dive Command
Gather comprehensive codebase context for the current session using parallel exploration agents.
Arguments
--full(default): Full codebase exploration--focus=<path>: Focus exploration on a specific path (e.g.,--focus=src/auth)--refresh: Refresh existing deep-dive context
State Initialization
FIRST: Initialize deep-dive state by running:
# Parse arguments
SCOPE="full"
FOCUS_PATH=""
REFRESH_FLAG=""
# Check for --focus=<path>
if [[ "$ARGUMENTS" == *"--focus="* ]]; then
SCOPE="focused"
FOCUS_PATH=$(echo "$ARGUMENTS" | sed -n 's/.*--focus=\([^ ]*\).*/\1/p')
fi
# Check for --refresh
if [[ "$ARGUMENTS" == *"--refresh"* ]]; then
REFRESH_FLAG="--refresh"
fi
# Initialize deep-dive state
bash ${CLAUDE_PLUGIN_ROOT}/scripts/init-deep-dive.sh \
--scope "$SCOPE" \
${FOCUS_PATH:+--focus-path "$FOCUS_PATH"} \
--agent-count 8 \
$REFRESH_FLAG
This creates .claude/deep-dive.local.md to track exploration progress.
Your Role
You are coordinating a parallel exploration workflow. Fire multiple Riko agents simultaneously to gather codebase context, then synthesize findings with Senku.
CRITICAL BEHAVIORAL CONSTRAINTS:
- Fire ALL exploration agents at once (parallel, not sequential)
- Do NOT wait for one agent before starting the next
- Each agent explores a DIFFERENT aspect of the codebase
- State is written twice: by the init script above, and by
compile-deep-dive.shat the end (which setsphaseand every phase status). There is no per-phase update step in between
Workflow Phases
Phase 1: Parallel Exploration (Fire Immediately)
Fire ALL agents at once using the Agent tool. Do not wait between spawns.
Each Riko agent explores a different aspect:
// Fire all these agents SIMULTANEOUSLY (8 concurrent)
Agent(subagent_type="agent-flow:Riko", prompt="
PROJECT STRUCTURE: Explore directory layout and file organization.
- List top-level directories and their purposes
- Identify monorepo vs single package
- Find entry points (main files, index files)
- Report: directory structure overview
Graph hint: run mcp__plugin_agent-flow_graphify__graph_stats then god_nodes(top_n=10) first; fall back to Grep only for literal text.
")
Agent(subagent_type="agent-flow:Riko", prompt="
CONVENTIONS: Find coding standards and patterns.
- Check config files (.eslintrc, .prettierrc, tsconfig.json, pyproject.toml)
- Look for .editorconfig, style guides
- Find naming conventions from existing code
- Report: coding conventions list
Graph hint: grep is correct here — conventions are literal-text patterns.
")
Agent(subagent_type="agent-flow:Riko", prompt="
ANTI-PATTERNS: Find forbidden patterns and warnings.
- Search for 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED', 'TODO', 'FIXME'
- Check for documented anti-patterns in README, CONTRIBUTING
- Look for lint rule comments indicating forbidden patterns
- Report: anti-patterns list with sources
Graph hint: grep is correct here — anti-patterns are literal-text patterns.
")
Agent(subagent_type="agent-flow:Riko", prompt="
BUILD AND CI: Understand build system and automation.
- Find package.json scripts, Makefile, build configs
- Check .github/workflows, CI configurations
- Identify test framework and test locations
- Report: build commands and CI pipeline
Graph hint: grep/read is correct here — build config is literal-file inspection.
")
Agent(subagent_type="agent-flow:Riko", prompt="
ARCHITECTURE: Map key components and dependencies.
- Identify core modules and their relationships
- Find dependency injection, service patterns
- Map data flow between components
- Report: architecture overview with component map
Graph hint: prefer mcp__plugin_agent-flow_graphify__god_nodes and get_neighbors over Grep for cross-module relationships.
")
Agent(subagent_type="agent-flow:Riko", prompt="
TESTING: Understand test structure and patterns.
- Find test directories and naming conventions
- Identify test framework (jest, pytest, etc.)
- Look for test utilities, fixtures, mocks
- Report: testing patterns and locations
Graph hint: use mcp__plugin_agent-flow_graphify__get_community on a test-file node to surface sibling tests; Grep for specific assertions only.
")
Agent(subagent_type="agent-flow:Riko", prompt="
PURPOSE & USE CASES: What this project (or focus path) is and why it exists.
- State what it is in 1-2 plain sentences
- Which problems it solves and for whom
- Main use cases and adoption modes (library / CLI / service / plugin), and how a user invokes each
- Which design decisions address those problems, and why. Cite rationale from docs, comments, ADRs, or commit messages
- Mark any claim whose only source is the README or marketing copy as 'per README (unverified)'
- Sources: README, docs/, examples/, CLI --help/usage text, package metadata, design docs
Graph hint: grep/read is correct here, since this is prose, not structure.
")
Agent(subagent_type="agent-flow:Riko", prompt="
KEY FLOWS: Trace 2-3 representative end-to-end flows.
- Trace the primary user action, plus one error or edge path
- Write each flow as a numbered list of file:line — what happens hops (5-10 hops), from entry point to side effect or output
- Read every hop to confirm it before reporting it
- Note where errors are raised, retried, swallowed, or time out, and any fragile spots (global state, caches, ordering assumptions)
Graph hint: use shortest_path / get_neighbors to find hops, then Read to confirm each one.
")
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.
- 1mo ago Changed 19589a2231cc
- 2mo ago Changed · +53 lines f207098d8678
- 3mo ago First seen · 301 lines · 13 tokens per session scan B 270122de643f
deep-dive is a command published in the GitHub repository josix/agent-flow (8 stars, last pushed 12d ago), licensed MIT. It adds 13 tokens to every session and 3,243 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
deep-dive compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| deep-divejosix/agent-flow | Command | 8 | 12d ago | MIT | B | 13 | Claude Code |
| security-scanaffaan-m/ECC | Command | 314k | yesterday | MIT | A | 16 | Claude Code, OpenCode |
| helpSmart-AI-Memory/attune-ai | Command | 12 | today | Apache-2.0 | A | 9 | Claude Code |
| t00-statusmaysunAI/T00-zh | Command | 2 | 4mo ago | MIT | A | 28 | Claude Code |
| story-deslopXiaoyangy/novel-studio | Command | 170 | 2mo ago | Apache-2.0 | A | 24 | Claude Code |
| checklistgithub/spec-kit | Command | 153k | today | MIT | A | 13 | Claude Code |
| clarifygithub/spec-kit | Command | 153k | today | MIT | A | 27 | Claude Code |