Smart Refinement Skill for Openclaw

A high-performance prompt engineering and vector matching engine that clarifies vague requests and routes them to the correct AI capabilities.

janussilence
v1.0.0
Mar 30, 2026
0
725
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install smart-refinement

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 smart-refinement 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 Smart Refinement Skill?

The Smart Refinement Skill is a sophisticated middleware for AI agents designed to bridge the gap between ambiguous user intent and executable technical prompts. By integrating a Prompt Refinement Module and a Vector Optimizer, it automatically identifies incomplete requests and reconstructs them into structured, high-clarity instructions. This ensures that Openclaw Skills operate with maximum efficiency, reducing unnecessary LLM calls by up to 90%.

Beyond simple text cleanup, the skill utilizes TF-IDF and Cosine Similarity to match user requests against six core skill databases, including code generation, data analysis, and system operations. It maintains a deep understanding of conversation history and project context, making it an essential tool for developers building complex multi-agent systems or team task allocation frameworks.

Smart Refinement Skill Use Cases

  • Refining vague user commands like "process that file" into detailed, actionable instructions.
  • Automatically routing user queries to specific specialized tools such as web search or data analysis modules.
  • Optimizing team workflows by matching incoming tasks to the most qualified AI agents based on skill scores.
  • Reducing token consumption and latency in LLM-based applications through pre-processing and caching.

How Smart Refinement Skill Works

  1. The system receives a raw user message and captures the current conversation context.
  2. It analyzes the message for ambiguity; if the confidence score is low, the Prompt Refinement Module generates a structured version.
  3. The Vector Optimizer calculates similarity scores against the internal skill database to find the best functional match.
  4. Integrated context from project history and operation logs is merged with the refined prompt.
  5. The skill returns a comprehensive JSON object containing the refined prompt, matched skills, and an execution guide for the agent.

Smart Refinement Skill Setup

Install the skill via the official registry for Openclaw Skills:

npx clawhub install smart-refinement

Alternatively, for manual installation:

  1. Copy smart_refinement_system.py into your skills directory.
  2. Ensure your Python environment has the necessary dependencies for TF-IDF and vector math.

Smart Refinement Skill Data Schema & Taxonomy

The skill produces a structured JSON output to guide agent execution. Key fields include:

Field Type Description
refined_prompt string The optimized version of the user's original input
needs_refinement boolean Flag indicating if the original input was ambiguous
skill_matches array List of matched skill categories with similarity scores
intent object Extracted user intent and entity data
system_stats object Performance metrics and processing time
execution_guide string Step-by-step instructions for the following agent

Smart Refinement Skill Advanced Features

  • Multi-agent collaboration support for complex workflows involving multiple Openclaw Skills.
  • Real-time performance monitoring with sub-1ms average response times.
  • Customizable refinement and vector match thresholds via a local config.json file.
  • Intelligent caching of high-frequency keyword matches and vector calculations to further reduce latency.
  • Seamless integration with Team Managers for automated task delegation based on skill scores.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*