iterative-retrieval

iterative-retrieval is a skill for Claude Code, Codex from majiayu000/vibeguard. It costs 43 tokens per session (884 once invoked), scanned A, original, MIT.

A skill for repeatedly searching a codebase or external sources in up to three rounds, narrowing the search after each round. It separates confirmed facts from conclusions drawn from them.

In plain words
What is it for?
Use it for difficult codebase investigations, questions involving current documentation or issue status, conflicting search results, and research spanning files, symbols, and generated code.
Why use it?
A single broad search can miss relevant files or return too many unrelated results, making repository research unreliable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for difficult codebase investigations, questions involving current documentation or issue status, conflicting search results, and research spanning files, symbols, and generated code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/majiayu000/vibeguard/iterative-retrieval
Install

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.

Any agent
npx skills add majiayu000/vibeguard --skill iterative-retrieval
Clone the repo
git clone --depth 1 https://github.com/majiayu000/vibeguard

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for iterative-retrieval

README.md
[![agentmods](https://agentmods.dev/badge/skills/majiayu000/vibeguard/iterative-retrieval/github.svg)](https://agentmods.dev/skills/majiayu000/vibeguard/iterative-retrieval)
Your own site
<a href="https://agentmods.dev/skills/majiayu000/vibeguard/iterative-retrieval"><img src="https://agentmods.dev/badge/skills/majiayu000/vibeguard/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.

agentmods 80×15 button for iterative-retrieval

Your own site · 80×15
<a href="https://agentmods.dev/skills/majiayu000/vibeguard/iterative-retrieval"><img src="https://agentmods.dev/badge/skills/majiayu000/vibeguard/iterative-retrieval.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 884 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.00884
Opus 5 $0.00022 $0.00442
Sonnet 5 $0.00009 $0.00177
Haiku 4.5 $0.00004 $0.00088

Measured 10d ago against content hash 1ab57d288f66, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

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 10d 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.

skills/iterative-retrieval/SKILL.md · 113 lines

How it starts

The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Iterative Retrieval

Overview

In large code bases, one search is often not enough. This skill iterates through a search loop, gradually narrowing the scope and pinpointing the relevant code.

When to Activate

  • Research requires multiple searches because the first result set is incomplete or low-confidence.
  • A claim depends on current external documentation, issue state, API behavior, or release notes.
  • Search results disagree and need a refinement loop before conclusions are trusted.
  • A task needs fact/inference separation before implementation or recommendation.
  • A first search returns too many partially related results or misses the target surface.
  • A codebase question spans file names, symbols, docs, and generated artifacts.
  • A user needs evidence-backed repository orientation before implementation.

Red Flags

  • The same broad query is repeated without changing terms or scope.
  • Low-relevance results are read in depth before high-relevance anchors.
  • Search history is lost, so later conclusions cannot be traced back to evidence.

Checklist

  • Start with 2-3 concrete keywords from the user request.
  • Score search results before expanding into neighboring files.
  • Stop after three rounds with an explicit unresolved-questions list.

4 stage cycle

1. DISPATCH (distribution search)

  • Extract search keywords from requirements
  • Choose a search strategy:
    • Glob: Search by filename pattern
    • Grep: search by content keywords
    • AST: Search by code structure (function name, class name)
  • Launch multiple searches in parallel

2. EVALUATE (evaluation result)

Rate each search result (0-1):

Fraction Meaning Action
0.8-1.0 Highly relevant Reserved, further reading
0.5-0.7 Partially related Reserved, extract key information
0.2-0.4 Low correlation Record path, not in depth
0.0-0.1 Not relevant Discard

3. REFINE (refined query)

Adjust your search strategy based on the evaluation results:

  • Highly relevant results → Expand search in the same directory/same module
  • Low relevant results → Change keywords or search strategies
  • Discover new clues → Additional searches

Read the full file on GitHub · 113 lines

Changes

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.

  1. 10d ago First seen · 113 lines · 43 tokens per session scan A 1ab57d288f66

Subscribe to this mod's changes

iterative-retrieval is a skill published in the GitHub repository majiayu000/vibeguard (41 stars, last pushed today), licensed MIT. It adds 43 tokens to every session and 884 once invoked, about $0.0002 per session on Opus 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-08-30.

Related

Other skills, from other repositories

ring:exploring-codebases

Exploring a codebase across phases: scopes the target, detects architecture, components, and layers, deep-dives each discovered perspective, then synthesizes findings into actionable guidance with file:line evidence. Use to understand how a feature or system works before planning changes, or to orient on an unfamiliar…

LerianStudio/ring · 91 tokens

ring:instrumenting-streaming-events

Instrumenting streaming events: wires lib-streaming event emission end-to-end into a Lerian Go service via a 13-gate cycle (catalog, Builder bootstrap, Emit sites, outbox, HTTP manifest, NoopEmitter fallback, integration and chaos tests), dispatching ring:backend-go under TDD. Consumes the validated…

LerianStudio/ring · 102 tokens

ring:mapping-feature-relationships

Mapping how features relate and phasing the work: categorizing PRD features, grouping them into domains, charting cross-feature journeys, dependencies, and integration points, and defining the binding Phases that plan.md mirrors one-to-one at Gate 7. Gate 2 of ring:planning-large-features; runs after…

LerianStudio/ring · 104 tokens

ring:validating-ux-completeness

Validating that UX specifications are complete before technical design: a read-only checklist over wireframes, states, responsive behavior, accessibility, and component-library alignment, emitting a DESIGN VALIDATED / NEEDS REVISION verdict to design-validation.md. Standalone utility — run after a product-designer…

LerianStudio/ring · 113 tokens

ring:auditing-dependency-security

Auditing a dependency for supply-chain risk before install (pip/npm/go/cargo): checks typosquatting, maintainer/age risk, vulnerability DBs (OSV, GHSA, Socket), and lockfile hash pinning, then emits a risk score and approve/conditional/escalate/block decision. Use when adding or updating a dependency, reviewing a…

LerianStudio/ring · 102 tokens

ring:reviewing-docs

Reviewing end-user and product documentation quality across voice/tone, structure, completeness, clarity, and technical accuracy; flags issues with prioritized findings and a pass/needs-revision verdict. Use when reviewing draft docs, running a pre-publication check, auditing existing docs, or enforcing style-guide…

LerianStudio/ring · 88 tokens