Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Runs a bounded spec-build-review development loop with explicit scope, stop conditions, and human approval gates for risky or ambiguous work.
.claude/skills/sickn33-ai-loop/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-20 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -47% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 82% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 29% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 58% | 0% |
The ai-loop skill structures a bounded development cycle for agentic workflows. By dividing the process into distinct planning (Spec), implementation (Build), and validation (Review) phases, it helps an agent build and correct scoped code changes while keeping requirements, risk gates, and stop conditions explicit.
This skill executes a controlled development loop composed of three phases: Spec, Build, and Review. When invoked, the agent moves through those phases until the scoped requirements pass verification, a stop condition is reached, or human approval is needed.
Before starting, define:
specs/<feature-name>.md.specs/<feature-name>.md.specs/<feature-name>.md.User: > I want to add a utility for calculating basic statistics (mean, median, mode) of an array of numbers.
Agent (Phase 1 - Spec): > I can help with that. To get started, what programming language should this statistics calculator be implemented in? Also, how should empty arrays or invalid inputs be handled?
User: > JavaScript. If the array is empty, return null. If there are non-numbers, ignore them.
Agent (Phase 1 - Spec): > Thank you. I have created the specification file at specs/stats-calculator.md with the requirements we discussed. Now, I will start implementing it.
Agent (Phase 2 - Build): > (Creates `stats_calculator.js` and implements `mean`, `median`, and `mode` matching the spec exactly) > I have finished implementing the calculator. I will now verify the implementation.
Agent (Phase 3 - Review): > Checking implementation against specs/stats-calculator.md: > - Requirement: mean calculation -> PASS > - Requirement: median calculation -> PASS > - Requirement: mode calculation -> PASS > - Requirement: empty array returns null -> PASS > - Requirement: non-numbers are ignored -> FAIL (I noticed mode doesn't filter out non-numbers). > > I will now loop back to Phase 2 to fix the mode function.
Agent (Phase 2 - Build Loop-Back): > (Fixes `mode` to filter out non-numbers) > I have updated the implementation. Let's re-verify.
Agent (Phase 3 - Review): > - Requirement: mode filters non-numbers -> PASS > > All requirements passed! The statistics calculator is complete and verified.
specs/<feature-name>.md before writing any code.Solution: Keep the scope of ai-loop to small, modular features. Break larger systems into multiple independent loops.
Solution: Spend extra time in the planning phase asking targeted questions to pin down requirements.
@plan-writing - For writing more detailed implementation plans for larger projects.@ask-questions-if-underspecified - For standard guidelines on interviewing the user.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-20 | fail→pass | 18,027 | 6,180 | -66% | 1 | 1 | 0% | 3,137 | 2,653 | -15% | 0 | 0 | — |
case-01 | fail→pass | 21,342 | 3,368 | -84% | 1 | 1 | 0% | 4,182 | 2,199 | -47% | 0 | 0 | — |
case-02 | fail→fail | 20,743 | 3,718 | -82% | 1 | 1 | 0% | 4,218 | 2,171 | -49% | 0 | 0 | — |
case-03 | fail→pass | 6,018 | 3,528 | -41% | 1 | 1 | 0% | 1,170 | 2,134 | +82% | 0 | 0 | — |
case-04 | fail→fail | 12,566 | 4,908 | -61% | 1 | 1 | 0% | 2,367 | 2,207 | -7% | 0 | 0 | — |
case-05 | fail→pass | 10,000 | 2,164 | -78% | 1 | 1 | 0% | 1,516 | 1,949 | +29% | 0 | 0 | — |
case-06 | pass→pass | 9,807 | 3,598 | -63% | 1 | 1 | 0% | 1,562 | 2,206 | +41% | 0 | 0 | — |
case-07 | fail→pass | 8,343 | 4,409 | -47% | 1 | 1 | 0% | 1,514 | 2,391 | +58% | 0 | 0 | — |
case-08 | pass→pass | 4,796 | 2,951 | -38% | 1 | 1 | 0% | 789 | 2,149 | +172% | 0 | 0 | — |
case-09 | fail→pass | 8,692 | 5,338 | -39% | 1 | 1 | 0% | 1,607 | 2,530 | +57% | 0 | 0 | — |
case-10 | fail→pass | 15,370 | 11,043 | -28% | 1 | 1 | 0% | 2,469 | 3,452 | +40% | 0 | 0 | — |
case-11 | fail→pass | 9,356 | 5,053 | -46% | 1 | 1 | 0% | 1,382 | 2,426 | +76% | 0 | 0 | — |
case-12 | fail→pass | 8,668 | 3,511 | -59% | 1 | 1 | 0% | 1,482 | 2,078 | +40% | 0 | 0 | — |
case-13 | fail→pass | 3,929 | 3,294 | -16% | 1 | 1 | 0% | 667 | 2,226 | +234% | 0 | 0 | — |
case-14 | pass→pass | 7,887 | 2,876 | -64% | 1 | 1 | 0% | 1,180 | 2,169 | +84% | 0 | 0 | — |
case-15 | fail→pass | 14,112 | 2,967 | -79% | 1 | 1 | 0% | 2,079 | 2,133 | +3% | 0 | 0 | — |
case-16 | pass→pass | 9,807 | 6,251 | -36% | 1 | 1 | 0% | 1,685 | 2,727 | +62% | 0 | 0 | — |
case-17 | fail→pass | 5,030 | 3,699 | -26% | 1 | 1 | 0% | 887 | 2,342 | +164% | 0 | 0 | — |
case-18 | pass→pass | 9,197 | 4,322 | -53% | 1 | 1 | 0% | 1,373 | 2,266 | +65% | 0 | 0 | — |
case-19 | fail→pass | 8,515 | 2,493 | -71% | 1 | 1 | 0% | 1,393 | 2,061 | +48% | 0 | 0 | — |
case-21 | fail→fail | 14,350 | 4,285 | -70% | 1 | 1 | 0% | 2,341 | 2,314 | -1% | 0 | 0 | — |
case-22 | fail→pass | 8,208 | 5,478 | -33% | 1 | 1 | 0% | 1,542 | 2,486 | +61% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +64 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.