Skip to content
Back to skills

Loop

ASecurity

Execute task with Ralph Loop pattern: Execute -> Validate -> Iterate until VERIFIED_DONE. Enforces iteration limits per model (Claude: 25, MiniMax: 50, MiniMax-lightning: 100). Use when: (1) iterative fixes needed, (2) running until quality passes, (3) automated task completion. Triggers: /loop, 'loop until done', 'iterate', 'keep trying', 'fix until passing'.

  • 146 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 7, 2026
developmentbash

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add alfredolopez80/multi-agent-ralph-loop --skill loop --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Loop?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Loop
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alfredolopez80-loop/badge)](https://www.skillsdirectory.com/skills/alfredolopez80-loop)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
# VERSION: 2.43.0
name: loop
description: "Execute task with Ralph Loop pattern: Execute -> Validate -> Iterate until VERIFIED_DONE. Enforces iteration limits per model (Claude: 25, MiniMax: 50, MiniMax-lightning: 100). Use when: (1) iterative fixes needed, (2) running until quality passes, (3) automated task completion. Triggers: /loop, 'loop until done', 'iterate', 'keep trying', 'fix until passing'."
user-invocable: true
---

# Loop - Ralph Loop Pattern

Execute -> Validate -> Iterate until VERIFIED_DONE.

## Quick Start

```bash
/loop "fix all type errors"
/loop "implement tests until 80% coverage"
ralph loop "fix lint errors"
```

## Pattern

```
     EXECUTE
        |
        v
    +---------+
    | VALIDATE |
    +---------+
        |
   Quality    YES    +---------------+
   Passed? --------> | VERIFIED_DONE |
        |            +---------------+
        | NO
        v
    +---------+
    | ITERATE | (max iterations)
    +---------+
        |
        +-------> Back to EXECUTE
```

## Iteration Limits

| Model | Max Iterations | Use Case |
|-------|----------------|----------|
| Claude (Sonnet/Opus) | 25 | Complex reasoning |
| MiniMax M2.1 | 50 | Standard tasks |
| MiniMax-lightning | 100 | Extended loops |

## Workflow

### 1. Execute Task
```yaml
# Attempt implementation
Edit/Write/Bash as needed
```

### 2. Validate
```yaml
# Run quality gates
ralph gates
```

### 3. Check & Iterate
```yaml
# If validation fails and under limit
iteration += 1
if iteration <= MAX:
    continue  # Back to Execute
else:
    report "Max iterations reached"
```

## Loop Types

### Fix Loop
```bash
/loop "fix all type errors"
```
Repeatedly fix errors until build passes.

### Coverage Loop
```bash
/loop "increase test coverage to 80%"
```
Add tests until coverage target met.

### Lint Loop
```bash
/loop "fix all lint warnings"
```
Fix lint issues until clean.

### Build Loop
```bash
/loop "fix build errors"
```
Fix compilation errors until success.

## Exit Conditions

### Success (VERIFIED_DONE)
- Quality gates pass
- Tests pass
- No remaining errors

### Failure (MAX_ITERATIONS)
- Iteration limit reached
- Report remaining issues
- Ask user for guidance

### Manual Exit
- User interrupts
- Critical error detected
- Deadlock detected

## Integration

- Core pattern for all Ralph tasks
- Used by /orchestrator in Step 5
- Hooks enforce limits automatically

## Anti-Patterns

- Never exceed iteration limits
- Never loop without validation step
- Never ignore failing tests
- Never loop on same error repeatedly (detect deadlock)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.