What does this skill do?

The Iterative Context Retrieval Skill solves the context problem in multi-agent workflows, where subagents do not know what information they need until they begin working. Through a cycle of dispatching, evaluation, and refinement, it progressively obtains the exact context, avoiding token limit saturation and ensuring that no critical information is missing.

Bug Fixes
It gradually retrieves the files relevant to a bug without knowing in advance where the root cause lies.
Implementation of Features
Discover the actual terminology used in the codebase (synonyms, patterns) by iterating until you have enough context.
Multi-Agent Flows
Subagents that refine their own context as they proceed with their task.
Token Optimization
Limit the context to files with a relevance score of ≥ 0.7, reducing noise and token consumption.

Usage examples

🐛 Bug fix
Fixes the authentication token expiration bug using iterative context recovery.
🚀 New Feature
Add rate limiting to the API endpoints by gradually retrieving the context.
🧩 Multi-agent orchestration
Generate subagents to refactor the payments module using the iterative recovery pattern.
📊 Optimize tokens
Retrieve only the files with a relevance score of ≥ 0.7 for the TypeScript migration task.

Features

Dispatch-Evaluate-Refine Cycle Perform broad searches, evaluate relevance on a scale of 0–1, and refine criteria iteratively.
Limit of 3 cycles Avoid infinite loops by limiting the number of iterations to 3, stopping when there is sufficient context.
Detection of Hidden Terminology Discover synonyms and actual patterns in the codebase that were not predictable in the initial query.
Significance threshold ≥ 0.7 It filters out irrelevant files and returns only the optimal and minimum necessary context.
Compatible with RAG pipelines Designed to integrate into RAG-style retrieval pipelines for code exploration.

Frequently asked questions

A maximum of 3 cycles to prevent infinite loops. The process stops earlier if it already has at least 3 highly relevant files.
No. The skill is an orchestration pattern that Claude applies directly to the codebase by searching for files and evaluating their content.
The skill returns files with a score of 0.7 or higher, which are considered highly relevant to the subagent's task.
Yes. The pattern is language-agnostic: it is based on keywords, paths, and semantic evaluation of the retrieved content.

Related skills

More skills in the same category:

Iterative Context Retrieval — Multi-Agent RAG with Claude AI

¿Prefieres escuchar el contenido? Genera la narración de audio con un clic.