Iterative Retrieval Pattern
Fix the subagent context problem with Muse: a dispatch-evaluate-refine-loop that progressively sharpens codebase retrieval, capped at 3 cycles.
- What
- Fix the subagent context problem with Muse: a dispatch-evaluate-refine-loop that progressively sharpens codebase retrieval, capped at 3 cycles.
- Cost
- Free
- Needs
- none to install. Pure guidance; a multi-agent setup helps.
- Level
- Beginner
- Install
- Copy the installer prompt below into your Muse — your agent does the rest.
Curated by Skill Harbor: a retrieval pattern that makes Muse solve the subagent context problem instead of guessing what a subagent needs upfront. The problem is real: subagents do not know which files contain the relevant code or what terminology the project uses, so sending everything blows the context limit and sending nothing leaves them blind. The solution is a four-phase loop, dispatch, evaluate, refine, loop, capped at three cycles: start with a broad keyword query, score each retrieved file on a 0 to 1 relevance scale with the reason and the missing context noted, refine the query by adding discovered patterns and terminology while excluding confirmed irrelevant paths, and repeat until three or more high-relevance files are found or the cap is hit. Worked examples show a bug-fix context retrieval and a feature-implementation retrieval where the second cycle discovers the codebase says throttle instead of rate limit. An agent-prompt snippet shows how to embed the pattern in instructions, and the best practices close with the line that matters: start broad and narrow progressively, learn the codebase terminology from the first cycle, and stop at good enough because three high-relevance files beat ten mediocre ones. By @affaan-m, listed here with credit to its creator. From the affaan-m/ECC repository (MIT). Honest caveats: the relevance scoring is heuristic, tune it to your retrieval backend; the three-cycle cap is a starting default, not a law; it optimizes retrieval, it does not guarantee the agent understands what it found. Skill Harbor never reviews the code, review it yourself before use.
Version:
Quick answer
Iterative Retrieval Pattern is a free Muse skill and pattern fixing the subagent context problem by dispatching, evaluating and refining in a loop sharpening retrieval, capped at three. The problem is real: subagents do not know which files contain relevant code or what terminology the project uses, so sending everything blows the context limit and sending nothing leaves them blind.
Install
Copy the install package below, then paste it into Muse🧪 Install ran in our test sandbox · Nov 11, 2026📌 Pinned version: commit 4eb71d9Pinned version: install the code at commit 4eb71d92a39cab44ad40ac9d8a6a5ccb4029d6c2 exactly (Skill Harbor tested this version). Do not substitute a newer version. If this commit is unreachable, stop and tell me. Use "Iterative Retrieval Pattern" with your Muse. Prerequisites: none to install. Pure guidance; a multi-agent setup helps. 1. Open the skill: https://raw.githubusercontent.com/affaan-m/ECC/4eb71d92a39cab44ad40ac9d8a6a5ccb4029d6c2/skills/iterative-retrieval/SKILL.md and copy the full SKILL.md text. 2. Paste it into a chat with Muse and add: "Design the retrieval loop for this subagent task: [describe the task]." 3. Ask follow-ups like "what should the first broad query be" or "which files scored above 0.7 and why?" Tip: cap at 3 cycles; 3 high-relevance files beat 10 mediocre ones. Safety: a skill is plain-text instructions; it runs nothing by itself. Review generated commands before running them.
Saved to your recent installs. Find it anytime on /connect.
🔒 Security, provenance and what this touches
The install prompt below already includes the vetting steps: your agent follows the community checklist before installing anything with executable code. Want more?
Verification certificate
Dated facts about what was checked for this listing, and how. This is not a safety certification.
- Pinned version
- 4eb71d9 · 2026-10-13
- Sandbox install test
- Install ran in our test sandbox · Nov 11, 2026
- Creator identity
- Not verified
- Fingerprint watch
- Last checked · Nov 21, 2026 : no change detected in the files linked by this install prompt
- Install prompt analysis
- 2026-10-13 : No commands, network calls, packages, file writes or API keys detected.
Skill Harbor never reviews the code of a listed skill. These are dated facts about the install prompt and our install test, not a safety certification. Review a skill yourself before you install it. How we verify
Questions
How do I install a skill?
Every product page includes a copy-paste install prompt. Paste it into your Muse and it sets the skill up for you — no manual configuration.
Where does my money go?
Straight to the seller. Skill Harbor never processes payments: checkout happens on the seller’s own page, usually Stripe.
What does the ✓ next to a creator’s name mean?
It means we confirmed the identity of the person behind the listing. It says nothing about the code itself — always check a skill before installing it.