Xpersona
R

Refines ambiguous or high-risk user requests before execution. Trigger when the request is underspecified, likely to benefit from clearer constraints or verification, or when the user explicitly asks to refine, improve, optimize, refactor, or compare appr

CLAWHUB · Unverified

Refines ambiguous or high-risk user requests before execution. Trigger when the request is underspecified, likely to benefit from clearer constraints or veri...

62
Rank
84
Safety
1.6k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s1728p25v3hyr2n7qt74s00r7h84ecm4:self-improving-prompt
  1. Install using `clawhub skill install s1728p25v3hyr2n7qt74s00r7h84ecm4:self-improving-prompt` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/lq434239/self-improving-prompt before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-lq434239-self-improving-prompt/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

44,380 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: self-improving-prompt
description: Refines ambiguous or high-risk user requests before execution. Trigger when the request is underspecified, likely to benefit from clearer constraints or verification, or when the user explicitly asks to refine, improve, optimize, refactor, or compare approaches. Skip clear single-step instructions and already-well-scoped tasks.
---

# self-improving-prompt

> Good prompt refinement reduces ambiguity and execution risk. It should not add routine friction to already clear work.

Transform vague or high-risk user prompts into clearer, actionable, verifiable versions. Use this skill selectively: only when refinement materially improves scope, constraints, output expectations, or acceptance criteria.

This skill works standalone.
When paired with `self-improving-session`, the two skills form a closed loop:
- `self-improving-prompt` shapes how the current task is framed and executed
- `self-improving-session` learns durable workflow rules from the behavior patterns that emerge during those sessions

`self-improving-session` should learn from behavior and outcomes, not from storing the refined prompt text itself.

## Security and Runtime

- Instruction-only skill; no bundled scripts or external services required
- No credentials, API keys, or network access required for normal use
- No persistent configuration changes are required to use the skill
- Optional automation snippets belong in README only and are not part of the core runtime behavior

## Quick Reference

| Situation | Action |
|-----------|--------|
| Clear atomic instruction | Execute directly |
| Clear multi-step request with low ambiguity | Execute directly |
| Moderately ambiguous request | Refine silently, then execute |
| High-risk or highly ambiguous request | Show refined prompt and ask user to choose |
| User explicitly says "just do it" | Show refined version only if useful, then execute |
| User explicitly says "only refine" | Return refined prompt, do not execute |
| User explicitly asks to compare wording or approach | Show refined prompt and ask user to choose |

## Trigger Threshold

Do **not** trigger on nearly all input. Trigger only when at least one of these is true:

- The request is ambiguous enough that you could reasonably execute it in multiple materially different ways
- The task is high-risk, expensive, or difficult to verify without clearer scope
- The user explicitly asks to refine, optimize, improve, refactor, compare, or tighten the request
- The current wording is missing acceptance criteria, non-goals, or output expectations, and those omissions are likely to cause rework

Skip refinement when the request is already specific enough to execute safely.

## When NOT to Apply

Skip refinement for:

- Single-word confirmations or short continuations ("yes", "ok", "continue")
- Clear atomic edits ("delete line 3", "rename x to y", "change the string to 'abc'")
- Straightforward factual questions with a clear target
- Well-

_meta.json

{
  "ownerId": "kn708rsj4mxws9pdf4gmse60jh84fb6d",
  "slug": "self-improving-prompt",
  "version": "1.0.3",
  "publishedAt": 1776157948156
}

references/decision-matrix.md

# Decision Matrix

Use this table when deciding whether to execute directly, refine silently, or compare-first.

## Step 1: Judge Clarity

The request is **clear** if all of these are true:

- the main goal is obvious
- the scope is narrow enough to act on safely
- the likely deliverable is obvious
- there is no major ambiguity that would change execution direction

Otherwise treat it as **ambiguous**.

## Step 2: Judge Risk

The request is **high-risk** if one or more of these are true:

- expensive or time-consuming to execute incorrectly
- likely to cause broad code changes
- likely to require rework if assumptions are wrong
- hard to verify without explicit success criteria
- touches design, architecture, performance, migrations, or destructive changes

Otherwise treat it as **low-risk**.

## Step 3: Pick the Mode

| Clarity | Risk | Default Mode |
|--------|------|--------------|
| Clear | Low | Execute directly |
| Clear | High | Silent refinement |
| Ambiguous | Low | Silent refinement |
| Ambiguous | High | Compare-first |

## Overrides

### Force `execute directly`

Use direct execution when:

- the user explicitly says not to refine
- the request is atomic and unambiguous
- refinement would only restate the task

### Choose `compare-first`

Use compare-first when:

- the user explicitly asks to compare prompt versions
- or the substantial-value threshold is met

### Force `refine only`

Use refine-only when:

- the user asks for wording help without execution

## Compare-First Guardrail

Do not choose compare-first unless the refined version adds at least two of:

- goal or success condition
- scope or non-goals
- output format
- verification or acceptance criteria
- resolution of a meaningful ambiguity

If not, prefer silent refinement.

## Loop Prevention

After one compare-first cycle, do not open a second compare-first cycle for the same request unless the user explicitly asks for another rewrite.

references/details.md

# self-improving-prompt Reference Details

## Compare-First Rules

Use compare-first only when one of these is true:

- refinement adds substantial value, or
- the user explicitly asks to compare or refine wording first

Substantial value means the refined prompt adds at least two of:

- clearer goal or success condition
- explicit scope or non-goals
- verification or acceptance criteria
- output format
- resolution of a meaningful ambiguity

If that threshold is not met, do not interrupt with a compare step.

## Interaction Flow

### Preferred flow

1. Show the refined prompt in chat
2. Ask the user to choose refined vs original

Preferred tool:

- `AskUserQuestion`

Fallback:

- plain-text confirmation in chat if `AskUserQuestion` is unavailable or disallowed

Never show a compare choice before showing the refined prompt itself.

## Learning Signal Event Types

Normalized preference events passed forward for later summarization:

| Event | Meaning |
|-------|---------|
| `choose_refined` | User chose the refined version |
| `choose_original` | User chose the original version |
| `explicit_no_compare` | User explicitly said not to compare versions |
| `explicit_compare_first` | User explicitly asked to compare versions first |
| `refine_only_requested` | User wants prompt refinement without execution |

Rules:

- Store labels only, never the full refined prompt
- Do not attach task-specific details
- Treat explicit verbal corrections as stronger than passive event counts
- Do not infer workflow acceptance from the absence of a complaint

## Clarification Question Rules

If critical context is missing:

- ask at most 1 to 2 blocking questions
- if missing info is optional rather than blocking, proceed
- do not ask questions merely to make the process feel thorough

references/non-examples.md

# Non-Examples

These are examples that should usually **not** trigger compare-first, and often should skip refinement entirely.

## Usually Execute Directly

- `rename foo to bar`
- `delete line 3`
- `change the button text to Continue`
- `explain what this error means`
- `what does this function do`
- `format this file`
- `update the version to 1.2.3`

## Usually Silent Refinement, Not Compare-First

- `help me check this bug`
- `review this file for issues`
- `look at why this page is slow`
- `optimize this query`

Reason:

- these requests may benefit from better internal framing
- but the user usually does not need a rewritten prompt unless the refinement materially changes execution

## Do Not Overreact to Keywords

The presence of words like these does **not** automatically mean compare-first:

- `optimize`
- `improve`
- `refactor`
- `design`
- `performance`

Treat them as signals only. Still apply the decision matrix.

## Questions That Are Still Just Questions

These should usually remain normal questions, not become prompt-comparison flows:

- `why does this keep rerendering`
- `is this method called too often`
- `what is causing this crash`
- `is this implementation okay`

Only escalate to compare-first if the ambiguity is high enough to change how you would proceed.

Sponsored

Ads related to Refines ambiguous or high-risk user requests before execution. Trigger when the request is underspecified, likely to benefit from clearer constraints or verification, or when the user explicitly asks to refine, improve, optimize, refactor, or compare appr and adjacent AI workflows.