Skip to content
Back to skills

Loop

ASecurity

Run iterative agent loops until success criteria are met. Controlled autonomous iteration.

  • 17 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 6, 2026
documentationgogit

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 6, 2026

npx -y skills add clawic/skills --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/clawic-loop/badge)](https://www.skillsdirectory.com/skills/clawic-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
---
name: Loop
slug: loop
version: 1.0.2
description: Run iterative agent loops until success criteria are met. Controlled autonomous iteration.
homepage: https://clawic.com/skills/loop
changelog: Fixed internal contradiction about Git commits in memory.md
metadata:
  clawdbot:
    emoji: 🔄
    requires:
      bins: []
    os:
    - linux
    - darwin
    - win32
    displayName: Loop
---

## Data Storage

```
~/Clawic/data/loop/
├── active.json         # Currently running loops
├── history/            # Completed loop logs
│   └── {loop-id}.json
└── learnings.md        # Cross-loop patterns
```

Create on first use: `mkdir -p ~/Clawic/data/loop/history`

## Scope

This skill:
- ✅ Runs iterative attempts toward defined success criteria
- ✅ Logs each iteration with learnings
- ✅ Exits on success, max iterations, or unrecoverable error
- ❌ NEVER makes Git commits automatically
- ❌ NEVER deploys to production
- ❌ NEVER modifies system configuration
- ❌ NEVER runs indefinitely (max 10 iterations hard limit)

## Quick Reference

| Topic | File |
|-------|------|
| Loop examples | `examples.md` |
| Memory between iterations | `memory.md` |

## Core Rules

### 1. Pattern
```
Task + Criteria → Execute → Verify → [Pass? Exit : Retry]
```

### 2. Required Setup
| Element | Required | Example |
|---------|----------|---------|
| Task | Yes | "Fix failing tests" |
| Success criteria | Yes | "All tests pass" |
| Max iterations | Default: 5 | Max: 10 |
| Verify command | Recommended | `npm test` |

### 3. When to Propose
- Task has clear success criteria but uncertain path
- Previous attempt failed but error is fixable
- User says "keep trying until..."

**NOT for:** One-shot tasks, undefined goals, exploratory work

### 4. Each Iteration
1. **Fresh context** — Only carry: task, criteria, count, learnings
2. **Execute** — Attempt the task
3. **Verify** — Check success criteria
4. **Record** — Append to history: what worked, what failed
5. **Decide** — Pass? Exit. Fail? Retry if under limit.

### 5. Stopping Conditions
- ✅ Success criteria met
- ❌ Max iterations reached
- ⚠️ Unrecoverable error (missing dependency, permission denied)

### 6. On Failure
If max reached without success:
- Summarize all attempts
- Identify common failure pattern
- Recommend manual intervention or different approach

### 7. Safety
- Hard limit: 10 iterations maximum
- No destructive actions without explicit per-action approval
- Log everything to ~/Clawic/data/loop/history/

Files in this skill

  • SKILL.md2.5 KB
  • _meta.json236 B
  • examples.md688 B
  • memory.md986 B

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.

View all in documentation →

Comments

Loading comments…

Newsletter

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