← Back to Skills Marketplace
1419
Downloads
2
Stars
10
Active Installs
3
Versions
Install in OpenClaw
/install loop
Description
Run iterative agent loops until success criteria are met. Controlled autonomous iteration.
README (SKILL.md)
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
| 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
- Fresh context — Only carry: task, criteria, count, learnings
- Execute — Attempt the task
- Verify — Check success criteria
- Record — Append to history: what worked, what failed
- 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/
Usage Guidance
This skill appears to do what it says: run controlled iterative attempts and log results under ~/loop/. Before using it, consider: 1) logs will be written to your home directory — inspect ~/loop/ and delete anything sensitive if needed; 2) the agent will run commands you approve (e.g., tests, build steps) so avoid approving commands that read or exfiltrate secrets or perform deployments; 3) if you prefer not to persist history locally, run in an isolated environment, change the storage path, or periodically clean ~/loop/; and 4) the skill claims it will not make commits or deploy, but do not approve any automated git commit or deploy commands unless you explicitly want them. If you want a tighter audit, ask the skill to print each planned command for review before execution.
Capability Analysis
Type: OpenClaw Skill
Name: loop
Version: 1.0.2
The skill is designed for iterative task execution, which inherently involves the agent running commands and interacting with the file system based on user-defined 'Task' and 'Criteria'. While the `SKILL.md` and `memory.md` files include explicit safety declarations (e.g., 'No destructive actions without explicit per-action approval', 'NEVER makes Git commits automatically'), these are instructions for the AI agent, not technical enforcements. The core functionality of executing arbitrary user-defined tasks (as implied by 'Execute' and 'Verify' steps and examples like `npm test`) presents a significant prompt injection vulnerability, allowing a malicious user to potentially trick the agent into executing harmful commands. This is a high-risk capability, even without clear malicious intent from the skill author.
Capability Assessment
Purpose & Capability
Name/description (iterative agent loops) matches the instructions: no external services, no extra binaries or credentials, and the only side effect is creating ~/loop for logs. Nothing requested appears unrelated to the stated purpose.
Instruction Scope
SKILL.md provides a clear loop pattern and limits (max 10 iterations, logging rules, per-action approval for destructive steps). However, the 'Execute' step is necessarily open-ended (the agent will attempt user-defined tasks and run verify commands like `npm test`), so the agent may run arbitrary commands the user approves; this is expected but broad in scope and worth user attention.
Install Mechanism
Instruction-only skill with no install step and no code files — lowest risk from installation. It only instructs creating a directory under the user's home.
Credentials
No required environment variables, credentials, or config paths are declared. The skill may run verify/execute commands that implicitly use the environment, but it does not request elevated access or unrelated secrets.
Persistence & Privilege
The skill persists data locally to ~/loop/ (active.json, history/{id}.json, learnings.md). It is not always-enabled and does not modify other skills or system-wide settings. Users should be aware logs may contain sensitive outputs from attempted commands and will remain on disk unless removed.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install loop - After installation, invoke the skill by name or use
/loop - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
Fixed internal contradiction about Git commits in memory.md
v1.0.1
Added explicit data storage and safety boundaries for automated iterations
v1.0.0
Initial release - Ralph Loop pattern for autonomous iteration
Metadata
Frequently Asked Questions
What is Loop?
Run iterative agent loops until success criteria are met. Controlled autonomous iteration. It is an AI Agent Skill for Claude Code / OpenClaw, with 1419 downloads so far.
How do I install Loop?
Run "/install loop" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Loop free?
Yes, Loop is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Loop support?
Loop is cross-platform and runs anywhere OpenClaw / Claude Code is available (linux, darwin, win32).
Who created Loop?
It is built and maintained by Iván (@ivangdavila); the current version is v1.0.2.
More Skills