iterative-retrieval
Pattern for progressively refining context retrieval to solve the subagent context problem
npx skills add mturac/everything-openai-codex --skill iterative-retrieval --agent codex
Same command for any agent — swap --agent for claude-code, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Iterative Retrieval Pattern Solves the "context problem" in multi-agent workflows where subagents don't know what context they need until they start working. ## When to Activate - Spawning subagents that need codebase context they cannot predict upfront - Building multi-agent workflows where context is progressively refined - Encountering "context too large" or "missing context" failures in agent tasks - Designing RAG-like retrieval pipelines for code exploration - Optimizing token usage in agent orchestration ## The Problem Subagents are spawned with limited context. They don't know: - Which files contain relevant code - What patterns exist in the codebase - What terminology the project uses Standard approaches fail: - **Send everything**: Exceeds context limits - **Send nothing**: Agent lacks critical information - **Guess what's needed**: Often wrong ## The Solution: Iterative Retrieval A 4-phase loop that progressively refines context: ``` ┌─────────────────────────────────────────────┐ │ │ │ ┌──────────┐ ┌──────────┐ │ │ │ DISPATCH │─────│ EVALUATE │ │ │ └──────────┘ └──────────┘ │ │ ▲ │ │ │ │ ▼ │ │ ┌──────────┐ ┌──────────┐ │ │ │ LOOP │─────│ REFINE │ │ │ └──────────┘ └────
- When to Activate
- The Problem
- The Solution: Iterative Retrieval
- Phase 1: DISPATCH
- Phase 2: EVALUATE
- Phase 3: REFINE
- Phase 4: LOOP
- Practical Examples
- Example 1: Bug Fix Context
- Example 2: Feature Implementation
- Integration with Agents
- Best Practices
- Related
What does the iterative-retrieval skill do?
Pattern for progressively refining context retrieval to solve the subagent context problem
How do I install it?
Run `npx skills add mturac/everything-openai-codex --skill iterative-retrieval --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From mturac/everything-openai-codex, a repository with 84 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
