iterative-retrieval

Automates progressive codebase context collection for multi-agent workflows via iterative refinement cycles.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/BuildSmarterAI/claude-skills --skill iterative-retrieval-buildsmarterai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/BuildSmarterAI/claude-skills/tree/main/iterative-retrieval
Command: npx skills add https://github.com/BuildSmarterAI/claude-skills --skill iterative-retrieval-buildsmarterai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Subagents often start with limited context and struggle to identify relevant files and patterns within large codebases. This pattern provides a disciplined, four-phase loop to progressively refine context and surface high-relevance files for downstream tasks.

Core Features & Use Cases

  • Four-phase iterative retrieval loop (DISPATCH, EVALUATE, REFINE, LOOP) to surface relevant code files while managing context size.
  • Works for multi-agent workflows, code exploration, and contexts that exceed token limits.
  • Builds a reusable strategy for discovering required context with minimal data transfer.

Quick Start

Begin with a broad search for candidate files, evaluate relevance, then refine criteria across up to three cycles to surface the most pertinent files.

Frequently Asked Questions about iterative-retrieval

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build relevant context for subagents in a large codebase?

To build context for subagents, use iterative retrieval to progressively narrow down relevant files and patterns. This approach uses a four-phase loop—DISPATCH, EVALUATE, REFINE, LOOP—across up to three cycles to surface high-relevance files for downstream tasks.

What is the best way to narrow codebase context when it exceeds token limits?

The best way to narrow codebase context exceeding token limits is progressive context collection. By iteratively evaluating and refining search criteria, the loop minimizes data transfer and produces a curated set of pertinent files without overwhelming the context window.

How does iterative retrieval refine context for multi-agent workflows?

Iterative retrieval refines context by looping through four phases: DISPATCH to search candidate files, EVALUATE to assess relevance, REFINE to update criteria, and LOOP to repeat. This cycle runs up to three times to progressively surface pertinent files.

Can I use progressive context collection for code exploration in dynamic projects?

Yes, you can use progressive context collection for code exploration in dynamic projects. The iterative loop works for multi-agent workflows and code exploration by building a reusable strategy to discover required context with minimal data transfer across evolving codebases.

What are the limitations of iterative retrieval for subagent context?

A limitation of iterative retrieval is that it caps at three cycles to manage context size. When refining context for subagents, the loop may not surface every pertinent file if the codebase is exceptionally large or highly fragmented across unrelated modules.