iterative-retrieval
Skill3 starsChanged 8 months agoMITView on GitHub
Progressive context refinement pattern for subagents. Solves the problem of agents not knowing what context they need until they start working. Uses a 4-phase loop: DISPATCH, EVALUATE, REFINE, LOOP.
28 other projects use a version of this.
Adopted by
Most recently taken up by
- templetongroup/radianttheir own version, first seen Sep 17, 2026
- jamesdebatty/skillstheir own version, first seen Sep 8, 2026
- microsoft/fsi-banking-payments-dispute-resolution-acceleratortheir own version, first seen Aug 14, 2026
- jcarlosrodicio/pi-agent-orchestration-kittheir own version, first seen Aug 13, 2026
- SamuelNDCE/claude-super-skill-librarytheir own version, first seen Aug 1, 2026
- thanvish21/hcc-bundletheir own version, first seen Jul 25, 2026
Used with
Projects with it also use configure-ecc, carrier-relationship-management and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
saxon-ySkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 10 projects that use this
InfopibeSkillcarrier-relationship-management
Codified expertise for managing carrier portfolios, negotiating freight rates, tracking carrier performance, allocating freight, and maintaining strategic carrier relationships. Informed by transportation managers with 15+ years experience. Includes scorecarding frameworks, RFP processes, market intelligence, and compliance vetting. Use when managing carriers, negotiating rates, evaluating carrier performance, or building freight strategies.
Also in 8 projects that use this
InfopibeSkillralphinho-rfc-pipeline
RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.
Also in 8 projects that use this
- +5 more from Infopibe
Other versions28 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 28
- github/gh-aw★ 5.3ksame name
- microsoft/Generative-AI-for-beginners-dotnet★ 3.1ksame name
- xu-xiang/everything-claude-code-zh★ 2ksame name
- loulanyue/awesome-claude-notes★ 272same name
- Azure/fleet★ 226same name
- tpavanipradeep/everything-claude-code★ 134same name
- templetongroup/radiant★ 113same name
- Jamkris/everything-gemini-code★ 87same name
- codelably/harmony-claude-code★ 43same name
- myths-labs/muse★ 35same name
18 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository72 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- api-designerSkill
- backend-patternsSkill
- code-reviewerSkill
- debugging-assistantSkill
- golang-testingSkill
- project-guidelines-exampleSkill
- python-testingSkill
- refactoring-guideSkill
- spec-driven-developmentSkill
- tdd-workflowSkill
- verification-loopSkill
- update-docsSkill
- api-docsSkill
- changelog-writerSkill
- readme-generatorSkill
- django-patternsSkill
- django-securitySkill
- django-tddSkill
- django-verificationSkill
- fastapi-patternsSkill
- nextjs-patternsSkill
- react-patternsSkill
- springboot-patternsSkill
- springboot-securitySkill
- springboot-tddSkill
- branch-strategySkill
- changelogSkill
- commit-helperSkill
- pr-creatorSkill
- prSkill
- evolveSkill
- instinct-exportSkill
- instinct-importSkill
- instinct-statusSkill
- cleanupSkill
- lint-fixSkill
- refactor-cleanSkill
- update-depsSkill
- continuous-learningSkill
- continuous-learning-v2Skill
- eval-harnessSkill
- strategic-compactSkill
- golang-patternsSkill
- python-patternsSkill
- rust-patternsSkill
- typescript-patternsSkill
- accessibility-checkerSkill
- build-fixSkill
- code-reviewSkill
- e2eSkill
- performance-reviewerSkill
- security-auditorSkill
- security-reviewSkill
- test-coverageSkill
- checkpointSkill
- deploySkill
- evalSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. 1 is common, 2 are distinctive, and 0 are very specific to this project.
1
Common
Most of the 25 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
When delegating to subagents, you face a dilemma:
- Common: line 57
Update search criteria based on evaluation:
- Distinctive: line 71
No critical gaps identified
“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Iterative Retrieval Pattern
Solve the subagent context problem: agents don't know what they need until they start looking.
The Problem
When delegating to subagents, you face a dilemma:
- Send everything: Context overflow, wasted tokens, confused agent
- Send nothing: Agent lacks context, produces poor results
- Guess what's needed: Often wrong, misses critical files
The Solution: 4-Phase Iterative Loop
Phase 1: DISPATCH
Send a broad initial query to gather candidate context:
Search for files related to: [topic]
Keywords: [initial keywords]
File patterns: [likely patterns]
Return: File paths with relevance scoresPhase 2: EVALUATE
Score each result for relevance (0.0 to 1.0):
| File | Relevance | Reason |
|------|-----------|--------|
| src/auth/login.ts | 0.9 | Core auth logic |
| src/utils/hash.ts | 0.7 | Used by auth |
| src/config.ts | 0.3 | Has auth config section |
| src/routes.ts | 0.2 | Only references auth path |Identify gaps:
- What terminology does this codebase use? (update search terms)
- What patterns are referenced but not found?
- What dependencies need exploration?
Phase 3: REFINE
Update search criteria based on evaluation:
Updated keywords: [refined keywords from codebase terminology]
New file patterns: [patterns discovered during evaluation]
Specific files to read: [high-relevance files]
Gaps to fill: [what's still missing]Phase 4: LOOP
Repeat phases 1-3 with refined criteria.
Stopping Criteria:
- 3+ files with relevance >= 0.7
- No critical gaps identified
- OR max 3 iterations reached (proceed with best available)
Example: Finding Auth Implementation
Iteration 1:
- DISPATCH: Search for "auth", "login", "session"
- EVALUATE: Found middleware but not the auth service
- REFINE: Codebase uses "identity" not "auth"
Iteration 2:
- DISPATCH: Search for "identity", "credential", "token"
- EVALUATE: Found IdentityService, TokenManager, SessionStore
- Result: 5 files with relevance >= 0.8 — stop and proceed
Implementation Pattern
async function iterativeRetrieve(topic: string, maxIterations = 3) {
let keywords = extractKeywords(topic);
let context: FileContext[] = [];
for (let i = 0; i < maxIterations; i++) {
// DISPATCH
const candidates = await searchCodebase(keywords);
// EVALUATE
const scored = await scoreRelevance(candidates, topic);
context = mergeContext(context, scored.filter(s => s.relevance >= 0.5));
// Check stopping criteria
const highRelevance = context.filter(c => c.relevance >= 0.7);
if (highRelevance.length >= 3) break;
// REFINE
keywords = refineKeywords(keywords, scored);
}
return context;
}When to Use
- Delegating research to a subagent
- Exploring unfamiliar codebases
- Gathering context for code review
- Building context for architectural analysis
When NOT to Use
- You already know exactly what files are needed
- The task is in a single file
- The codebase is small enough to read entirely
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

