iterative-retrieval

Iteratively refine search queries to retrieve relevant codebase context for subagents.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the challenge of providing subagents with the precise codebase context they need, especially when that context cannot be known upfront, preventing issues like "context too large" or "missing context" errors.

Core Features & Use Cases

  • Progressive Context Refinement: Iteratively narrows down relevant files and code snippets.
  • Dynamic Query Building: Adapts search patterns and keywords based on initial evaluations.
  • Use Case: When debugging a complex authentication flow, this Skill can intelligently discover and retrieve only the most relevant files (e.g., auth.ts, session-manager.ts, jwt-utils.ts) without overwhelming the agent with the entire codebase.

Quick Start

Use the iterative-retrieval skill to find files related to user authentication.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I retrieve the right codebase context for a subagent when I don't know which files are needed upfront?

Iterative retrieval solves unpredictable subagent context needs by progressively dispatching, evaluating, and refining search queries to dynamically narrow down relevant codebase files without requiring upfront knowledge.

What causes "context too large" errors in multi-agent workflows and how can I optimize token usage?

Overwhelming subagents with entire codebases causes "context too large" errors. Iterative retrieval optimizes token usage by iteratively refining search queries to extract only the most relevant code snippets, preventing context overflow in multi-agent workflows.

When do I need a RAG-like retrieval pipeline for code exploration?

You need a RAG-like retrieval pipeline when debugging complex code flows, such as authentication, where relevant files cannot be predicted upfront. Iterative retrieval progressively discovers and retrieves specific files without overwhelming the agent with the entire codebase.

How do I build a RAG pipeline that progressively narrows down relevant code snippets?

Build a RAG pipeline using iterative dispatch, evaluation, and refinement loops that dynamically adapt search patterns and keywords based on initial evaluations to progressively narrow down relevant codebase context.

Does this iterative retrieval approach work for debugging complex code flows like authentication?

Yes, iterative retrieval works for debugging complex authentication flows by intelligently discovering and retrieving only relevant files like auth.ts, session-manager.ts, and jwt-utils.ts. It progressively refines context without loading the entire codebase.

What are the limitations of using iterative context refinement for codebase search?

Iterative context refinement requires multiple dispatch and evaluation loops, which may increase latency before retrieving the final codebase context. It is designed for complex, unpredictable context needs rather than simple, direct file lookups in multi-agent workflows.