Executes a task repeatedly, evaluating the output against a quality condition after each iteration. Continues refining until the condition is met or max iterations reached. Each iteration builds on the previous output. Useful for progressive improvement of content, code, or designs.
SkillScore87Maintained
Automatic
◆Coding pack
Last verified 8/27/2026
What it changes
Passed 19 of 22 test cases with the skill, and 5 of 22 without it.
Without skill22%
With skill87%
Checks it passed that the model alone missed
The output uses the /loop command format.
The output states that report is the final stage.
The command includes the flag --max-iterations set to 3.
and 19 more in the full report
15 fixed5 passed either way3 still failing0 broke
Pass-rate lift
+65 pp
Tokens
-34%
Agent turns
0%
Response time
-58%
Model gemini-3.6-flashMeasured 8/27/2026v120 of 23 cases passed with skill · 22 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 14 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 14
Prompt
Provide the loop invocation to repeatedly fix failing integration tests in the billing service until all integration tests pass, capping the total attempts at 3.
What was checked, without and with the skill
Checked
Without skill
With skill
The output uses the /loop command format.
Missed
Passed
The command includes the flag --max-iterations set to 3.
Missed
Passed
case-06 · gemini-3.6-flash · 8/27/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md30 linessingle file
/loop
Run an iterative refinement loop until a quality threshold is met.
Executes a task repeatedly, evaluating the output against a quality condition after each iteration. Continues refining until the condition is met or max iterations reached. Each iteration builds on the previous output. Useful for progressive improvement of content, code, or designs.
Implementation
Initial execution -- run the task, produce first output.
Evaluate -- check output against the condition (quality score, test pass, criteria met).
Refine -- if condition not met, identify gaps and re-execute with improvements.
Repeat -- continue until condition met or max iterations (default: 5).
Report -- iteration log showing progression and final output.
Examples
# Refine until tests pass
/loop "fix failing tests in auth module" --until "all tests pass" --max-iterations 3
# Refine content quality
/loop "write pitch for AI Masters" --until "S/N score > 0.8"
# Iterative optimization
/loop "optimize query performance" --until "p99 < 200ms" --max-iterations 5
End-to-end processing pipeline that chains the full 6R sequence: seed, reduce, reflect, reweave, verify. Runs per-item or in batch mode. Three depth levels control thoroughness vs. speed. The orchestrator for all processing skills. Triggers on: "pipeline", "process", "full pipeline", "6R"