Loop

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

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Loop" with this command: npx skills add ivangdavila/loop

Data Storage

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

Create on first use: mkdir -p ~/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

TopicFile
Loop examplesexamples.md
Memory between iterationsmemory.md

Core Rules

1. Pattern

Task + Criteria → Execute → Verify → [Pass? Exit : Retry]

2. Required Setup

ElementRequiredExample
TaskYes"Fix failing tests"
Success criteriaYes"All tests pass"
Max iterationsDefault: 5Max: 10
Verify commandRecommendednpm 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 ~/loop/history/

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

AgentOctopus

Use when you need to route a user query to the best specialized skill — AgentOctopus semantically matches queries against installed skills, executes the top...

Registry SourceRecently Updated
Automation

My Clean Skill

A skill that enables AI agents to create and verify decentralized identities using Billions Network.

Registry SourceRecently Updated
Automation

Openclaw Memory Master

AI Memory System with LLM Wiki

Registry SourceRecently Updated
Automation

Email Excel Transfer

Pobieranie załączników z maila przez IMAP i wypełnianie plików Excel przez PowerShell. Użyj gdy użytkownik prosi o pobranie plików z email i wstawienie warto...

Registry SourceRecently Updated