Runs continuous AI iteration loops that repeat build-test-fix cycles until success criteria are met.

MITAuto-check passedDevelopment

Install Iterative Loop

skills CLI
$ npx skills add proffesor-for-testing/agentic-qe --skill iterative-loop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install proffesor-for-testing/agentic-qe iterative-loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/proffesor-for-testing/agentic-qe.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/iterative-loop .claude/skills/iterative-loop && rm -rf skills-src

Use ~/.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/

Facts

Skill name
iterative-loop
GitHub stars
494
Token cost
~2.5k tokens
SKILL.md length
470 words
Files
1
Skills in repo
95
Repo updated
First seen
Licence
MIT

At a glance

Runs continuous AI iteration loops that repeat build-test-fix cycles until success criteria are met.

  • Works in 4 steps: Define Clear Success Criteria → Structure the Task with Phases → Implement Safety Mechanisms → …
  • Building features requiring test-driven refinement
  • SKILL.md covers Overview, Core Philosophy, Prerequisites and Quick Start, plus 7 more sections
  • Calls npx

What it does

Iterative Loop is an agent skill from proffesor-for-testing/agentic-qe. Runs continuous AI iteration loops that repeat build-test-fix cycles until success criteria are met. Use when building features requiring test-driven refinement, implementing tasks with clear pass/fail criteria, or automating iterative improvement workflows.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Test-driven development. The repository describes itself as: Agentic QE Fleet is an open-source AI-powered QA/QE platform designed for use with Coding Agents (works best with Claude Code) featuring specialized agents and skills to support… The licence is MIT.

When your agent uses it

  • Building features requiring test-driven refinement
  • Implementing tasks with clear pass/fail criteria
  • Automating iterative improvement workflows

Example prompts

  • “/iterative-loop”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Define Clear Success Criteria
  2. Structure the Task with Phases
  3. Implement Safety Mechanisms
  4. Execute with Verification

What it can do on your machine

Read from SKILL.md and the folder at commit 829d030. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • ghuntley.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Iterative Loop loads about 2.5k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 470 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from proffesor-for-testing/agentic-qe at commit 829d030, republished under its MIT licence (© proffesor-for-testing). 470 words, ~2,470 tokens.

Download SKILL.mdSave it as .claude/skills/iterative-loop/SKILL.md (or your agent's skills folder).
name
iterative-loop
description
Runs continuous AI iteration loops that repeat build-test-fix cycles until success criteria are met. Use when building features requiring test-driven refinement, implementing tasks with clear pass/fail criteria, or automating iterative improvement workflows.

Iterative Loop

Overview

The Iterative Loop skill implements continuous AI-driven development loops that persist until completion criteria are met. Inspired by the Ralph Wiggum technique, this approach enables autonomous, self-correcting development cycles where the AI sees its previous work in files and git history, iteratively improving until success.

Core Philosophy

  1. Iteration > Perfection - Don't aim for perfect on first try; let the loop refine the work
  2. Failures Are Data - Each failure provides information to improve the next attempt
  3. Clear Criteria - Success must be objectively measurable (tests, metrics, validations)
  4. Persistence Wins - Keep trying until success; the loop handles retry logic automatically

Prerequisites

  • Claude Code with session management
  • Clear completion criteria (tests, linting, metrics)
  • Version control (git) for tracking iterations

Quick Start

Basic Iterative Development Pattern
bash
# Define task with clear completion criteria
TASK="Implement user authentication with JWT.
Success criteria:
- All unit tests pass
- Integration tests pass
- No TypeScript errors
- Security audit passes
Output <promise>COMPLETE</promise> when all criteria met."

# Execute iterative loop (conceptual)
while ! task_complete; do
  claude_execute "$TASK"
  check_completion_criteria
done
AQE v3 Integration Example
bash
# Using claude-flow hooks for iterative task
npx --no-install ruflo hooks pre-task --description "Implement auth with iteration" --taskId "auth-impl"

# Store iteration state in memory
npx --no-install ruflo memory store \
  --key "iteration-auth" \
  --value '{"iteration": 1, "maxIterations": 20, "criteria": "all tests pass"}' \
  --namespace iterations

Step-by-Step Guide

Step 1: Define Clear Success Criteria

Essential: Every iterative task MUST have objectively measurable completion criteria.

Good Criteria Examples:

markdown
✅ All unit tests pass (npm test returns exit code 0)
✅ Coverage > 80% (coverage report shows 80%+)
✅ No TypeScript errors (tsc --noEmit returns 0)
✅ Linting passes (eslint returns 0)
✅ Performance < 100ms (benchmark shows < 100ms)

Bad Criteria Examples:

markdown
❌ "Code looks good" (subjective)
❌ "Works properly" (undefined)
❌ "Well-structured" (no measurable check)
Step 2: Structure the Task with Phases

Break complex tasks into incremental phases:

markdown
## Task: Implement User Authentication

### Phase 1: Data Layer
- Create User model with Prisma schema
- Write migration
- Run tests: `npm test -- --grep "User model"`
- Criteria: Model tests pass

### Phase 2: Service Layer
- Implement AuthService with JWT
- Add token generation/validation
- Run tests: `npm test -- --grep "AuthService"`
- Criteria: Service tests pass

### Phase 3: API Layer
- Create /auth/login endpoint
- Create /auth/register endpoint
- Run tests: `npm test -- --grep "auth API"`
- Criteria: API tests pass

### Phase 4: Integration
- End-to-end authentication flow
- Run tests: `npm test`
- Criteria: ALL tests pass

Output <promise>AUTH_COMPLETE</promise> when Phase 4 passes.
Step 3: Implement Safety Mechanisms

Always include escape conditions:

markdown
## Safety Rules

1. **Max Iterations**: Stop after 20 attempts
2. **Stuck Detection**: After 5 iterations without progress:
   - Document what's blocking
   - List attempted approaches
   - Suggest alternative strategies
3. **Critical Errors**: Stop immediately if:
   - Database corruption detected
   - Security vulnerability introduced
   - Breaking changes to existing features
Step 4: Execute with Verification

Each iteration should:

  1. Make targeted changes
  2. Run verification (tests, lint, build)
  3. Analyze results
  4. Plan next iteration based on feedback
bash
# Iteration pattern
1. Read previous state (files, git log)
2. Identify remaining work
3. Implement specific change
4. Run verification suite
5. If all pass -> output completion promise
6. If failures -> analyze and continue iteration

Iterative Patterns

Pattern 1: Test-Driven Iteration
markdown
## TDD Iteration Task

1. Write failing test for [feature]
2. Implement minimal code to pass test
3. Run `npm test`
4. If test fails -> debug and fix implementation
5. If test passes -> check if more tests needed
6. Repeat until all acceptance tests pass
7. Refactor if needed
8. Output <promise>TDD_COMPLETE</promise>
Pattern 2: Bug Fix Iteration
markdown
## Bug Fix Task

1. Write failing test that reproduces bug
2. Implement fix
3. Run test suite
4. If reproduction test fails -> analyze why fix didn't work
5. If other tests fail -> fix regressions
6. If all tests pass -> output <promise>BUG_FIXED</promise>

Max iterations: 10
After 5 iterations without fix:
- Document root cause analysis
- Suggest alternative approaches
Pattern 3: Coverage Improvement Iteration
markdown
## Coverage Improvement Task

Target: 80% line coverage

1. Run coverage analysis
2. Identify uncovered code paths
3. Write test for highest-impact uncovered path
4. Run tests with coverage
5. If coverage >= 80% -> output <promise>COVERAGE_ACHIEVED</promise>
6. If coverage < 80% -> continue iteration

Max iterations: 30
Progress check: If coverage doesn't improve for 3 iterations -> analyze blockers
Pattern 4: Performance Optimization Iteration
markdown
## Performance Optimization Task

Target: Response time < 100ms

1. Run performance benchmark
2. Identify slowest operation
3. Implement optimization
4. Run benchmark again
5. If target met -> output <promise>PERF_TARGET_MET</promise>
6. If not improved -> try different approach

Max iterations: 15
Record metrics each iteration for trend analysis

Integration with Claude Flow

Memory-Enhanced Iteration
bash
# Store iteration state
npx --no-install ruflo memory store \
  --key "current-iteration" \
  --value '{"task": "auth", "iteration": 5, "lastResult": "2 tests failing"}' \
  --namespace iterations

# Search for similar past iterations
npx --no-install ruflo memory search \
  --query "auth implementation" \
  --namespace iterations

# Learn from successful completions
npx --no-install ruflo hooks post-task \
  --taskId "auth-impl" \
  --success true \
  --quality 0.9
Swarm-Coordinated Iteration

For complex tasks, use multiple agents iterating in parallel:

bash
# Initialize swarm for parallel iteration
npx --no-install ruflo swarm init --topology mesh --max-agents 5

# Spawn specialized iterators
Task("Iterate on unit tests", "Fix failing unit tests until all pass", "tester")
Task("Iterate on integration", "Fix integration tests until all pass", "tester")
Task("Iterate on performance", "Optimize until benchmarks pass", "performance-engineer")

Best Practices

Prompt Engineering for Iteration

Include:

  • Explicit completion criteria with verification commands
  • Phase-based breakdown for complex tasks
  • Safety limits (max iterations)
  • Progress tracking instructions
  • Stuck detection and recovery procedures

Example Well-Structured Prompt:

markdown
## Task: Implement Feature X

### Success Criteria (ALL must pass):
1. `npm test` exits with code 0
2. `npm run lint` exits with code 0
3. `npm run typecheck` exits with code 0
4. No console.log statements in production code

### Phases:
1. Write failing tests
2. Implement feature
3. Fix any failures
4. Clean up and refactor

### Safety:
- Max iterations: 20
- After 10 iterations: summarize blockers
- Stop if security issues detected

### Completion:
When ALL success criteria pass, output:
<promise>FEATURE_X_COMPLETE</promise>
Show full SKILL.md (194 more words)Show less
When to Use Iterative Loops

Ideal for:

  • Well-defined tasks with measurable success
  • Test-driven development
  • Bug fixing with reproducible tests
  • Coverage improvement
  • Performance optimization
  • Linting/formatting fixes

Not ideal for:

  • Tasks requiring human judgment
  • Design decisions
  • Vague or subjective goals
  • One-time operations
  • Production debugging without tests

Troubleshooting

Issue: Infinite Loop / No Progress

Symptoms: Same errors repeat without improvement

Solutions:

  1. Increase specificity in completion criteria
  2. Add "stuck detection" with alternative approaches
  3. Lower max iterations
  4. Break task into smaller phases
Issue: False Completion

Symptoms: Loop ends but task not actually complete

Solutions:

  1. Add more verification commands
  2. Make completion criteria more explicit
  3. Add integration tests alongside unit tests
Issue: Regression in Later Iterations

Symptoms: Previously passing tests fail after new changes

Solutions:

  1. Add regression check step
  2. Use git to compare iterations
  3. Implement smaller, targeted changes

Resources


Origin: Based on Ralph Wiggum plugin from claude-code repository (anthropics/claude-code) Adapted for: Agentic QE v3 with Claude Flow integration

© proffesor-for-testing, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/iterative-loop of proffesor-for-testing/agentic-qe.

Open the folder on GitHubat commit 829d030

Compare with similar skills

Iterative Loop 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.

Iterative Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Iterative Loop this skillproffesor-for-testing/agentic-qe494—~2.5kAutomated safety check: PassMIT
Skill Writingmillionco/expect3.6k—~1.8kAutomated safety check: PassCustom licence
Go Rigmudrii/openclaw-dashboard458—~2.8kAutomated safety check: PassMIT
Go Development Guidelinesjumppad-labs/jumppad263—~1.5kAutomated safety check: PassMPL-2.0
Work Issuejoesaby/astro-mermaid123—~891Automated safety check: PassMIT
Go Rigmudrii/openclaw-dashboard458—~682Automated safety check: PassMIT

Similar skills

  • Skill Writing

    millionco/expect

    Write and improve agent skills (SKILL.md files). An agent skill from millionco/expect.

    3.6k GitHub stars~1.8k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed
  • Go Rig

    mudrii/openclaw-dashboard

    A skill your agent uses when building, reviewing, or refactoring Go code that must follow strict design discipline — ATDD/TDD workflow, explicit dependency injection, package-boundary discipline…

    458 GitHub stars~2.8k tokensUpdated 14 days ago
    DevelopmentAuto-check passed
  • Go Development Guidelines

    jumppad-labs/jumppad

    Sets idiomatic Go conventions with a test-first workflow, using testify/require for assertions and mockery for mocks, for new features, packages and refactors.

    263 GitHub stars~1.5k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Work Issue

    joesaby/astro-mermaid

    End-to-end workflow for resolving a GitHub issue in astro-mermaid — triages complexity, then runs brainstorm → TDD → implement → docs/spec → code review at the right depth.

    123 GitHub stars~891 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Go Rig

    mudrii/openclaw-dashboard

    A skill your agent uses when building, reviewing, or refactoring Go code in this repository.

    458 GitHub stars~682 tokensUpdated 14 days ago
    DevelopmentAuto-check passed
  • Development Workflow

    runceel/ReactiveProperty

    ReactiveProperty repository development policy. An agent skill from runceel/ReactiveProperty.

    944 GitHub stars~1.4k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed

More from proffesor-for-testing/agentic-qe

All 95 skills in this repo
  • Contract Testing

    proffesor-for-testing/agentic-qe

    Consumer-driven contract testing for microservices using Pact, schema validation, API versioning, and backward compatibility testing.

    494 GitHub stars~1.8k tokensUpdated 3 days ago
    Auto-check passed
  • Mutation Testing

    proffesor-for-testing/agentic-qe

    Test quality validation through mutation testing, assessing test suite effectiveness by introducing code mutations and measuring kill rate.

    494 GitHub stars~1.7k tokensUpdated 3 days ago
    Auto-check passed
  • Performance Testing

    proffesor-for-testing/agentic-qe

    Profiles application performance under load using k6, Artillery, or JMeter to measure latency, throughput, and error rates.

    494 GitHub stars~2.4k tokensUpdated 3 days ago
    Auto-check passed
  • Code Review Quality

    proffesor-for-testing/agentic-qe

    Conduct context-driven code reviews focusing on quality, testability, and maintainability.

    494 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Security Testing

    proffesor-for-testing/agentic-qe

    Scans for security vulnerabilities including XSS, SQL injection, CSRF, and auth flaws using OWASP Top 10 methodology.

    494 GitHub stars~2.7k tokensUpdated 3 days ago
    Auto-check: notes
  • Database Testing

    proffesor-for-testing/agentic-qe

    Database schema validation, data integrity testing, migration testing, transaction isolation, and query performance.

    494 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed

Questions about Iterative Loop

What does Iterative Loop do?

Runs continuous AI iteration loops that repeat build-test-fix cycles until success criteria are met. Iterative Loop is an agent skill from proffesor-for-testing/agentic-qe. Runs continuous AI iteration loops that repeat build-test-fix cycles until success criteria are met.

When should I use Iterative Loop?

Iterative Loop fits situations like: building features requiring test-driven refinement; implementing tasks with clear pass/fail criteria; automating iterative improvement workflows.

How do I install Iterative Loop in Claude Code?

Run `npx skills add proffesor-for-testing/agentic-qe --skill iterative-loop -a claude-code`. Or copy the skill folder (.claude/skills/iterative-loop in proffesor-for-testing/agentic-qe) into .claude/skills/iterative-loop in your project. Claude Code loads it when a task matches its description.

How do I install Iterative Loop in Codex?

Run `npx skills add proffesor-for-testing/agentic-qe --skill iterative-loop -a codex`. Or copy the skill folder (.claude/skills/iterative-loop in proffesor-for-testing/agentic-qe) into .agents/skills/iterative-loop in your project. Codex loads it when a task matches its description.

Can I use Iterative Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add proffesor-for-testing/agentic-qe --skill iterative-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/iterative-loop, .gemini/skills/iterative-loop, .github/skills/iterative-loop and .opencode/skills/iterative-loop in your project.

What does Iterative Loop need to run?

Going by SKILL.md and its folder, Iterative Loop needs the command-line tools its instructions call (npx). Our summary lists: Node.js.

Does Iterative Loop access the network?

SKILL.md names 2 domains. As links in the text: github.com and ghuntley.com. This is read from the text; nothing was executed.

Is Iterative Loop safe to install?

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.

What licence does Iterative Loop use?

Iterative Loop is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Iterative Loop use?

About 2.5k tokens (SKILL.md is roughly 9.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Iterative Loop?

Skills that share tags, products or a category with Iterative Loop: Skill Writing (millionco/expect, 3.6k stars), Go Rig (mudrii/openclaw-dashboard, 458 stars), Go Development Guidelines (jumppad-labs/jumppad, 263 stars) and Work Issue (joesaby/astro-mermaid, 123 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Iterative Loop?

proffesor-for-testing (a GitHub user) maintains it in proffesor-for-testing/agentic-qe, which has 494 GitHub stars. The repository holds 95 skills in this directory. The repository was last updated on October 4, 2026.

Source: proffesor-for-testing/agentic-qe on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.