iterative-retrieval

Refine codebase retrieval queries across iterative cycles with relevance scoring.

Updated May 9, 2026
One-click install
npx skills add https://github.com/kk20300113-png/my-claude-skills --skill iterative-retrieval-kk20300113-png
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/kk20300113-png/my-claude-skills/tree/main/iterative-retrieval
Command: npx skills add https://github.com/kk20300113-png/my-claude-skills --skill iterative-retrieval-kk20300113-png

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the common issue where spawned subagents lack the necessary codebase context to complete tasks, leading to failed executions, context limit overruns, or incomplete results because required context cannot be predicted upfront.

Core Features & Use Cases

  • 4-Phase Iterative Retrieval Loop: Uses a dispatch-evaluate-refine-loop workflow to progressively narrow down relevant context across multiple cycles.
  • Relevance Scoring & Gap Identification: Evaluates retrieved files against task requirements to filter out irrelevant content and identify missing context for refinement.
  • Use Cases: Ideal for spawning subagents for bug fixes, feature implementation, code exploration, and RAG-like retrieval pipelines, as well as optimizing token usage in multi-agent orchestration workflows. For example, when fixing an authentication bug, it first searches for auth-related files, discovers codebase-specific terminology like "jwt" and "refresh token" in the first cycle, refines its search in the second cycle, and returns only the most relevant files without exceeding context limits.

Quick Start

Use the iterative-retrieval skill to gather the necessary codebase context for adding rate limiting to API endpoints, capping retrieval at 3 iterative cycles to avoid unnecessary token usage.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I fix subagent context gaps when spawning agents for code exploration?

Fix subagent context gaps by using iterative retrieval to progressively refine codebase search queries across multiple cycles. This dispatch-evaluate-refine-loop workflow identifies missing context and returns only high-value files to complete code exploration tasks successfully.

What is the best way to optimize token consumption in multi-agent orchestration workflows?

Optimize token consumption in multi-agent orchestration by applying iterative retrieval with relevance scoring and gap identification. This filters irrelevant content and caps retrieval cycles, minimizing token usage while returning necessary codebase context for feature implementation or bug fixes.

How does iterative retrieval work for retrieving codebase context in bug fix scenarios?

Iterative retrieval works through a 4-phase dispatch-evaluate-refine-loop workflow for retrieving codebase context. It searches for relevant files, evaluates them against task requirements, identifies missing context like specific terminology, and refines search queries in subsequent cycles to return high-value files.

When do I need iterative retrieval for subagent context in feature implementation tasks?

You need iterative retrieval for subagent context when required codebase information cannot be predicted prior to subagent execution. It is necessary for feature implementation tasks where spawned subagents lack context, preventing failed executions or context limit overruns.

Can I use iterative retrieval to cap cycles and avoid unnecessary token usage during codebase searches?

Yes, you can use iterative retrieval to cap cycles and avoid unnecessary token usage. For example, when adding rate limiting to API endpoints, you can cap retrieval at 3 iterative cycles to prevent excessive token consumption while gathering sufficient context.

Does iterative retrieval support RAG-like retrieval pipelines for codebase exploration?

Yes, iterative retrieval supports RAG-like retrieval pipelines for codebase exploration. It applies relevance scoring and gap identification to filter irrelevant content and refine search queries, ensuring high-value context is returned for multi-agent workflows without exceeding context limits.