From code
Enables /code orchestrators to iteratively refine sub-agent queries through a 4-phase protocol with follow-ups, ensuring sufficient context for incomplete summaries due to semantic gaps.
npx claudepluginhub closedloop-ai/claude-plugins --plugin codeThis skill uses the workspace's default tool permissions.
This skill enables orchestrators to iteratively refine sub-agent queries through follow-up questions, ensuring sub-agents gather sufficient context before the orchestrator accepts their output. This addresses the problem where orchestrators have semantic context that sub-agents lack, leading to incomplete summaries.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
This skill enables orchestrators to iteratively refine sub-agent queries through follow-up questions, ensuring sub-agents gather sufficient context before the orchestrator accepts their output. This addresses the problem where orchestrators have semantic context that sub-agents lack, leading to incomplete summaries.
This skill is designed for the /code orchestrator only (code.md slash command). Sub-agents do not use this skill - they simply respond to queries. The orchestrator is responsible for evaluating responses and deciding whether to resume with follow-ups.
Note: Sub-agents do NOT see this skill documentation in their context. Only the orchestrator can invoke and follow the protocol. Sub-agents are unaware they're part of an iterative retrieval loop - they just respond to queries and follow-ups as normal requests.
This skill is optional and opt-in. Not every sub-agent call benefits from iterative refinement - simple lookups or well-defined queries don't need it. Invoke this skill when you anticipate that a sub-agent may return incomplete context due to semantic gaps.
This protocol provides a structured approach to iterative context gathering. All 4 phases represent the recommended workflow, but phases 2-4 are optional if the initial response is sufficient. Exercise judgment - if Phase 2 evaluation shows context is sufficient on first pass, phases 3-4 aren't needed.
Define and dispatch the initial query with full context:
Evaluate whether the sub-agent's response provides sufficient context using the checklist below. If context is sufficient, skip to output (phases 3-4 not needed). If gaps exist, proceed to Phase 3.
Ask yourself these 4 questions:
If you answer "no" to question 1 or 4, OR "yes" to questions 2 or 3, the context is likely insufficient - proceed to Phase 3.
Resume the sub-agent with targeted follow-up questions:
Repeat Phases 2-3 until one of these conditions is met:
The recommended maximum is 3 refinement cycles (initial dispatch + 2 follow-ups). This balances thoroughness against cost and latency.
Important: This is a recommendation, not an enforced limit. As guidance documentation, this skill cannot enforce limits - the orchestrator has final judgment. However, exceeding 3 cycles often indicates:
When iterative retrieval completes, report:
Example:
Iterative Retrieval Summary:
- Cycles used: 2 (initial + 1 follow-up)
- Additional context gathered: Error handling patterns, retry logic implementation, timeout configuration
- Agent ID: agent-abc123 (available for resumption)
For detailed usage examples, see references/examples.md (if available).