Xpersona
S

self-improving-conversation

CLAWHUB · Unverified

Captures dialogue learnings, tone mismatches, escalation failures, and conversation quality issues. Logs redacted summaries to .learnings/. Optional project-scoped hooks use a narrow matcher. Promote to prompt files or extract skills only after explicit human review of a diff. Use when: (1) A user expresses frustration or confusion, (2) Tone mismatch is detected, (3) Context is lost mid-conversation, (4) Agent hallucinates, (5) User requests escalation, (6) Conversation is abandoned or rephrased repeatedly, (7) A missing conversational capability is identified. Skill: self-improving-conversation Owner: jose-compu Summary: Captures dialogue learnings, tone mismatches, escalation failures, and conversation quality issues. Logs redacted summaries to .learnings/. Optional project-scoped hooks use a narrow matcher. Promote to prompt files or extract skills only after explicit human review of a diff. Use when: (1) A user expresses frustration or confusion, (2) Tone mismatch is de

62
Rank
84
Safety
981
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 981 downloads reported by the source. Last updated 10/11/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 s17bzpdy0evfmqz6nx069npr3n84p7f2:self-improving-conversation
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-jose-compu-self-improving-conversation/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

144,382 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: self-improving-conversation
description: "Captures dialogue learnings, tone mismatches, escalation failures, and conversation quality issues. Logs redacted summaries to .learnings/. Optional project-scoped hooks use a narrow matcher. Promote to prompt files or extract skills only after explicit human review of a diff. Use when: (1) A user expresses frustration or confusion, (2) Tone mismatch is detected, (3) Context is lost mid-conversation, (4) Agent hallucinates, (5) User requests escalation, (6) Conversation is abandoned or rephrased repeatedly, (7) A missing conversational capability is identified."
metadata:
---

# Self-Improving Conversation Skill

Log dialogue learnings, tone issues, and conversation failures to markdown files for continuous improvement. Conversational agents can later process these into playbooks. Important patterns may be promoted to project memory after explicit human review of a diff. Optional hooks are reminder-only and project-scoped.

## First-Use Initialisation

Before logging anything, ensure the `.learnings/` directory and files exist in the project or workspace root. If any are missing, create them:

```bash
mkdir -p .learnings
[ -f .learnings/LEARNINGS.md ] || printf "# Learnings\n\nTone mismatches, context losses, hallucinations, and dialogue insights captured during conversations.\n\n**Categories**: tone_mismatch | misunderstanding | escalation_failure | context_loss | sentiment_drift | hallucination\n\n---\n" > .learnings/LEARNINGS.md
[ -f .learnings/DIALOGUE_ISSUES.md ] || printf "# Dialogue Issues Log\n\nConversation failures, misunderstandings, tone mismatches, and escalation problems.\n\n---\n" > .learnings/DIALOGUE_ISSUES.md
[ -f .learnings/FEATURE_REQUESTS.md ] || printf "# Feature Requests\n\nConversational capabilities requested by users or identified through dialogue analysis.\n\n---\n" > .learnings/FEATURE_REQUESTS.md
```

Never overwrite existing files. This is a no-op if `.learnings/` is already initialised.

Do not log personally identifiable information, auth tokens, or private user data unless the user explicitly asks for that level of detail. Prefer short summaries or redacted excerpts over raw conversation transcripts.

If you want automatic reminders or setup assistance, use the opt-in hook workflow described in [Hook Integration](#hook-integration).

## Quick Reference

| Situation | Action |
|-----------|--------|
| User says "That's not what I meant" | Log to `.learnings/DIALOGUE_ISSUES.md` with `misunderstanding` |
| Formal response to casual user | Log to `.learnings/LEARNINGS.md` with category `tone_mismatch` |
| Lost thread in multi-turn dialogue | Log to `.learnings/LEARNINGS.md` with category `context_loss` |
| Agent states incorrect facts | Log to `.learnings/LEARNINGS.md` with category `hallucination` |
| User asks for human agent | Log to `.learnings/DIALOGUE_ISSUES.md` with `escalation_failure` |
| User sentiment drops mid-conversation | Log to `.learnings/LEARNINGS.m

_meta.json

{
  "ownerId": "kn78jat5kd20evgyxzp9dmryax84qap0",
  "slug": "self-improving-conversation",
  "version": "1.1.1",
  "publishedAt": 1787943817136
}

references/examples.md

# Entry Examples

Concrete examples of well-formatted entries for conversation domain issues.

## Learning: Tone Mismatch

```markdown
## [LRN-20250115-001] tone_mismatch

**Logged**: 2025-01-15T10:30:00Z
**Priority**: medium
**Status**: pending
**Area**: response_generation

### Summary
Responded with formal corporate language when user was clearly casual

### Details
User wrote: "hey, my order's messed up lol can u fix it?"
Agent responded: "We sincerely apologize for the inconvenience you have
experienced with your order. Please provide your order reference number
so we may investigate this matter promptly."
User replied: "whoa ok chill lol just need the right size shipped"

The tone gap caused unnecessary friction. User expected a casual, quick
exchange and received a corporate apology script.

### Suggested Action
Mirror the user's register within 1-2 exchanges. If user writes casually,
respond casually while remaining helpful. Save formal tone for users who
write formally.

### Metadata
- Source: conversation
- Related Files: config/tone-profiles.yaml
- Tags: tone, formality, register-matching
- Pattern-Key: tone.formality_mismatch

---
```

## Learning: Context Loss

```markdown
## [LRN-20250118-002] context_loss

**Logged**: 2025-01-18T14:22:00Z
**Priority**: high
**Status**: pending
**Area**: follow_up

### Summary
Lost track of user's shipping address after they provided it 3 messages earlier

### Details
In a multi-turn order correction flow, user provided their updated address
in message #4. By message #7, the agent asked for the address again.
User responded: "I already told you that. 742 Evergreen Terrace."
This added 2 unnecessary exchanges and visible user frustration.

### Suggested Action
Maintain a running context summary for multi-turn flows. Before asking
for any information, scan conversation history for prior mentions.
Implement explicit context checkpoints for address, order ID, and
account details.

### Metadata
- Source: user_feedback
- Related Files: src/context/conversation-state.ts
- Tags: context, multi-turn, memory
- Pattern-Key: context.thread_loss
- See Also: LRN-20250110-005

---
```

## Learning: Hallucination

```markdown
## [LRN-20250120-003] hallucination

**Logged**: 2025-01-20T09:15:00Z
**Priority**: critical
**Status**: pending
**Area**: response_generation

### Summary
Stated incorrect business hours — told user store opens at 8 AM when actual hours are 10 AM

### Details
User asked: "What time do you open tomorrow?"
Agent responded: "We open at 8:00 AM tomorrow. Looking forward to seeing you!"
Actual business hours are 10:00 AM - 8:00 PM, Monday through Saturday.
User arrived at 8 AM to a closed store and complained via support ticket.

### Suggested Action
Never generate business hours, pricing, or policy details from memory.
Always retrieve from authoritative data source (hours API, config file).
If no data source is available, say "Let me check that for you" and
flag the gap rather than guessing.

###

references/hooks-setup.md

# Hook Setup Guide

Configure automatic conversation self-improvement triggers for AI agents.

## Overview

Hooks enable proactive dialogue learning capture by injecting reminders at key moments:
- **UserPromptSubmit**: Reminder after matching prompts to evaluate conversation learnings
- **PostToolUse (Bash)**: Dialogue error detection when conversation-related commands fail

## Claude Code Setup

### Option 1: Project-Level Configuration

Create `.claude/settings.json` in your project root:

```json
{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "dialogue|conversation|chatbot|intent|escalat|tone|hallucin",
        "hooks": [
          {
            "type": "command",
            "command": "./skills/self-improving-conversation/scripts/activator.sh"
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "./skills/self-improving-conversation/scripts/error-detector.sh"
          }
        ]
      }
    ]
  }
}
```

### Option 2: User-Level Configuration (discouraged)

Do **not** install this hook globally. User-level hooks persist across all repositories and sessions. Keep hooks project-scoped. The example below is shown only so you can recognize and remove it:

```json
{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "dialogue|conversation|chatbot|intent|escalat|tone|hallucin",
        "hooks": [
          {
            "type": "command",
            "command": "~/.claude/skills/self-improving-conversation/scripts/activator.sh"
          }
        ]
      }
    ]
  }
}
```

### Minimal Setup (Activator Only)

For lower overhead, use only the UserPromptSubmit hook:

```json
{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "dialogue|conversation|chatbot|intent|escalat|tone|hallucin",
        "hooks": [
          {
            "type": "command",
            "command": "./skills/self-improving-conversation/scripts/activator.sh"
          }
        ]
      }
    ]
  }
}
```

## Codex CLI Setup

Codex uses the same hook system as Claude Code. Create `.codex/settings.json`:

```json
{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "dialogue|conversation|chatbot|intent|escalat|tone|hallucin",
        "hooks": [
          {
            "type": "command",
            "command": "./skills/self-improving-conversation/scripts/activator.sh"
          }
        ]
      }
    ]
  }
}
```

## GitHub Copilot Setup

Copilot doesn't support hooks directly. Instead, add guidance to `.github/copilot-instructions.md`:

```markdown
## Conversation Self-Improvement

After handling dialogue interactions that involved:
- Tone mismatches or formality gaps
- Misunderstood user intent
- Failed escalation to human agent
- Context loss in multi-turn conversations
- Hallucinated facts or policies

Consider logging the learning to `.learnings/` using the format from the self-improvin

references/openclaw-integration.md

# OpenClaw Integration

Complete setup and usage guide for integrating the conversation self-improvement skill with OpenClaw.

## Overview

OpenClaw uses workspace-based prompt injection combined with event-driven hooks. Conversational context is injected from workspace files at session start, and hooks can trigger on lifecycle events to capture dialogue learnings.

## Workspace Structure

```
~/.openclaw/                      
├── workspace/                   # Working directory
│   ├── AGENTS.md               # Dialogue workflows, escalation protocols, handoff procedures
│   ├── SOUL.md                 # Conversational personality, tone guidelines, empathy rules
│   ├── TOOLS.md                # Channel capabilities, integration gotchas, API limits
│   ├── MEMORY.md               # Long-term memory (main session only)
│   └── memory/                 # Daily memory files
│       └── YYYY-MM-DD.md
├── skills/                      # Installed skills
│   └── self-improving-conversation/
│       └── SKILL.md
└── hooks/                       # Custom hooks
    └── self-improving-conversation/
        ├── HOOK.md
        └── handler.ts
```

## Quick Setup

### 1. Install the Skill

```bash
clawdhub install self-improving-conversation
```

Or copy manually:

```bash
cp -r self-improving-conversation ~/.openclaw/skills/
```

### 2. Install the Hook (Optional)

```bash
cp -r hooks/openclaw ~/.openclaw/hooks/self-improving-conversation
openclaw hooks enable self-improving-conversation
```

### 3. Create Learning Files

```bash
mkdir -p ~/.openclaw/workspace/.learnings
```

## Injected Prompt Files

### AGENTS.md

Purpose: Dialogue workflows, escalation chains, and handoff protocols.

```markdown
# Dialogue Coordination

## Escalation Protocol
- First escalation request: acknowledge and offer one more attempt
- Second request: initiate handoff immediately
- Never require more than 2 requests

## Multi-Turn Flow Management
- Maintain context summary across turns
- Checkpoint critical data (order ID, address, account)
- Confirm understanding before proceeding to next step
```

### SOUL.md

Purpose: Conversational personality, tone adaptation, empathy guidelines.

```markdown
# Conversational Personality

## Tone Adaptation
- Mirror user's formality level within 2 exchanges
- Match vocabulary complexity to user's language
- Use empathy markers when user shows frustration

## Honesty Policy
- Never fabricate facts, hours, prices, or policies
- Say "Let me check" when uncertain
- Correct errors immediately when discovered
```

### TOOLS.md

Purpose: Channel capabilities, integration limits, conversation constraints.

```markdown
# Channel Knowledge

## Web Chat
- Max message length: 2000 chars
- Supports rich formatting and links

## Slack
- Thread context may be lost after 50+ messages
- Emoji reactions as lightweight feedback signals

## Voice
- Keep responses under 30 seconds spoken
- Avoid complex lists; use sequential confirmation
```

## Learning Workflow

Sponsored

Ads related to self-improving-conversation and adjacent AI workflows.