ADK-search-loop

ADK-search-loop is a command for Claude Code from PedroGiudice/lex-vector. It costs 0 tokens per session (867 once invoked), scanned A, original, MIT.

An iterative research command that searches a topic in several rounds, checks what information is missing, and refines its searches before writing a report.

In plain words
What is it for?
Use it for broad research that needs topic breakdown, multiple search passes, gap analysis, query refinement, and a final synthesis.
Why use it?
A single search can miss important parts of a topic; repeated searches help uncover gaps and add sources.

Command 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 commands/pedrogiudice/lex-vector/adk-search-loop
Clone the repo
git clone --depth 1 https://github.com/PedroGiudice/lex-vector

Made for: Claude Code.

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 ADK-search-loop

README.md
[![agentmods](https://agentmods.dev/badge/commands/pedrogiudice/lex-vector/adk-search-loop.svg)](https://agentmods.dev/commands/pedrogiudice/lex-vector/adk-search-loop)
Your own site
<a href="https://agentmods.dev/commands/pedrogiudice/lex-vector/adk-search-loop"><img src="https://agentmods.dev/badge/commands/pedrogiudice/lex-vector/adk-search-loop.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 867 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.00000 $0.00867
Opus 5 $0.00000 $0.00434
Sonnet 5 $0.00000 $0.00173
Haiku 4.5 $0.00000 $0.00087

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

Security

Grade A, and why

ADK-search-loop 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 5d 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.

.claude/commands/ADK-search-loop.md · 106 lines

How it starts

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

Claude Command: Iterative Deep Research

Execute the Iterative Deep Research Agent for multi-pass research with gap analysis.

Usage

/iterative-research "Your research topic here"

Or with arguments:

/iterative-research --check   # Check dependencies only
/iterative-research --help    # Show help

Difference from /deep-research

Feature /deep-research /iterative-research
Passes 1 (single-pass) 1-5 (configurable)
Queries 5-10 (soft limit) 15-45 (per iteration)
Sources Variable Minimum guaranteed
Gap Analysis None After each iteration
Refinement None Query refinement based on gaps

What This Command Does

  1. Phase 1 - Decomposition: Breaks topic into 5-15 searchable sub-vectors
  2. Phase 2 - Search Iteration: Executes queries for each sub-vector
  3. Phase 3 - Gap Analysis: LLM identifies what's missing
  4. Phase 4 - Refinement: Generates new queries for gaps
  5. Loop: Repeats until stopping criteria met
  6. Phase 5 - Synthesis: Compiles final report

Stopping Criteria

  • max_iterations reached (default: 5)
  • min_sources found (default: 20)
  • Saturation detected (no new information)

Execution

When the user invokes this command, execute:

REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "/home/cmr-auto/claude-work/repos/lex-vector")
cd "$REPO_ROOT/adk-agents" && ./run-iterative-research.sh "$ARGUMENTS"

If $ARGUMENTS is empty, ask the user for a research topic.

If $ARGUMENTS is --check, run:

REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "/home/cmr-auto/claude-work/repos/lex-vector")
cd "$REPO_ROOT/adk-agents" && ./run-iterative-research.sh --check-deps

Prerequisites

  • GOOGLE_API_KEY environment variable (loaded from adk-agents/.env)
  • Python virtual environment at adk-agents/deep_research_sandbox/.venv/
  • Required packages: google-adk, google-genai

Read the full file on GitHub · 106 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. 5d ago First seen · 106 lines · 0 tokens per session scan A d8998f4050c6

Subscribe to this mod's changes

ADK-search-loop is a command published in the GitHub repository PedroGiudice/lex-vector (5 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 867 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.