Loop for Openclaw

A controlled autonomous iteration engine that executes agent tasks repeatedly until specific success criteria are met.

ivangdavila
v1.0.2
Feb 16, 2026
3
2.6k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install loop

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install loop using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Loop?

The Loop skill provides a structured framework for AI agents to perform iterative problem-solving within the Openclaw Skills ecosystem. Instead of relying on a single attempt, this skill allows agents to execute a task, verify the outcome against defined success criteria, and automatically retry if the goal is not met. It is designed to bridge the gap between simple task execution and complex, self-correcting autonomous workflows.

Built with safety as a priority, Loop incorporates strict guardrails, such as a hard limit on iterations and prohibitions against automatic production deployments or system configuration changes. This ensures that while the agent has the autonomy to keep trying, it remains within a controlled environment, making it a reliable tool for professional software development and automation tasks.

Loop Use Cases

  • Debugging complex code issues where the initial fix may not satisfy all test cases.
  • Refining documentation or data outputs through multiple passes until quality benchmarks are achieved.
  • Automating repetitive troubleshooting steps that require verification after each action.
  • Scenarios where a user provides a high-level goal and wants the agent to persist until the verification command passes.

How Loop Works

  1. Initialization: The agent defines a specific task, success criteria, and a maximum iteration count (defaulting to 5).
  2. Execution: The agent performs the primary task based on the current state and any learnings from previous attempts.
  3. Verification: A verification step is triggered, typically running a command like a test suite, to evaluate the result against the success criteria.
  4. Logging: The skill records the results of the iteration, including what worked and what failed, into a persistent history log.
  5. Evaluation: If criteria are met, the skill exits successfully. If not, it assesses whether to retry based on the iteration limit or identifies unrecoverable errors.
  6. Final Summary: Upon completion or reaching the limit, the skill provides a comprehensive summary of all attempts and identifies failure patterns.

Loop Setup

To initialize the Loop skill for use with Openclaw Skills, you must first create the necessary local storage directories to handle history and active state:

mkdir -p ~/loop/history

The skill operates locally and requires no external binary dependencies, relying on JSON and Markdown files for state management.

Loop Data Schema & Taxonomy

Loop maintains a structured data hierarchy within the ~/loop/ directory to ensure transparency and learning across sessions:

File Path Purpose
~/loop/active.json Tracks the state and metadata of the currently active iteration loop.
~/loop/history/{loop-id}.json Individual log files containing the step-by-step history of completed loops.
~/loop/learnings.md A cumulative document used to track cross-loop patterns and improve future agent performance.

Loop Advanced Features

  • Pattern Recognition: Maintains a learnings.md file to help agents identify and avoid repeating mistakes across different sessions.
  • Safety Hard Limits: Implements a non-bypassable hard limit of 10 iterations to prevent infinite loops and resource waste.
  • Audit Trails: Generates detailed JSON logs for every attempt, providing a full forensic record of agent actions.
  • Verification Integration: Supports standard CLI-based verification commands, allowing for objective, test-driven task completion.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*