Refine retrieved context iteratively to improve subagent understanding and output quality.
The material indicates this skill is essentially an open-source prompt/pattern document for iterative context retrieval. There is no evidence of required secrets, remote endpoints, or local execution capabilities, so the overall risk is low; given it is prompt-only, open-source, and highly adopted by the community, the dimensions lean safe overall.
The material explicitly states that no keys or environment variables are required, and the README shows no authentication flow, token configuration, or credential storage behavior; no clear credential leakage or abuse surface is evident.
The material explicitly states there are no remote endpoints. The README describes a retrieval/evaluation/refinement workflow pattern and provides no evidence of sending user data to external services or connecting to unknown hosts.
The system flags it as prompt-only, and the material appears to be methodological documentation with sample code rather than an executable agent or local command tool; there is no stated ability to spawn processes, run scripts, or invoke system privileges.
The README discusses a conceptual workflow for codebase context retrieval, but it does not declare actual file read/write interfaces, database access, or data permissions beyond the described task; based on the material, it remains documentation-level guidance.
The source is an open-source GitHub repository with very high community adoption (about 210k stars), both of which are strong risk-reducing signals. While the license is undeclared and maintenance status is unknown, that is incomplete information rather than a standalone high-risk red flag.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "iterative-retrieval" skill from askskill: 1. Download https://raw.githubusercontent.com/affaan-m/ECC/main/skills/iterative-retrieval/SKILL.md 2. Save it as ~/.claude/skills/iterative-retrieval/SKILL.md 3. Reload skills and tell me it's ready
Use the iterative-retrieval pattern. First identify the key information needed for my task, then retrieve the codebase, API docs, and past decision records in rounds. After each round, summarize missing context, and once enough context is gathered, provide the final implementation plan. Task: add refund status callback handling to the payment module.
A staged retrieval process, gap analysis after each round, and an implementation plan based on sufficient context.
Use the iterative-retrieval method to investigate this issue: an asynchronous job intermittently times out in production. First retrieve log patterns, then related service code, queue configuration, and recent change history. Narrow the scope step by step, then provide the most likely cause and validation steps.
A progressively narrowed investigation path, key evidence, the most likely root cause, and validation suggestions.
Apply the iterative-retrieval skill to assess whether we should refactor the user permission system. First list the background information needed, then retrieve requirement docs, current architecture notes, incident records, and team feedback in rounds, and finally produce a recommendation.
A list of information needs, round-by-round retrieval summaries, and an evidence-based recommendation.
Solves the "context problem" in multi-agent workflows where subagents don't know what context they need until they start working.
Subagents are spawned with limited context. They don't know:
Standard approaches fail:
A 4-phase loop that progressively refines context:
┌─────────────────────────────────────────────┐
│ │
│ ┌──────────┐ ┌──────────┐ │
│ │ DISPATCH │─────│ EVALUATE │ │
│ └──────────┘ └──────────┘ │
│ ▲ │ │
│ │ ▼ │
│ ┌──────────┐ ┌──────────┐ │
│ │ LOOP │─────│ REFINE │ │
│ └──────────┘ └──────────┘ │
│ │
│ Max 3 cycles, then proceed │
└─────────────────────────────────────────────┘
Initial broad query to gather candidate files:
// Start with high-level intent
const initialQuery = {
patterns: ['src/**/*.ts', 'lib/**/*.ts'],
keywords: ['authentication', 'user', 'session'],
excludes: ['*.test.ts', '*.spec.ts']
};
// Dispatch to retrieval agent
const candidates = await retrieveFiles(initialQuery);
Assess retrieved content for relevance:
function evaluateRelevance(files, task) {
return files.map(file => ({
path: file.path,
relevance: scoreRelevance(file.content, task),
reason: explainRelevance(file.content, task),
missingContext: identifyGaps(file.content, task)
}));
}
Scoring criteria:
Update search criteria based on evaluation:
function refineQuery(evaluation, previousQuery) {
return {
// Add new patterns discovered in high-relevance files
patterns: [...previousQuery.patterns, ...extractPatterns(evaluation)],
// Add terminology found in codebase
keywords: [...previousQuery.keywords, ...extractKeywords(evaluation)],
// Exclude confirmed irrelevant paths
excludes: [...previousQuery.excludes, ...evaluation
.filter(e => e.relevance < 0.2)
.map(e => e.path)
],
// Target specific gaps
focusAreas: evaluation
.flatMap(e => e.missingContext)
.filter(unique)
};
}
Repeat with refined criteria (max 3 cycles):
async function iterativeRetrieve(task, maxCycles = 3) {
let query = createInitialQuery(task);
let bestContext = [];
for (let cycle = 0; cycle < maxCycles; cycle++) {
const candidates = await retrieveFiles(query);
const evaluation = evaluateRelevance(candidates, task);
// Check if we have sufficient context
const highRelevance = evaluation.filter(e => e.relevance >= 0.7);
if (highRelevance.length >= 3 && !hasCriticalGaps(evaluation)) {
return highRelevance;
}
// Refine and continue
query = refineQuery(evaluation, query);
bestContext = mergeContext(bestContext, highRelevance);
}
return bestContext;
}
…
Design security and risk controls for autonomous trading agents with transaction authority
Build polished React and Next.js animations with reusable production-ready patterns.
Verify Laravel projects with environment checks, tests, security scans, and release readiness.
Write and review React 18/19 components using modern best practices.
Get production-ready MySQL and MariaDB schema, query, and operations patterns.
Process documents with OCR, conversion, extraction, redaction, signing, and form filling.
Execute implementation plans with task-specific subagents and code review checkpoints.
Execute implementation plans by splitting and advancing independent tasks in-session.
Give AI agents structured product context on evidence, opportunities, initiatives, and decisions.
Search local agent history quickly from the command line.
Run recursive decision rollouts with visible evidence trails and option comparisons.
Give AI agents durable memory, observable retrieval, and governed context assembly.