Iterative Retrieval

Pattern for progressively refining context retrieval to solve the subagent context problem

32 stars 5 forksAI, LLMs & Agents

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add joneqian/claude-skills-suite --skill iterative-retrieval
Manual install
git clone --depth 1 https://github.com/joneqian/claude-skills-suite.git /tmp/claude-skills-suite
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills-suite/skills/iterative-retrieval ~/.claude/skills/iterative-retrieval

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Iterative Retrieval Pattern

Solves the "context problem" in multi-agent workflows where subagents don't know what context they need until they start working.

## The Problem

Subagents are spawned with limited context. They don't know:
- Which files contain relevant code
- What patterns exist in the codebase
- What terminology the project uses

Standard approaches fail:
- **Send everything**: Exceeds context limits
- **Send nothing**: Agent lacks critical information
- **Guess what's needed**: Often wrong

## The Solution: Iterative Retrieval

A 4-phase loop that progressively refines context:

```
┌─────────────────────────────────────────────┐
│                                             │
│   ┌──────────┐      ┌──────────┐            │
│   │ DISPATCH │─────▶│ EVALUATE │            │
│   └──────────┘      └──────────┘            │
│        ▲                  │                 │
│        │                  ▼                 │
│   ┌──────────┐      ┌──────────┐            │
│   │   LOOP   │◀─────│  REFINE  │            │
│   └──────────┘      └──────────┘            │
│                                             │
│        Max 3 cycles, then proceed           │
└─────────────────────────────────────────────┘
```

### Phase 1: DISPATCH

Initial broad query to gather candidate files:
Read the full skill on GitHub

Details

Skill name
iterative-retrieval
Path
skills/iterative-retrieval/SKILL.md
License
MIT
Repo updated
10 February 2026
Copies
Found in 2 GitHub repos

FAQ

What does the Iterative Retrieval skill do?

Pattern for progressively refining context retrieval to solve the subagent context problem

How do I install the Iterative Retrieval skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add joneqian/claude-skills-suite --skill iterative-retrieval. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Iterative Retrieval popular?

It lives in joneqian/claude-skills-suite, which has 32 GitHub stars and 5 forks.

Related skills

TDD Workflow

32

joneqian/claude-skills-suite

Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.

Testing & QA

Security Review

32

joneqian/claude-skills-suite

Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.

Security

Continuous Learning V2

32

joneqian/claude-skills-suite

Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.

Learning & Education

Pattern Recognition Specialist

59

ratacat/claude-skills

Use this agent when you need to analyze code for design patterns, anti-patterns, naming conventions, and code duplication. This agent excels at identifying architectural patterns, detecting code smells, and ensuring consistency across the codebase. <example>Context: The user wants to analyze their codebase for patterns and potential issues.\ user: "Can you check our codebase for design patterns and anti-patterns?"\ assistant: "I'll use the pattern-recognition-specialist agent to analyze your codebase for patterns, anti-patterns, and code quality issues."\ <commentary>Since the user is asking f

AI, LLMs & Agents10

Design Iterator

59

ratacat/claude-skills

Use this agent PROACTIVELY when design work isn't coming together on the first attempt. If you've made 1-2 design changes and the result still feels off, suggest using this agent with 5x or 10x iterations for deeper refinement. This agent takes screenshots, analyzes what's not working, implements improvements, and repeats N times to systematically fix design issues. Perfect when colors feel wrong, layouts aren't balanced, or the overall aesthetic needs work that single changes can't achieve. <example>Context: User asks to change button color but result still looks off. user: "Change the button

AI, LLMs & Agents10

Performance Oracle

59

ratacat/claude-skills

Use this agent when you need to analyze code for performance issues, optimize algorithms, identify bottlenecks, or ensure scalability. This includes reviewing database queries, memory usage, caching strategies, and overall system performance. The agent should be invoked after implementing features or when performance concerns arise.\ \ <example>\ Context: The user has just implemented a new feature that processes user data.\ user: "I've implemented the user analytics feature. Can you check if it will scale?"\ assistant: "I'll use the performance-oracle agent to analyze the scalability and perf

AI, LLMs & Agents10

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.