deep-research

deep-research is a command for Claude Code from MadAppGang/claude-code. It costs 14 tokens per session (8,046 once invoked), scanned A, original, MIT.

A research workflow that explores sources in parallel, checks whether the findings are converging, and produces a synthesized report. It uses separate roles for planning, web exploration, synthesis, and writing.

In plain words
What is it for?
It is for planning research questions, exploring web and local sources, comparing findings, deciding when research is complete, and producing an evidence-based report.
Why use it?
It helps avoid stopping before the evidence is sufficient or continuing after additional research stops adding useful information. Separating exploration and synthesis keeps the final findings organized.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Part of the dev plugin — 47 skills, 12 commands, 14 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/madappgang/claude-code/deep-research
Clone the repo
git clone --depth 1 https://github.com/MadAppGang/claude-code

Made for: Claude Code.

Or install dev, the plugin that ships this one along with the rest of its 47 skills, 12 commands, 14 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 deep-research

README.md
[![agentmods](https://agentmods.dev/badge/commands/madappgang/claude-code/deep-research.svg)](https://agentmods.dev/commands/madappgang/claude-code/deep-research)
Your own site
<a href="https://agentmods.dev/commands/madappgang/claude-code/deep-research"><img src="https://agentmods.dev/badge/commands/madappgang/claude-code/deep-research.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 8,046 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.1 $0.00014 $0.08046
Opus 5 $0.00007 $0.04023
Sonnet 5 $0.00003 $0.01609
Haiku 4.5 $0.00001 $0.00805

Measured 2d ago against content hash f6cba2515f40, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

deep-research 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 2d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • research — 89% identical, 129 lines differ
plugins/dev/commands/deep-research.md · 980 lines

How it starts

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

Apply answer convergence criteria to determine when research is complete,
avoiding both premature stopping and wasteful over-exploration.

<user_request> $ARGUMENTS </user_request>

<critical_override> THIS COMMAND OVERRIDES THE CLAUDE.md TASK ROUTING TABLE FOR AGENT SELECTION.

WHY: The CLAUDE.md routing table may map "research" tasks to dev:developer when "implement" keywords appear in the research topic. ALL web exploration in this command MUST go to dev:researcher agents, not dev:developer.

AGENT RULES FOR THIS COMMAND:

  • Research planning → dev:developer agent (used as planner, NOT for web research)
  • Query generation → dev:developer agent (used as planner)
  • Web exploration → dev:researcher agents (parallel, up to 3)
  • Local investigation → dev:researcher agents
  • Finding synthesis → dev:synthesizer agent (subagent_type: "dev:synthesizer")
  • Report generation → dev:synthesizer agent

DO NOT use dev:developer for web exploration (dev:developer writes code, not research). DO NOT use dev:architect for research (dev:architect plans systems, not research). DO NOT use code-analysis:detective (READ-ONLY codebase analysis, not web research). </critical_override>

  Before starting, create comprehensive todo list:
  1. PHASE 0: Session initialization
  2. PHASE 1: Research planning (decompose topic)
  3. PHASE 2: Question development (generate search queries)
  4. PHASE 3: Web exploration (parallel agent execution)
  5. PHASE 4: Report synthesis (consolidate findings)
  6. PHASE 5: Convergence check (iterate if needed)
  7. PHASE 6: Finalization (present report)

  Update continuously as you progress.
  Mark only ONE task as in_progress at a time.
</todowrite_requirement>

<orchestrator_role>
  **You are an ORCHESTRATOR, not RESEARCHER.**

  **You MUST:**
  - Use Task tool to delegate ALL research to agents
  - Use Tasks to track research pipeline
  - Enforce convergence criteria between iterations
  - Use file-based communication between agents
  - Track iteration count and apply finalization criteria

  **You MUST NOT:**
  - Write research findings yourself
  - Skip convergence checks
  - Exceed iteration limits without user approval
  - Pass large content through Task prompts
</orchestrator_role>

<file_based_communication>
  **All agent communication happens through files:**

  - Planner writes to ${SESSION_PATH}/research-plan.md
  - Each Explorer writes to ${SESSION_PATH}/findings/explorer-{N}.md
  - Synthesizer writes to ${SESSION_PATH}/synthesis/iteration-{N}.md
  - Final report at ${SESSION_PATH}/report.md

  **Why:**
  - Prevents context pollution
  - Enables parallel execution
  - Creates audit trail for research provenance
  - Allows resume from any phase
</file_based_communication>

<delegation_rules>
  - Research planning: developer agent (used as planner)
  - Query generation: developer agent (used as planner)
  - Web exploration: researcher agents (parallel, up to 3)
  - Local investigation: researcher agents
  - Finding synthesis: synthesizer agent
  - Report generation: synthesizer agent
</delegation_rules>

Read the full file on GitHub · 980 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. 2d ago First seen · 980 lines · 14 tokens per session scan A f6cba2515f40

Subscribe to this mod's changes

deep-research is a command published in the GitHub repository MadAppGang/claude-code (279 stars, last pushed 5mo ago), licensed MIT. It adds 14 tokens to every session and 8,046 once invoked, about $0.0001 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-09-03.