Prompt Rewriter for Openclaw

An advanced optimization service that analyzes and transforms weak prompts into structured, effective instructions for high-quality AI outputs.

hhhh124hhhh
v1.0.0
Feb 1, 2026
0
0
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install prompt-rewriter

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 prompt-rewriter 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 Prompt Rewriter?

The Prompt Rewriter is a professional-grade tool designed to bridge the gap between vague user intent and high-performance AI execution. As a core component of the Openclaw Skills ecosystem, it systematically evaluates prompts across five critical dimensions: Clarity, Specificity, Structure, Completeness, and Usability. By identifying specific weaknesses in a request, it provides users with a comprehensive quality score and actionable feedback to ensure their instructions produce consistent, reliable results.

Beyond simple editing, this skill serves as an educational bridge for developers and creators. It translates the technical nuances of prompt engineering—such as Chain of Thought, few-shot learning, and role-based framing—into practical, ready-to-use templates. Using this skill ensures that your AI agents receive the context and structure they need to minimize hallucinations and maximize output relevance, making it an essential utility for anyone building within the Openclaw Skills framework.

Prompt Rewriter Use Cases

  • Transforming one-sentence requests into detailed, multi-step instructions for complex tasks.
  • Troubleshooting ineffective prompts that result in vague or hallucinated AI responses.
  • Generating multiple variations of a prompt to conduct systematic A/B testing for performance optimization.
  • Standardizing prompt structures across a team to ensure consistent documentation and code reviews.
  • Learning advanced prompt engineering techniques through hands-on, contextual examples.

How Prompt Rewriter Works

  1. The skill captures the raw input prompt and identifies the user's primary goal and hidden constraints.
  2. It performs a multi-dimensional analysis, assigning a score from 0 to 10 based on standard engineering best practices.
  3. The system generates three distinct rewrite variations: a Conservative Fix for minimal changes, a Technique-Enhanced version for maximum effectiveness, and a Simplified version for ease of use.
  4. It presents the improved options alongside an explanation of the specific prompt engineering patterns applied, such as role-play or constraint definition.
  5. The user selects the optimal variation or uses the provided A/B testing guidance to further refine the instruction set.

Prompt Rewriter Setup

The Prompt Rewriter is a logic-based skill that operates within your agent's environment. To begin optimizing your prompts, ensure your agent is configured to recognize the prompt-rewriter skill definitions. No external dependencies or scripts are required.

# Example of initiating a prompt optimization via CLI
openclaw skill run prompt-rewriter --input "Write a code review prompt"

Prompt Rewriter Data Schema & Taxonomy

The skill utilizes a quantitative scoring matrix to evaluate prompt health and organizes its findings into a structured report.

Metric Definition Scoring Weight
Clarity Is the request unambiguous and the terminology well-defined? 0-2 Points
Specificity Are constraints, boundaries, and output formats clearly stated? 0-2 Points
Structure Is information logically organized using frameworks or steps? 0-2 Points
Completeness Is there sufficient context and are all requirements included? 0-2 Points
Usability Is the prompt reusable, adaptable, and naturally phrased? 0-2 Points

Final scores determine the prompt's readiness: 8-10 (Excellent), 6-7 (Good), 4-5 (Functional), 0-3 (Poor).

Prompt Rewriter Advanced Features

  • Multi-Variation Generation: Automatically creates three different strategic approaches for every rewritten prompt.
  • Pattern Injection: Seamlessly integrates Chain of Thought (CoT), Few-Shot Learning, and Role-Based frameworks into existing text.
  • A/B Testing Methodology: Provides specific criteria and testing steps to evaluate prompt performance across different LLM versions.
  • Iterative Refinement: Supports successive rounds of polishing based on specific user feedback or output failures.
  • Contextual Gap Identification: Specifically flags missing background information required for the AI to succeed.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0