iterative-retrieval

Refine codebase context retrieval through a 4-phase dispatch-evaluate-refine loop.

2|Updated May 11, 2026
One-click install
npx skills add https://github.com/himanshu231204/AI_Research_agent --skill iterative-retrieval-himanshu231204
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/himanshu231204/AI_Research_agent/tree/main/.opencode/skills/iterative-retrieval
Command: npx skills add https://github.com/himanshu231204/AI_Research_agent --skill iterative-retrieval-himanshu231204

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the common issue where subagents in multi-agent workflows lack the necessary codebase context upfront, leading to failed tasks, excessive token consumption, or missing critical information needed to complete work.

Core Features & Use Cases

  • 4-Phase Iterative Loop: Uses a structured dispatch-evaluate-refine-loop workflow to progressively narrow down relevant context instead of guessing or sending all available code.
  • Relevance Scoring: Filters retrieved files by relevance to the task, excluding low-value content to optimize token usage.
  • Adaptive Search: Automatically adjusts search criteria based on discovered codebase terminology and identified context gaps.
  • Use Case: For example, when building a code analysis agent that needs to fix a bug, use this pattern to automatically pull only the relevant authentication and session management files without overwhelming the agent with unrelated code.

Quick Start

Use the iterative-retrieval skill to gather the exact codebase context needed to implement the rate limiting feature for API endpoints described in your task.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I provide relevant codebase context to subagents without exceeding the context window?

To provide relevant codebase context without exceeding the context window, use an iterative retrieval process that progressively narrows down files through relevance scoring. This approach filters out low-value content, ensuring subagents receive targeted context while minimizing token usage.

What is the best way to retrieve code context for bug fixes in multi-agent workflows?

The best way to retrieve code context for bug fixes in multi-agent workflows is a 4-phase dispatch-evaluate-refine-loop. This pattern progressively identifies context gaps and adjusts search criteria, delivering only the exact files needed for the task.

Why do my multi-agent workflows fail when analyzing code for feature implementation?

Multi-agent workflows often fail when analyzing code because subagents lack the necessary codebase context upfront. Without progressive context refinement, agents either miss critical information or consume excessive tokens trying to process unrelated code.

How does adaptive codebase search work for agent orchestration?

Adaptive codebase search works for agent orchestration by automatically adjusting search criteria based on discovered terminology and identified context gaps. It evaluates retrieved files and loops back to refine the search, continually narrowing down to high-value context.