Agent skill

iterative-retrieval

Pattern for progressively refining context retrieval to solve the subagent context problem

mturacgithub.com/mturacGitHub ↗
codexcopilotcursorMIT
Install
npx skills add mturac/everything-openai-codex --skill iterative-retrieval --agent codex

Same command for any agent — swap --agent for claude-code, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 6 KB
Bundled scripts: none
Path: skills/iterative-retrieval/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 84
Language: JavaScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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 │ │ │ └──────────┘ └────

What's inside
Steps it walks through
  1. When to Activate
  2. The Problem
  3. The Solution: Iterative Retrieval
  4. Phase 1: DISPATCH
  5. Phase 2: EVALUATE
  6. Phase 3: REFINE
  7. Phase 4: LOOP
  8. Practical Examples
  9. Example 1: Bug Fix Context
  10. Example 2: Feature Implementation
  11. Integration with Agents
  12. Best Practices
  13. Related
More from everything-openai-codex
All skills →
About this skill
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.

Keep going