Loop
Run iterative agent loops until success criteria are met. Controlled autonomous iteration.
Why use this skill?
Master iterative task execution with the OpenClaw Loop skill. Run verified tasks, log iteration history, and solve complex problems with autonomous, safe cycles.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ivangdavila/loopWhat This Skill Does
The Loop skill for OpenClaw provides a robust, iterative framework for executing tasks that require multiple attempts to achieve a specific outcome. By implementing a structured feedback loop—Task, Execute, Verify, and Decide—this skill enables the agent to function autonomously while maintaining strict boundaries. It prevents 'runaway' processes by enforcing a hard limit of 10 iterations and ensures transparency by maintaining a structured file system within ~/loop/ for logging history and extracting patterns through a learnings.md file. It is the premier tool for overcoming transient errors or tasks requiring multiple trial-and-error steps where the path to success is uncertain but the criteria for success are crystal clear.
Installation
To add this capability to your agent, execute the following command in your terminal:
clawhub install openclaw/skills/skills/ivangdavila/loop
This will register the necessary skill manifests and initialize the required directory structure, specifically the ~/loop/history/ directory, which houses the JSON logs for every completed iteration.
Use Cases
This skill is designed for scenarios where progress is non-linear but goal-oriented. Ideal use cases include:
- Debugging failing test suites where the fix might require multiple adjustments to dependencies or environment variables.
- Data reconciliation tasks where the agent must perform multiple read/compare operations until files are synchronized.
- Complex environment configuration where multiple settings must be applied and validated sequentially.
Example Prompts
- "I need to fix the failing authentication tests in the project. Use the Loop skill to try different auth configurations until all tests pass, but stop after 5 attempts if it's not working."
- "Loop through the configuration files and attempt to update the API endpoints. Verify each change by running the health check command. Stop once all services return a 200 OK status."
- "Keep trying to resolve the dependency conflict in package.json by iterating through known compatible versions until the build succeeds."
Tips & Limitations
Tips
- Always define clear success criteria; the skill relies on a 'Verify' command (e.g.,
npm testor a custom script) to know when to stop. - Leverage the
learnings.mdfile after a loop completes; it is a goldmine for understanding why certain approaches failed in your specific environment. - If a task consistently hits the max iteration limit, analyze the
~/loop/history/logs to identify recurring error patterns before attempting a manual override.
Limitations
- Safety First: This skill will NEVER make automatic Git commits, modify system configurations, or deploy to production.
- Iteration Cap: A hard limit of 10 iterations prevents infinite loops. If a task is not solvable within this window, the agent is designed to halt and report the findings rather than keep spinning.
- Not for Exploratory Work: If you do not know the end state, do not use the Loop skill. This is strictly for tasks with binary pass/fail outcomes.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ivangdavila-loop": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write, code-execution
Related Skills
Animations
Create performant web animations with proper accessibility and timing.
Arduino
Develop Arduino projects avoiding common wiring, power, and code pitfalls.
Bulgarian
Write Bulgarian that sounds human. Not formal, not robotic, not AI-generated.
Arabic
Write Arabic that sounds human. Not formal, not robotic, not AI-generated.
Assistant
Manage tasks, communications, and scheduling with proactive and organized support.