[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F9B0EWSY5XDWH467THSNRM":3,"skill-same:01M7F9B0EWSY5XDWH467THSNRM":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7F9B0EWSY5XDWH467THSNRM","iterative-retrieval",null,"Pattern for progressively refining context retrieval to solve the subagent context problem. Use when a subagent lacks the context it needs and retrieval must be refined across passes.","siddu1004\u002FSFP","siddu1004","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F260113491?v=4","01M7F8W1SAJAR49097VRTE1TW5","Siddhardh Vanguri","01M7F8W1SYGY7JE15AHAECCT9R",5,"MIT","https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fagent-dev\u002Fskills\u002Fiterative-retrieval\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: iterative-retrieval\ndescription: Pattern for progressively refining context retrieval to solve the subagent context problem. Use when a subagent lacks the context it needs and retrieval must be refined across passes.\nmetadata:\n  origin: ECC\n---\n\n# Iterative Retrieval Pattern\n\nSolves the \"context problem\" in multi-agent workflows where subagents don't know what context they need until they start working.\n\n## When to Activate\n\n- Spawning subagents that need codebase context they cannot predict upfront\n- Building multi-agent workflows where context is progressively refined\n- Encountering \"context too large\" or \"missing context\" failures in agent tasks\n- Designing RAG-like retrieval pipelines for code exploration\n- Optimizing token usage in agent orchestration\n\n## The Problem\n\nSubagents are spawned with limited context. They don't know:\n- Which files contain relevant code\n- What patterns exist in the codebase\n- What terminology the project uses\n\nStandard approaches fail:\n- **Send everything**: Exceeds context limits\n- **Send nothing**: Agent lacks critical information\n- **Guess what's needed**: Often wrong\n\n## The Solution: Iterative Retrieval\n\nA 4-phase loop that progressively refines context:\n\n```\n┌─────────────────────────────────────────────┐\n│                                             │\n│   ┌──────────┐      ┌──────────┐            │\n│   │ DISPATCH │─────│ EVALUATE │            │\n│   └──────────┘      └──────────┘            │\n│        ▲                  │                 │\n│        │                  ▼                 │\n│   ┌──────────┐      ┌──────────┐            │\n│   │   LOOP   │─────│  REFINE  │            │\n│   └──────────┘      └──────────┘            │\n│                                             │\n│        Max 3 cycles, then proceed           │\n└─────────────────────────────────────────────┘\n```\n\n### Phase 1: DISPATCH\n\nInitial broad query to gather candidate files:\n\n```javascript\n\u002F\u002F Start with high-level intent\nconst initialQuery = {\n  patterns: ['src\u002F**\u002F*.ts', 'lib\u002F**\u002F*.ts'],\n  keywords: ['authentication', 'user', 'session'],\n  excludes: ['*.test.ts', '*.spec.ts']\n};\n\n\u002F\u002F Dispatch to retrieval agent\nconst candidates = await retrieveFiles(initialQuery);\n```\n\n### Phase 2: EVALUATE\n\nAssess retrieved content for relevance:\n\n```javascript\nfunction evaluateRelevance(files, task) {\n  return files.map(file => ({\n    path: file.path,\n    relevance: scoreRelevance(file.content, task),\n    reason: explainRelevance(file.content, task),\n    missingContext: identifyGaps(file.content, task)\n  }));\n}\n```\n\nScoring criteria:\n- **High (0.8-1.0)**: Directly implements target functionality\n- **Medium (0.5-0.7)**: Contains related patterns or types\n- **Low (0.2-0.4)**: Tangentially related\n- **None (0-0.2)**: Not relevant, exclude\n\n### Phase 3: REFINE\n\nUpdate search criteria based on evaluation:\n\n```javascript\nfunction refineQuery(evaluation, previousQuery) {\n  return {\n    \u002F\u002F Add new patterns discovered in high-relevance files\n    patterns: [...previousQuery.patterns, ...extractPatterns(evaluation)],\n\n    \u002F\u002F Add terminology found in codebase\n    keywords: [...previousQuery.keywords, ...extractKeywords(evaluation)],\n\n    \u002F\u002F Exclude confirmed irrelevant paths\n    excludes: [...previousQuery.excludes, ...evaluation\n      .filter(e => e.relevance \u003C 0.2)\n      .map(e => e.path)\n    ],\n\n    \u002F\u002F Target specific gaps\n    focusAreas: evaluation\n      .flatMap(e => e.missingContext)\n      .filter(unique)\n  };\n}\n```\n\n### Phase 4: LOOP\n\nRepeat with refined criteria (max 3 cycles):\n\n```javascript\nasync function iterativeRetrieve(task, maxCycles = 3) {\n  let query = createInitialQuery(task);\n  let bestContext = [];\n\n  for (let cycle = 0; cycle \u003C maxCycles; cycle++) {\n    const candidates = await retrieveFiles(query);\n    const evaluation = evaluateRelevance(candidates, task);\n\n    \u002F\u002F Check if we have sufficient context\n    const highRelevance = evaluation.filter(e => e.relevance >= 0.7);\n    if (highRelevance.length >= 3 && !hasCriticalGaps(evaluation)) {\n      return highRelevance;\n    }\n\n    \u002F\u002F Refine and continue\n    query = refineQuery(evaluation, query);\n    bestContext = mergeContext(bestContext, highRelevance);\n  }\n\n  return bestContext;\n}\n```\n\n## Practical Examples\n\n### Example 1: Bug Fix Context\n\n```\nTask: \"Fix the authentication token expiry bug\"\n\nCycle 1:\n  DISPATCH: Search for \"token\", \"auth\", \"expiry\" in src\u002F**\n  EVALUATE: Found auth.ts (0.9), tokens.ts (0.8), user.ts (0.3)\n  REFINE: Add \"refresh\", \"jwt\" keywords; exclude user.ts\n\nCycle 2:\n  DISPATCH: Search refined terms\n  EVALUATE: Found session-manager.ts (0.95), jwt-utils.ts (0.85)\n  REFINE: Sufficient context (2 high-relevance files)\n\nResult: auth.ts, tokens.ts, session-manager.ts, jwt-utils.ts\n```\n\n### Example 2: Feature Implementation\n\n```\nTask: \"Add rate limiting to API endpoints\"\n\nCycle 1:\n  DISPATCH: Search \"rate\", \"limit\", \"api\" in routes\u002F**\n  EVALUATE: No matches - codebase uses \"throttle\" terminology\n  REFINE: Add \"throttle\", \"middleware\" keywords\n\nCycle 2:\n  DISPATCH: Search refined terms\n  EVALUATE: Found throttle.ts (0.9), middleware\u002Findex.ts (0.7)\n  REFINE: Need router patterns\n\nCycle 3:\n  DISPATCH: Search \"router\", \"express\" patterns\n  EVALUATE: Found router-setup.ts (0.8)\n  REFINE: Sufficient context\n\nResult: throttle.ts, middleware\u002Findex.ts, router-setup.ts\n```\n\n## Integration with Agents\n\nUse in agent prompts:\n\n```markdown\nWhen retrieving context for this task:\n1. Start with broad keyword search\n2. Evaluate each file's relevance (0-1 scale)\n3. Identify what context is still missing\n4. Refine search criteria and repeat (max 3 cycles)\n5. Return files with relevance >= 0.7\n```\n\n## Best Practices\n\n1. **Start broad, narrow progressively** - Don't over-specify initial queries\n2. **Learn codebase terminology** - First cycle often reveals naming conventions\n3. **Track what's missing** - Explicit gap identification drives refinement\n4. **Stop at \"good enough\"** - 3 high-relevance files beats 10 mediocre ones\n5. **Exclude confidently** - Low-relevance files won't become relevant\n\n## Related\n\n- [The Longform Guide](https:\u002F\u002Fx.com\u002Faffaanmustafa\u002Fstatus\u002F2014040193557471352) - Subagent orchestration section\n- `continuous-learning` skill - For patterns that improve over time\n- Agent definitions bundled with ECC (manual install path: `agents\u002F`)\n","# Iterative Retrieval Pattern\n\nSolves the \"context problem\" in multi-agent workflows where subagents don't know what context they need until they start working.\n\n## When to Activate\n\n- Spawning subagents that need codebase context they cannot predict upfront\n- Building multi-agent workflows where context is progressively refined\n- Encountering \"context too large\" or \"missing context\" failures in agent tasks\n- Designing RAG-like retrieval pipelines for code exploration\n- Optimizing token usage in agent orchestration\n\n## The Problem\n\nSubagents are spawned with limited context. They don't know:\n- Which files contain relevant code\n- What patterns exist in the codebase\n- What terminology the project uses\n\nStandard approaches fail:\n- **Send everything**: Exceeds context limits\n- **Send nothing**: Agent lacks critical information\n- **Guess what's needed**: Often wrong\n\n## The Solution: Iterative Retrieval\n\nA 4-phase loop that progressively refines context:\n\n```\n┌─────────────────────────────────────────────┐\n│                                             │\n│   ┌──────────┐      ┌──────────┐            │\n│   │ DISPATCH │─────│ EVALUATE │            │\n│   └──────────┘      └──────────┘            │\n│        ▲                  │                 │\n│        │                  ▼                 │\n│   ┌──────────┐      ┌──────────┐            │\n│   │   LOOP   │─────│  REFINE  │            │\n│   └──────────┘      └──────────┘            │\n│                                             │\n│        Max 3 cycles, then proceed           │\n└─────────────────────────────────────────────┘\n```\n\n### Phase 1: DISPATCH\n\nInitial broad query to gather candidate files:\n\n```javascript\n\u002F\u002F Start with high-level intent\nconst initialQuery = {\n  patterns: ['src\u002F**\u002F*.ts', 'lib\u002F**\u002F*.ts'],\n  keywords: ['authentication', 'user', 'session'],\n  excludes: ['*.test.ts', '*.spec.ts']\n};\n\n\u002F\u002F Dispatch to retrieval agent\nconst candidates = await retrieveFiles(initialQuery);\n```\n\n### Phase 2: EVALUATE\n\nAssess retrieved content for relevance:\n\n```javascript\nfunction evaluateRelevance(files, task) {\n  return files.map(file => ({\n    path: file.path,\n    relevance: scoreRelevance(file.content, task),\n    reason: explainRelevance(file.content, task),\n    missingContext: identifyGaps(file.content, task)\n  }));\n}\n```\n\nScoring criteria:\n- **High (0.8-1.0)**: Directly implements target functionality\n- **Medium (0.5-0.7)**: Contains related patterns or types\n- **Low (0.2-0.4)**: Tangentially related\n- **None (0-0.2)**: Not relevant, exclude\n\n### Phase 3: REFINE\n\nUpdate search criteria based on evaluation:\n\n```javascript\nfunction refineQuery(evaluation, previousQuery) {\n  return {\n    \u002F\u002F Add new patterns discovered in high-relevance files\n    patterns: [...previousQuery.patterns, ...extractPatterns(evaluation)],\n\n    \u002F\u002F Add terminology found in codebase\n    keywords: [...previousQuery.keywords, ...extractKeywords(evaluation)],\n\n    \u002F\u002F Exclude confirmed irrelevant paths\n    excludes: [...previousQuery.excludes, ...evaluation\n      .filter(e => e.relevance \u003C 0.2)\n      .map(e => e.path)\n    ],\n\n    \u002F\u002F Target specific gaps\n    focusAreas: evaluation\n      .flatMap(e => e.missingContext)\n      .filter(unique)\n  };\n}\n```\n\n### Phase 4: LOOP\n\nRepeat with refined criteria (max 3 cycles):\n\n```javascript\nasync function iterativeRetrieve(task, maxCycles = 3) {\n  let query = createInitialQuery(task);\n  let bestContext = [];\n\n  for (let cycle = 0; cycle \u003C maxCycles; cycle++) {\n    const candidates = await retrieveFiles(query);\n    const evaluation = evaluateRelevance(candidates, task);\n\n    \u002F\u002F Check if we have sufficient context\n    const highRelevance = evaluation.filter(e => e.relevance >= 0.7);\n    if (highRelevance.length >= 3 && !hasCriticalGaps(evaluation)) {\n      return highRelevance;\n    }\n\n    \u002F\u002F Refine and continue\n    query = refineQuery(evaluation, query);\n    bestContext = mergeContext(bestContext, highRelevance);\n  }\n\n  return bestContext;\n}\n```\n\n## Practical Examples\n\n### Example 1: Bug Fix Context\n\n```\nTask: \"Fix the authentication token expiry bug\"\n\nCycle 1:\n  DISPATCH: Search for \"token\", \"auth\", \"expiry\" in src\u002F**\n  EVALUATE: Found auth.ts (0.9), tokens.ts (0.8), user.ts (0.3)\n  REFINE: Add \"refresh\", \"jwt\" keywords; exclude user.ts\n\nCycle 2:\n  DISPATCH: Search refined terms\n  EVALUATE: Found session-manager.ts (0.95), jwt-utils.ts (0.85)\n  REFINE: Sufficient context (2 high-relevance files)\n\nResult: auth.ts, tokens.ts, session-manager.ts, jwt-utils.ts\n```\n\n### Example 2: Feature Implementation\n\n```\nTask: \"Add rate limiting to API endpoints\"\n\nCycle 1:\n  DISPATCH: Search \"rate\", \"limit\", \"api\" in routes\u002F**\n  EVALUATE: No matches - codebase uses \"throttle\" terminology\n  REFINE: Add \"throttle\", \"middleware\" keywords\n\nCycle 2:\n  DISPATCH: Search refined terms\n  EVALUATE: Found throttle.ts (0.9), middleware\u002Findex.ts (0.7)\n  REFINE: Need router patterns\n\nCycle 3:\n  DISPATCH: Search \"router\", \"express\" patterns\n  EVALUATE: Found router-setup.ts (0.8)\n  REFINE: Sufficient context\n\nResult: throttle.ts, middleware\u002Findex.ts, router-setup.ts\n```\n\n## Integration with Agents\n\nUse in agent prompts:\n\n```markdown\nWhen retrieving context for this task:\n1. Start with broad keyword search\n2. Evaluate each file's relevance (0-1 scale)\n3. Identify what context is still missing\n4. Refine search criteria and repeat (max 3 cycles)\n5. Return files with relevance >= 0.7\n```\n\n## Best Practices\n\n1. **Start broad, narrow progressively** - Don't over-specify initial queries\n2. **Learn codebase terminology** - First cycle often reveals naming conventions\n3. **Track what's missing** - Explicit gap identification drives refinement\n4. **Stop at \"good enough\"** - 3 high-relevance files beats 10 mediocre ones\n5. **Exclude confidently** - Low-relevance files won't become relevant\n\n## Related\n\n- [The Longform Guide](https:\u002F\u002Fx.com\u002Faffaanmustafa\u002Fstatus\u002F2014040193557471352) - Subagent orchestration section\n- `continuous-learning` skill - For patterns that improve over time\n- Agent definitions bundled with ECC (manual install path: `agents\u002F`)\n",{"name":5,"metadata":24,"description":7},{"origin":25},"ECC","main","15fa5201935d2b1d172b4e61c2360c908d876d20","plugins\u002Fagent-dev\u002Fskills\u002Fiterative-retrieval",0,"https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fsfp-hive","https:\u002F\u002Fgithub.com\u002Fsiddu1004","I am a student at Amrita Vishwa Vidyapeetham pursuing my BTECH degree in Electronics and Electrical Engineering (2024-2028).","2026-11-09 16:04:40",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add siddu1004\u002FSFP --skill iterative-retrieval",{"tool":41,"command":42},"bunx","bunx skills add siddu1004\u002FSFP --skill iterative-retrieval",{"tool":44,"command":45},"pnpm","pnpm dlx skills add siddu1004\u002FSFP --skill iterative-retrieval","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fagent-dev\u002Fskills\u002Fiterative-retrieval\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7FEEDADZBNBVY19H3XZKCBQ","scientific-schematics","Generates scientific diagram drafts using Nano Banana 2 AI with smart iterative refinement. Uses Gemini 3.7 Flash for quality review. Refines when the review requests improvement, with at most two generations. Specialized in neural network architectures, system diagrams, flowcharts, biological pathways, and complex scientific visualizations.","https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fscience-hardware\u002Fskills\u002Fscientific-schematics\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7FEE0JS04FE58MST48D0MMC","polyhaven-texture-apply","Apply realistic PBR textures from PolyHaven to any Blender object. Supports metals, wood, concrete, fabric, and more. Trigger when asked to texture an object, apply a material from PolyHaven, make something look like metal\u002Fwood\u002Fmarble, or change object surface.","https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fscience-hardware\u002Fskills\u002Fpolyhaven-texture-apply\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7FEDJRWV194TY411WVRS84W","polyhaven-studio-setup","Set up a professional product photography studio in Blender using PolyHaven HDRIs and PBR ground materials. Trigger when asked to create a studio setup, add HDRI lighting, set up product photography, or create a showroom scene.","https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fscience-hardware\u002Fskills\u002Fpolyhaven-studio-setup\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7FED5H2FGS50XGETMGSM0RV","polyhaven-scene-builder","Build complete product scenes using PolyHaven assets — HDRI environment, textured ground\u002Fpedestal, and optional props from the 3D model library. Trigger when asked to build a product scene, create a showcase setup, add a pedestal, or compose a product shot.","https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fscience-hardware\u002Fskills\u002Fpolyhaven-scene-builder\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7FECSNZ2CJA7Z8TPE5R844R","polyhaven-material-swap","Cycle through multiple PolyHaven materials on a product and render each variant. Great for showing color\u002Ffinish options. Trigger when asked to show material variants, swap textures, create color options, show finish comparisons, or render product in different materials.","https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fscience-hardware\u002Fskills\u002Fpolyhaven-material-swap\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7FECBPQ6YWH48PYAMS0C5CE","polyhaven-hdri-showcase","Render the same product across multiple HDRI environments and output a comparison grid. Trigger when asked to compare lighting setups, test different environments, show product in multiple settings, or create an HDRI comparison.","https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fscience-hardware\u002Fskills\u002Fpolyhaven-hdri-showcase\u002FSKILL.md",[],[]]