Iterative Retrieval
affaan-m/ECC
Pattern for progressively refining context retrieval to solve the subagent context problem.
Iteratively review and revise a plan until no new findings survive evaluation.
$ npx skills add tobihagemann/turbo --skill refine-plan -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install tobihagemann/turbo refine-plan --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/tobihagemann/turbo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/codex/skills/refine-plan .claude/skills/refine-plan && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "refine-plan" agent skill from https://github.com/tobihagemann/turbo/tree/main/codex/skills/refine-plan into .claude/skills/refine-plan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refine-plan", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/tobihagemann/turbo/tree/main/codex/skills/refine-planType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add tobihagemann/turbo --skill refine-plan -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install tobihagemann/turbo refine-plan --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tobihagemann/turbo.git skills-src && mkdir -p .agents/skills && cp -r skills-src/codex/skills/refine-plan .agents/skills/refine-plan && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "refine-plan" agent skill from https://github.com/tobihagemann/turbo/tree/main/codex/skills/refine-plan into .agents/skills/refine-plan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refine-plan", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add tobihagemann/turbo --skill refine-plan -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install tobihagemann/turbo refine-plan --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tobihagemann/turbo.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/codex/skills/refine-plan .cursor/skills/refine-plan && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "refine-plan" agent skill from https://github.com/tobihagemann/turbo/tree/main/codex/skills/refine-plan into .cursor/skills/refine-plan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refine-plan", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/tobihagemann/turbo.git --path codex/skills/refine-plan--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add tobihagemann/turbo --skill refine-plan -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install tobihagemann/turbo refine-plan --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tobihagemann/turbo.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/codex/skills/refine-plan .gemini/skills/refine-plan && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "refine-plan" agent skill from https://github.com/tobihagemann/turbo/tree/main/codex/skills/refine-plan into .gemini/skills/refine-plan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refine-plan", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install tobihagemann/turbo refine-planInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add tobihagemann/turbo --skill refine-plan -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/tobihagemann/turbo.git skills-src && mkdir -p .github/skills && cp -r skills-src/codex/skills/refine-plan .github/skills/refine-plan && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "refine-plan" agent skill from https://github.com/tobihagemann/turbo/tree/main/codex/skills/refine-plan into .github/skills/refine-plan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refine-plan", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add tobihagemann/turbo --skill refine-plan -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install tobihagemann/turbo refine-plan --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tobihagemann/turbo.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/codex/skills/refine-plan .opencode/skills/refine-plan && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "refine-plan" agent skill from https://github.com/tobihagemann/turbo/tree/main/codex/skills/refine-plan into .opencode/skills/refine-plan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refine-plan", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
refine-planIteratively review and revise a plan until no new findings survive evaluation.
Refine Plan is an agent skill from tobihagemann/turbo. Iteratively review and revise a plan until no new findings survive evaluation. Use when the user asks to "refine the plan", "iterate on the plan", "tighten the plan", or "improve the plan".
Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The repository describes itself as: Reusable workflows for planning, building, reviewing, and shipping with Claude Code and Codex. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 931eda5. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Refine Plan loads about 2.7k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 1,648 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from tobihagemann/turbo at commit 931eda5, republished under its MIT licence (© tobihagemann). 1,648 words, ~2,710 tokens.
.claude/skills/refine-plan/SKILL.md (or your agent's skills folder).Loop the review pipeline over a plan until no new findings are accepted. Writes back to the plan file in place.
At the start of every invocation (including re-runs from Step 5), use update_plan to track each step, restating any remaining steps of a parent workflow alongside them:
$review-plan skill$evaluate-findings skill$apply-findings skill$refine-plan skill if changed.turbo/plans/<slug>.md.turbo/plans/*.md. If exactly one file exists, use it.turbo/plan.md if .turbo/plans/ does not exist$turboplan and stopIf multiple candidates exist and the choice is non-obvious, use request_user_input.
State the resolved path before continuing.
Unless an explicit path or slug was passed, or .turbo/loops/<slug>.md exists with Status: active, confirm the resolved plan still describes work that remains to be done. The signal is a frontmatter status: of done.
When the signal fires, output it as text. Then use request_user_input to offer:
.turbo/plans/, then confirm that plan against this same signalOn Leave the plan alone, call update_plan to drop the remaining refine steps, restating any remaining steps of a parent workflow, then continue with the next step of the active workflow.
Loop state lives at .turbo/loops/<slug>.md — slug from the resolved plan; for a legacy single-file fallback, use the file's basename. At the start of every invocation, read the ledger if it exists.
Status: line is closed): write a fresh ledger with Status: active, then attempt create_goal with the objective: "Run the $refine-plan loop on <plan path> until converged: a run with no changes, a prose-only round, or remaining findings that do not justify another re-run. Loop state: .turbo/loops/<slug>.md; re-read it after any context compaction and do not re-adjudicate findings it records as rejected. Mark this goal complete when the loop converges." If an unfinished goal already exists, an outer workflow owns it; continue without creating one.Status: active): this invocation is the iteration after the last one the ledger records, whether a Step 5 re-run or a resumption after an interruption. Continue from the recorded state. If no unfinished goal exists, attempt create_goal with the same objective as a fresh loop.Status: closed; if this loop created the goal, mark it complete with update_goal. An inherited goal stays active for the outer workflow. A halt on an unresolved failure leaves Status: active and the goal untouched, so the next invocation resumes the recorded state.$review-plan SkillRun the $review-plan skill on the resolved plan.
Always run this step even if the plan looks polished.
$evaluate-findings SkillRun the $evaluate-findings skill on the review findings from Step 2.
$apply-findings SkillRun the $apply-findings skill on the evaluated results.
$refine-plan Skill if ChangedCheck whether the plan file was edited during Step 4. Any edit counts.
Iteration 1 is the initial run; iteration 2 is the first auto-re-run; and so on. The loop is not capped; it terminates on its own: when a run makes no changes, when a round makes only prose-only edits, or when you judge a further re-run pointless.
If changes were made, classify what Step 4 edited:
$refine-plan again by reading and following the installed skill instructions, passing the resolved path. If the round contains both structural and prose-only edits, treat it as structural and re-run automatically.If changes were made but you judge a re-run unnecessary, output a summary of what changed and your reasoning for stopping, then stop instead of re-running.
Judge convergence by the trend across iterations: when rounds have stopped surfacing defects (contradictions, infeasible steps, missing requirements) and keep surfacing improvements of kinds earlier rounds already applied, a further re-run is pointless even though the edits were structural. A round that surfaces no defects is the termination signal; never add a confirmation round, an extra reviewer, or review steps beyond this skill's own.
Judge the kind of surviving defect as well as the trend. Once earlier rounds have drained the design- and requirement-level defects and a round's findings are dominated by claims that a named identifier does not exist or does not match its declaration, the plan has passed the point where reviewing it as text pays, even when the count is rising and every finding is genuine. Implementation surfaces that class immediately; a further re-run is pointless. Expect any round that adds mechanism to seed defects at the seams it creates.
When a round's findings turn on behavior nobody has observed, either how a platform, framework, or dependency behaves, or what a plan-specified algorithm produces on its inputs, prefer a cheap instrumented experiment to another review round. Run it in a temp directory outside the repo, and record what it shows in the plan before judging whether another round is warranted. For a plan-specified algorithm, write it as a script there, assert the plan's stated postconditions over randomized and degenerate inputs, and rewrite its rule only from what that run shows. When only a person's real input can show the behavior, such as keyboard focus or a gesture, use request_user_input to ask the user for a short hands-on check in place of the experiment, and record what they report the same way. Mark a behavior that could not be observed as unobserved.
When the same class of defect recurs across iterations, stop patching the individual instance and instead write the root-cause invariant into the plan itself, enumerating the worked failures it must prevent. Count a defect that swings to the opposite failure after its fix, such as a check found too strict in one round and too lax in the next, as the same class recurring. In the same pass, re-read the whole plan against the new invariant and fix every instance it catches, including text written before the invariant existed. Treat recurrence on a new axis of the same invariant as a signal that the invariant is incomplete: widen it to cover the new axis rather than assuming the latest fix failed. When the recurring defect turns on behavior nobody has observed, run that experiment, or ask for that hands-on check, before writing the invariant: an invariant derived from reasoning can be wrong in exactly the way the mechanism it replaces was wrong, and every later round is measured against it.
When successive rounds move away from each alternative in turn on a different ground and the loop arrives back at a design an earlier round left behind, treat that as evidence the first finding's severity was misjudged against the alternatives' failure modes. Re-examine that finding rather than inventing another mechanism: when the earlier design survives the comparison, adopt it and record that finding as Skip, citing the alternatives' failure modes; when the user chose the direction that displaced it, surface it as Escalate, naming the original decision and this evidence beside it.
When a round has adopted a scope narrowing to limit blast radius, check that the narrowing is derivable. The narrow case is implementable only when the fact distinguishing it from the broad case is available to the implementation at the point the rule runs, whether from persisted state, the request, configuration, or data already at hand; when nothing supplies that fact, the two cases are indistinguishable at runtime and the rule silently strands whatever it excludes. Widen back to the broad case rather than carrying a rule nothing can evaluate, unless the user chose the narrowing: then surface it as Escalate, naming the original decision and this evidence beside it.
The re-invocation is a full, fresh run of this skill. Every step (1-5) executes with its own task tracking and skill invocations. When the classification above sends the run into another iteration, supply that iteration with every rejected and escalated verdict the ledger records, across this run and earlier iterations, as the already-adjudicated list for $review-plan, one line each: the finding, its verdict, and the recorded reason. Source it from the ledger rather than from in-context state, which compaction drops. A finding that re-proposes a design an earlier round left behind stays in scope regardless of the list: the alternatives having since failed on their own grounds is evidence the earlier reason did not account for, and it is the signal the rule above depends on.
Then call update_plan to mark this step completed and continue with the next step of the active workflow.
Added or removed steps, new or removed design decisions, rewired dependencies between steps, changed acceptance criteria, changed the deployment's stated bounds, changed testing strategy.
$evaluate-findings is a judgment gate that must run before $apply-findings touches the plan. Each step must invoke its designated skill by reading and following the installed skill instructions..turbo/, the plan file is the only file that should change.© tobihagemann, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in codex/skills/refine-plan of tobihagemann/turbo.
Open the folder on GitHubat commit 931eda5
Refine Plan next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Refine Plan this skilltobihagemann/turbo | 408 | — | ~2.7k | Automated safety check: Pass | MIT | |
| Iterative Retrievalaffaan-m/ECC | 277k | 7 repos | ~1.6k | Automated safety check: Pass | MIT | |
| Agent Refinementruvnet/ruflo | 74k | 2 repos | ~3.5k | Automated safety check: Pass | MIT | |
| Find Releaseflutter/flutter | 180k | — | ~545 | Automated safety check: Pass | BSD-3-Clause | |
| Iterate Refinement Notesproduct-on-purpose/pm-skills | 716 | — | ~855 | Automated safety check: Pass | Apache-2.0 | |
| Refinewindmill-labs/windmill | 18k | — | ~420 | Automated safety check: Pass | Custom licence |
affaan-m/ECC
Pattern for progressively refining context retrieval to solve the subagent context problem.
ruvnet/ruflo
Agent skill for refinement - invoke with $agent-refinement. An agent skill from ruvnet/ruflo.
flutter/flutter
A skill to find the lowest Dart and Flutter release containing a given commit.
product-on-purpose/pm-skills
Documents backlog refinement session outcomes including stories refined, estimates, questions raised, and decisions made.
windmill-labs/windmill
End-of-session reflection. An agent skill from windmill-labs/windmill.
ComposioHQ/awesome-claude-skills
Automate Refiner tasks via Rube MCP (Composio). An agent skill from ComposioHQ/awesome-claude-skills.
tobihagemann/turbo
Consult ChatGPT Pro via ChatGPT browser automation for problems that resist standard approaches.
tobihagemann/turbo
Fetch and summarize review feedback and conversation from a GitHub PR (unresolved review threads, review bodies, and PR conversation comments) without making changes.
tobihagemann/turbo
Recall why a past change was made by locating the Claude Code transcript that produced it.
tobihagemann/turbo
Evaluate, fix, answer, and reply to GitHub pull request review comments and conversation comments.
tobihagemann/turbo
Evaluate, fix, answer, and reply to GitHub pull request review comments and conversation comments.
tobihagemann/turbo
Assess project-wide structural technical debt: complexity hotspots, deprecated API usage, duplication clusters, architecture rot, and low-value tests.
Iteratively review and revise a plan until no new findings survive evaluation. Refine Plan is an agent skill from tobihagemann/turbo. Iteratively review and revise a plan until no new findings survive evaluation.
Refine Plan fits situations like: the user asks to refine the plan; iterate on the plan; tighten the plan; improve the plan.
Run `npx skills add tobihagemann/turbo --skill refine-plan -a claude-code`. Or copy the skill folder (codex/skills/refine-plan in tobihagemann/turbo) into .claude/skills/refine-plan in your project. Claude Code loads it when a task matches its description.
Run `npx skills add tobihagemann/turbo --skill refine-plan -a codex`. Or copy the skill folder (codex/skills/refine-plan in tobihagemann/turbo) into .agents/skills/refine-plan in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tobihagemann/turbo --skill refine-plan -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/refine-plan, .gemini/skills/refine-plan, .github/skills/refine-plan and .opencode/skills/refine-plan in your project.
SKILL.md names no scripts, command-line tools or credentials: Refine Plan is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Refine Plan is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Refine Plan: Iterative Retrieval (affaan-m/ECC, 277k stars), Agent Refinement (ruvnet/ruflo, 74k stars), Find Release (flutter/flutter, 180k stars) and Iterate Refinement Notes (product-on-purpose/pm-skills, 716 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
tobihagemann (a GitHub user) maintains it in tobihagemann/turbo, which has 408 GitHub stars. The repository holds 81 skills in this directory. The repository was last updated on October 9, 2026.
Source: tobihagemann/turbo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.