An iterative generation, evaluation, and revision workflow optimized for Claude Opus 4.8 to achieve high-quality outputs via structured self-critique and cost-efficient model routing.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install refinement-loop
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install refinement-loop using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
The refinement-loop workflow is a cornerstone of building robust agentic systems using Openclaw Skills. Unlike traditional single-prompt architectures, this skill structures an autonomous loop that progressively improves an output through candidate generation, multi-agent critique, and targeted revision passes. Optimized heavily for Claude Opus 4.8, it maximizes the benefits of extended thinking blocks, resolving complex logical goals that a single-pass prompt cannot handle.
By integrating this pattern into Openclaw Skills, developers gain a production-ready framework for managing multi-call iterations. It provides out-of-the-box model routing to split tasks between Opus and Sonnet, robust token-budget controls, and advanced convergence criteria to prevent costly infinite loops, delivering highly polished results at minimal cost.
To deploy this model refinement mechanism using Openclaw Skills, configure your environment with the correct model endpoints and budget tracking. Follow these steps to set up your workflow environment:
# Install the necessary Openclaw development dependencies
npm install @openclaw/sdk-core
# Export your Anthropic credentials
export ANTHROPIC_API_KEY="your-api-key-here"
export MAX_REFINEMENT_TOKENS=50000
Now, define your orchestration logic using the core configuration schema. This initializes the loop using high-performance Claude presets tailored for Openclaw Skills.
This workflow schema structures operational state and execution metadata across all passes. It uses a clean JSON state schema to keep the model anchored to original specifications:
| State Parameter | Data Type | Description | Optimization Strategy |
|---|---|---|---|
original_requirements |
String | Core prompt and constraints | Sent every loop iteration to prevent drift |
current_best |
String | Highest-scoring candidate | Tracked dynamically as the active reference |
latest_critique |
String | Structured evaluation object | Evaluated against the strict rubric |
token_budget |
Integer | Running token count | Monitored to execute a hard stop if exceeded |
When the critic runs under Pattern 3, it outputs a deterministic JSON object to prevent soft praise:
{
"score": 8.5,
"failures": ["Paragraph 3 exceeds word limit", "Missing call-to-action"],
"converged": false
}
Loading
An AI coding agent skill that implements Jonah Berger's STEPPS framework to engineer viral word-of-mouth marketing and social transmission into your content and products.

A continuous learning system for AI agents that logs failures, corrections, and user preferences to MeiliSearch for rapid query recall and auto-distills them into human-readable memory files.

A unique creative coding skill that transforms visual, mathematical, and conceptual Truth×Light metrics into rich, self-similar harmonic echo soundscapes.

An AI-powered ethical guide and knowledge base designed to explore systemic corruption, institutional reform, and the psychological journey of whistleblowing based on Frank Serpico's real-life story.

An advanced Openclaw Skills module that injects deep literary, thematic, and historical context from Isak Dinesen's memoir into your AI agent's operational intelligence.

An AI-native creative engine that translates fractal patterns and recursive visuals into complex, evolving audio textures.








































