iterative-retrieval

Refine repository context through iterative retrieval cycles for subagent coordination.

1.8k|303|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/xu-xiang/everything-claude-code-zh --skill iterative-retrieval-xu-xiang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/xu-xiang/everything-claude-code-zh/tree/main/docs/zh-TW/skills/iterative-retrieval
Command: npx skills add https://github.com/xu-xiang/everything-claude-code-zh --skill iterative-retrieval-xu-xiang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps orchestration systems solve subagent context problems by progressively refining retrieved materials, ensuring agents receive the most relevant context without being overwhelmed by noise or missing critical details.

Core Features & Use Cases

  • Iterative context refinement: A four-stage loop (DISPATCH, EVALUATE, REFINE, LOOP) to progressively narrow down the most relevant files and patterns for a task.
  • Adaptive term discovery: Expands keywords and patterns based on evaluation feedback to uncover domain terms and codebase conventions.
  • Use Case: When coordinating multiple agents to diagnose a bug, this skill fetches relevant files across a large repository, ranks them by relevance, and returns a concise set of high-value sources for evaluation.

Quick Start

Start by defining an initial query with broad patterns and keywords, then run up to three cycles of dispatch and refinement to gather highly relevant context for the subagents.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I refine repository context for subagent coordination tasks?

Iterative retrieval refines repository context by running a four-stage loop of dispatch, evaluate, refine, and loop to progressively narrow down relevant files and patterns. This ensures subagents receive high-value context without noise.

What is the best way to search a large codebase for relevant files when diagnosing a bug?

Searching a large codebase for bug diagnosis works best by running up to three cycles of dispatch and refinement with broad initial keywords. The system ranks retrieved files by relevance and returns a concise set of high-value sources for evaluation.

How does adaptive term discovery work during codebase retrieval?

Adaptive term discovery expands keywords and patterns based on evaluation feedback during the retrieval cycles. This uncovers domain terms and codebase conventions that initial broad search queries might miss.

When do I need iterative retrieval for agent workflow context?

You need iterative retrieval for agent workflow context when orchestrating multiple subagents across a large repository. It prevents agents from being overwhelmed by noise or missing critical details by progressively refining retrieved materials.

How many retrieval cycles should I run to gather relevant codebase context?

Run up to three cycles of dispatch and refinement to gather highly relevant codebase context. Starting with broad patterns and keywords, these cycles progressively narrow down the most relevant files for subagents.