Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问clear审计提醒

iterative-loop迭代循环

Agent Skill

iterative-loop 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

267

周安装

11

GitHub Stars

329

下载量

87
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:iterative-loop(迭代循环)
来源仓库:https://github.com/proffesor-for-testing/agentic-qe
仓库路径:skills/iterative-loop
安装命令:
npx skills add https://github.com/proffesor-for-testing/agentic-qe --skill iterative-loop
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/proffesor-for-testing/agentic-qe --skill iterative-loop

简介

用于查找、检索和筛选相关信息,快速定位候选结果。

  • 适合在关键词、任务场景或来源线索明确时使用。
  • 可结合来源仓库和原始 README 核验具体用法。
  • 安装前建议确认权限范围和维护状态,以及是否会触发联网或命令执行。
  • 注意检查是否会触发文件读写或高风险操作。iterative-loop 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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

# 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

# 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:

✅ 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:

❌ "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:

## 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:

## 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
# 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

## 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

## 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

## 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

## 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

# 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:

# 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:

## 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>

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

Related Skills

Resources


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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.01%
按下载量换算24

windsurf

22.98%
按下载量换算20

trae

17.23%
按下载量换算15

OpenCode

12.33%
按下载量换算11

Codex

7.17%
按下载量换算6

Antigravity

3.95%
按下载量换算3

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/proffesor-for-testing/agentic-qe --skill iterative-loop;npx skills add proffesor-for-testing/agentic-qe --skill "iterative-loop" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills