iterative-retrieval

Run progressive multi-cycle codebase searches with relevance scoring and terminology refinement.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/bennybennison/agent-toolkit --skill iterative-retrieval-bennybennison
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterative-retrieval
Source: https://github.com/bennybennison/agent-toolkit/tree/main/skills/iterative-retrieval
Command: npx skills add https://github.com/bennybennison/agent-toolkit --skill iterative-retrieval-bennybennison

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the limitations of single-pass searches in unfamiliar codebases, where incorrect terminology or scattered information leads to incomplete context and wasted time.

Core Features & Use Cases

  • Multi-Cycle Search: Conducts broad initial searches using grep, glob patterns, and directory reads, then refines based on discovered terminology.
  • Relevance Scoring: Evaluates results with a scoring system to prioritize direct hits and update search strategies iteratively.
  • Use Case: When debugging a bug in an unknown module, start with generic terms like "error handling," score initial results to learn project-specific names like "exception-guard," and loop to find interconnected files across layers.

Quick Start

Apply iterative retrieval to explore the authentication module in this codebase by starting with a broad search for user login patterns.

Frequently Asked Questions about iterative-retrieval

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

FAQPage Schema
How do I search an unfamiliar codebase when I don't know the exact terminology?

Progressive codebase search solves unfamiliar terminology by starting with broad grep patterns and directory reads, then refining queries based on discovered project-specific names across a maximum of three cycles.

What is the best way to investigate bugs across multiple files in an unknown module?

Bug investigation across unknown modules works best using iterative retrieval, which scores initial broad search results to learn project-specific terminology and loops to uncover interconnected files across architectural layers.

How does relevance scoring improve codebase search results?

Relevance scoring improves codebase search by evaluating initial results to prioritize direct hits, allowing you to update search strategies iteratively and refine terminology for subsequent search cycles.

Can I use iterative search for cross-file analysis in software development?

Iterative search supports cross-file analysis in software development by conducting broad initial searches using glob patterns and grep, then refining the strategy based on relevance scores to gather comprehensive context.

What are the limitations of multi-cycle codebase searches?

Multi-cycle codebase searches are limited to a maximum of three cycles per task, requiring documented results and relevance scoring at each step to ensure progressive context gathering without excessive iterations.