iterative-retrieval

Refine search queries iteratively to retrieve relevant context for sub-agents.

1|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/ndhananj/codex-agent-setup --skill iterative-retrieval-ndhananj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/ndhananj/codex-agent-setup/tree/main/docs/zh-CN/skills/iterative-retrieval
Command: npx skills add https://github.com/ndhananj/codex-agent-setup --skill iterative-retrieval-ndhananj

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of sub-agents lacking sufficient context to begin their tasks, preventing them from knowing which files or information are relevant.

Core Features & Use Cases

  • Iterative Context Refinement: A 4-stage loop (Dispatch, Evaluate, Refine, Loop) to progressively optimize context retrieval.
  • Dynamic Query Adjustment: Learns from previous retrieval cycles to refine search patterns, keywords, and exclusions.
  • Use Case: When a sub-agent needs to fix a bug in a complex codebase, this Skill can intelligently search for relevant files related to authentication and session management, evaluate their relevance, and refine the search based on findings, ensuring the sub-agent receives the most pertinent information.

Quick Start

Use the iterative-retrieval skill to find relevant files for the task 'Fix the authentication token expiry bug'.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I gather sufficient context for sub-agents in a multi-agent workflow?

To gather sufficient context for sub-agents, you can use an iterative context retrieval pattern that dynamically refines search queries based on relevance evaluation. This ensures targeted information gathering before task execution.

What is iterative context refinement and how does it work for codebase navigation?

Iterative context refinement is a 4-stage loop—Dispatch, Evaluate, Refine, and Loop—that progressively optimizes context retrieval. It evaluates file relevance and adjusts search patterns across multiple cycles to find pertinent codebase information.

How do I dynamically refine search queries to find relevant files for sub-agents?

You dynamically refine search queries by learning from previous retrieval cycles. The system evaluates the relevance of found files and adjusts search patterns, keywords, and exclusions to identify missing context for the sub-agent.

When do I need iterative context retrieval for multi-agent systems?

You need iterative context retrieval when sub-agents lack sufficient context to begin their tasks. It is necessary when agents must fix bugs in complex codebases and need intelligently targeted information to proceed.