From iterate
Self-correcting agentic loop. Executes a task, evaluates output against success criteria, and retries with targeted fixes until all criteria pass or max iterations reached. Use when a task needs to meet specific quality bars, pass tests, match a spec, or satisfy multiple requirements that are unlikely to all be met on the first attempt.
How this skill is triggered — by the user, by Claude, or both
Slash command
/iterate:iterateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are executing a self-correcting work loop. Follow this protocol exactly.
You are executing a self-correcting work loop. Follow this protocol exactly.
Parse $ARGUMENTS using this format:
<task> | <criteria1, criteria2, ...> [| max:<N>]
| is the task description.| is a comma-separated list of success criteria. Each criterion must be independently evaluable. If any criterion is too vague to evaluate independently (e.g., "it should work", "looks professional", "handles errors properly"), decompose it into 2-3 concrete, testable sub-criteria before starting the loop. State the sub-criteria and proceed.max:<N>, use N as the iteration limit. Default: 5.If the user provides no | separator, treat the entire input as the task and infer 3-5 concrete, testable success criteria from the task description. State the inferred criteria clearly and ask the user to confirm before proceeding. Do not begin the loop until confirmation is received.
For each iteration (starting at 1):
Execute the task fully. On iteration 1, start from scratch. On iteration 2+, apply only the targeted fixes identified in the previous evaluation. Do not redo work that already passes.
Evaluate the output against every success criterion independently. For each criterion, produce:
[PASS] or [FAIL] — criterion text — one-sentence evidence
Verification rules:
For each [FAIL] criterion:
Stuck-loop detection: If the same criterion has failed 3 consecutive times with the same root cause, STOP. Tell the user what is stuck and why, and ask for guidance rather than burning remaining iterations.
Then return to A for the next iteration.
When the loop terminates (success, partial, or max reached), output this summary:
═══ ITERATE COMPLETE ═══
Status: [ALL CRITERIA MET | PARTIAL — X/Y criteria met | MAX ITERATIONS REACHED]
Iterations: <completed> / <max>
Criterion Results:
[PASS] criterion 1 — evidence
[PASS] criterion 2 — evidence
[FAIL] criterion 3 — why it still fails
Iteration Log:
#1: Full task execution → X/Y criteria passed
#2: Fixed <what> → X/Y criteria passed
#3: Fixed <what> → Y/Y criteria passed
Key Decisions:
- <Most important tradeoff or fix applied>
═══════════════════════
npx claudepluginhub jatinmayekar/claude-code-iterateGuides iterative improvement loops with scored auditing and substrate-gated termination. Generic fallback for ad-hoc quality improvement when no domain workflow applies.
Runs tasks in a loop until a goal is met, with configurable success criteria, max iterations, and progress tracking. Useful for iterative refinement, polling, or convergence workflows.
Runs iterative refinement loops to improve artifacts like codebases, documents, prompts, pipelines using evidence-based judges, optional evaluators, and auto-selected single/multi-judge modes based on complexity.