Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add jnPiyush/AgentX --skill iterative-retrievalgit clone --depth 1 https://github.com/jnPiyush/AgentXWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/jnpiyush/agentx/iterative-retrieval)<a href="https://agentmods.dev/skills/jnpiyush/agentx/iterative-retrieval"><img src="https://agentmods.dev/badge/skills/jnpiyush/agentx/iterative-retrieval/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/jnpiyush/agentx/iterative-retrieval"><img src="https://agentmods.dev/badge/skills/jnpiyush/agentx/iterative-retrieval.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
SkillSpector: 1 finding, up to low
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- low Excessive Agency · line 128 Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00073 | $0.01616 |
| Opus 5.5 | $0.00029 | $0.00646 |
| Sonnet 5.5 | $0.00015 | $0.00323 |
| Haiku 4.5 | $0.00007 | $0.00162 |
Grade A, and why
iterative-retrieval scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Iterative Retrieval for Subagents
Purpose: Keep subagent context budgets small while still answering the parent agent's real question. Scope: Subagent delegation, RAG-style scoped reads, multi-pass code search, evidence extraction.
When to Use This Skill
- Parent agent needs a subagent to read large files, long docs, or many search hits and return a short answer.
- The naive approach ("here is the whole repo, summarize") will blow the subagent context.
- The question is open enough that one search query will miss relevant evidence.
- Answer must cite specific files, lines, or sections, not just produce a paraphrase.
When NOT to Use
- Single-file edits where you can read the file directly.
- Questions answerable from titles or filenames alone.
- Tasks where the parent agent already has the relevant content in context.
The Anti-Pattern (One-Shot Context Dump)
Parent: "Read these 40 files and tell me where auth is handled."
-> subagent loads 40 files
-> hits context limit at file 17
-> hallucinates the rest, or returns truncated nonsense
This fails because:
- Subagent burns budget on irrelevant files before reaching the answer.
- No evidence trail; parent cannot verify the claim.
- Re-running with a refined query wastes the same budget again.
The Iterative Retrieval Pattern
Five phases, executed by the subagent under a strict turn budget (typically 5-8 turns).
Phase 1: Scope
The subagent restates the parent's question in its own words and lists what it does NOT need to know.
Question: "Where is authentication handled?"
In scope: middleware, login endpoints, token validation, session lifecycle.
Out of scope: UI login forms, password reset email templates, OAuth provider config.
Budget: 6 turns, 30 KB of file reads.
Phase 2: Broad Probe
Run one cheap, high-recall search to map the territory. Read filenames and one-line previews only.
Text search (regex): "authenticate|authorize|login|session|token"
File-name search (glob): "**/auth/**", "**/*auth*.ts"
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago Changed 689e72f24702
- 2mo ago Changed 605c8c78e7a9
- 2mo ago First seen · 158 lines · 73 tokens per session scan A d9e48f89e4f1
iterative-retrieval is a skill published in the GitHub repository jnPiyush/AgentX (19 stars, last pushed today), licensed Apache-2.0. It adds 73 tokens to every session and 1,616 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
iterative-retrieval compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| iterative-retrievaljnPiyush/AgentX | Skill | 19 | today | Apache-2.0 | A | 73 | Claude Code, Codex |
| agent-platform-rag-engine-managementgoogle/skills | Skill | 25k | today | Apache-2.0 | A | 85 | Claude Code, Codex |
| embeddingsruvnet/ruflo | Skill | 83k | today | MIT | A | 62 | Claude Code |
| llm-app-patternsdavila7/claude-code-templates | Skill | 35k | today | MIT | A | 54 | Claude Code, Codex |
| graphifyGraphify-Labs/graphify | Skill | 155k | today | Apache-2.0 | B | 76 | Claude Code |
| 9router-embeddingsdecolua/9router | Skill | 33k | 8d ago | MIT | A | 66 | Claude Code, Codex |
| browserwing-adminMemTensor/MemOS | Skill | 13k | today | Apache-2.0 | B | 47 | Claude Code, Codex |