Xpersona
S

self-improving-meta

CLAWHUB · Unverified

Logs agent-infrastructure issues (prompt drift, rule conflicts, hook failures, context bloat). Default is log-only. Claude/Codex project hooks fire only on explicit meta signals (self-improving-meta, prompt-governance, stackability). The optional OpenClaw agent:bootstrap hook is session-start and not matcher-gated; if enabled it injects a log-only reminder and must not edit files. Does not edit AGENTS.md, SOUL.md, TOOLS.md, MEMORY.md, hooks, or skills unless the user requests a reviewed diff in the current session. Use when prompt-file instructions are misread, a hook fails, a skill does not activate, rules conflict, prompt files waste context, memory is stale, or a skill template is incomplete.

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K 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-meta
  1. Install using `clawhub skill install s17bzpdy0evfmqz6nx069npr3n84p7f2:self-improving-meta` 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/jose-compu/self-improving-meta before using production credentials.

Contract: missing

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

147,024 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: self-improving-meta
description: "Logs agent-infrastructure issues (prompt drift, rule conflicts, hook failures, context bloat). Default is log-only. Claude/Codex project hooks fire only on explicit meta signals (self-improving-meta, prompt-governance, stackability). The optional OpenClaw agent:bootstrap hook is session-start and not matcher-gated; if enabled it injects a log-only reminder and must not edit files. Does not edit AGENTS.md, SOUL.md, TOOLS.md, MEMORY.md, hooks, or skills unless the user requests a reviewed diff in the current session. Use when prompt-file instructions are misread, a hook fails, a skill does not activate, rules conflict, prompt files waste context, memory is stale, or a skill template is incomplete."
---

# Self-Improving Meta Skill

Log infrastructure learnings, meta issues, and feature requests to markdown files for continuous improvement of the agent system itself. Captures prompt drift, rule conflicts, skill gaps, hook failures, context bloat, and instruction ambiguity. Important learnings may be promoted into the files they govern — prompt files, hook code, rule files, skill templates, and memory policies — after explicit human review.

This is the skill that **logs** infrastructure problems other skills depend on. It does not apply infrastructure edits by default. Propose patches; apply them only when the user asks in this session.

## 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 "# Meta Learnings\n\nPrompt drift, rule conflicts, skill gaps, hook failures, context bloat, and instruction ambiguity.\n\n**Categories**: prompt_drift | rule_conflict | skill_gap | hook_failure | context_bloat | instruction_ambiguity\n**Areas**: agent_config | skill_authoring | hook_scripts | prompt_files | rule_files | memory_management | extension_api\n\n---\n" > .learnings/LEARNINGS.md
[ -f .learnings/META_ISSUES.md ] || printf "# Meta Issues Log\n\nInfrastructure failures: hook crashes, skill activation problems, prompt file errors, memory corruption, extension breakage.\n\n---\n" > .learnings/META_ISSUES.md
[ -f .learnings/FEATURE_REQUESTS.md ] || printf "# Feature Requests\n\nCapabilities needed for agent infrastructure, skill authoring, hook development, and prompt management.\n\n---\n" > .learnings/FEATURE_REQUESTS.md
```

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

Do not log secrets, tokens, private keys, or environment variables. Prefer short summaries or redacted excerpts over raw file contents.

Use a manual-first workflow by default. If you want reminders, use the opt-in hook workflow described in [Hook Integration](#hook-integration).

## Safety Boundaries

- Default is **log-only**. Do not edit `AGENTS.md`, `SOUL.md`, `TOOLS.md`, `MEMORY.md`, hooks, rules, or skill files un

_meta.json

{
  "ownerId": "kn78jat5kd20evgyxzp9dmryax84qap0",
  "slug": "self-improving-meta",
  "version": "1.2.4",
  "publishedAt": 1787954380904
}

references/examples.md

# Entry Examples

Concrete examples of well-formatted meta entries with all fields.

## Learning: Instruction Ambiguity (Vague Delegation Threshold)

```markdown
## [LRN-20250415-001] instruction_ambiguity

**Logged**: 2025-04-15T10:30:00Z
**Priority**: high
**Status**: pending
**Area**: agent_config

### Summary
AGENTS.md says "use sub-agents for long tasks" but doesn't define "long" — causing inconsistent delegation

### Details
The delegation section in AGENTS.md states: "For long-running tasks, delegate to a sub-agent."
Different sessions interpret "long" differently — some delegate after 5 minutes of work,
others only after 10+ steps, and some never delegate at all. The instruction lacks a
concrete threshold (time-based, step-count-based, or complexity-based), resulting in
wildly inconsistent behavior across sessions.

### Suggested Action
Rewrite the delegation rule with explicit thresholds:
- "Delegate to a sub-agent when a task requires more than 8 tool calls OR
  involves modifying files in 3+ directories OR touches both frontend and backend."

Remove the vague "long-running" phrasing entirely.

### Metadata
- Source: agent_behavior_observation
- Affected Files: AGENTS.md (delegation section)
- Tags: delegation, threshold, ambiguity, agents-md
- Pattern-Key: instruction_ambiguity.vague_threshold

---
```

## Learning: Rule Conflict (Package Manager Contradiction)

```markdown
## [LRN-20250416-001] rule_conflict

**Logged**: 2025-04-16T09:00:00Z
**Priority**: high
**Status**: pending
**Area**: rule_files

### Summary
CLAUDE.md says "always use pnpm" but AGENTS.md workflow step says "npm install" — agent confused

### Details
CLAUDE.md line 42: "Package management: always use pnpm for all install and run commands."
AGENTS.md line 118 (setup workflow): "Step 3: Run `npm install` to install dependencies."

When the agent encounters the setup workflow, it faces contradictory instructions.
In 3 out of 5 sessions observed, the agent used npm (following AGENTS.md workflow order),
in 2 it used pnpm (following CLAUDE.md rule). Neither outcome was consistent.

### Suggested Action
1. Identify the authoritative source for package manager choice (CLAUDE.md for conventions)
2. Update AGENTS.md workflow step to use `pnpm install`
3. Grep all prompt files for "npm " and replace with "pnpm " where appropriate
4. Add a "Single Source of Truth" comment in AGENTS.md pointing to CLAUDE.md for tool conventions

### Metadata
- Source: agent_behavior_observation
- Affected Files: CLAUDE.md, AGENTS.md
- Tags: rule-conflict, package-manager, pnpm, npm, contradiction
- Pattern-Key: rule_conflict.package_manager

---
```

## Learning: Context Bloat (Verbose SOUL.md)

```markdown
## [LRN-20250417-001] context_bloat

**Logged**: 2025-04-17T14:00:00Z
**Priority**: medium
**Status**: pending
**Area**: prompt_files

### Summary
SOUL.md grew to 400 lines with redundant personality directives, wasting ~2K tokens per session

### Details
SOUL.md accumulated personality dir

references/hooks-setup.md

# Hook Setup Guide

Configure automatic meta self-improvement triggers for AI coding agents.

## Overview

Hooks can help capture infrastructure learnings with minimal overhead:
- **UserPromptSubmit** (recommended): Reminder after matching prompts to evaluate meta learnings
- **PostToolUse (Bash)** (optional): Conservative error-pattern reminder based on command output in trusted environments

## Claude Code Setup

### Option 1: Project-Level Configuration

Create `.claude/settings.json` in your project root (activator-only recommended):

```json
{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "self-improving-meta|prompt-governance|stackability|instruction.ambiguity|rule.conflict|context.bloat",
        "hooks": [
          {
            "type": "command",
            "command": "./skills/self-improving-meta/scripts/activator.sh"
          }
        ]
      }
    ]
  }
}
```

### Optional: Add PostToolUse Error Detector

Enable this only when you explicitly want command-output pattern checks:

```json
{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "./skills/self-improving-meta/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": "self-improving-meta|prompt-governance|stackability|instruction.ambiguity|rule.conflict|context.bloat",
        "hooks": [
          {
            "type": "command",
            "command": "~/.claude/skills/self-improving-meta/scripts/activator.sh"
          }
        ]
      }
    ]
  }
}
```

### Minimal Setup (Activator Only)

For lower overhead, use only the UserPromptSubmit hook:

```json
{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "self-improving-meta|prompt-governance|stackability|instruction.ambiguity|rule.conflict|context.bloat",
        "hooks": [
          {
            "type": "command",
            "command": "./skills/self-improving-meta/scripts/activator.sh"
          }
        ]
      }
    ]
  }
}
```

## Codex CLI Setup

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

```json
{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "self-improving-meta|prompt-governance|stackability|instruction.ambiguity|rule.conflict|context.bloat",
        "hooks": [
          {
            "type": "command",
            "command": "./skills/self-improving-meta/scripts/activator.sh"
          }
        ]
      }
    ]
  }
}
```

## GitHub Copilot Setup

Copilot doesn't support hooks. Add guidance to `.github/copilot-instructions.md`:

```markdown
## Meta Self-Improvement

After modifying agent confi

references/openclaw-integration.md

# OpenClaw Integration

Complete setup and usage guide for integrating the self-improving-meta skill with OpenClaw.

## Overview

OpenClaw uses workspace-based prompt injection combined with event-driven hooks. The meta skill **logs** infrastructure issues. It does not edit shared prompt files unless the user requests a reviewed diff in the current session.

## Workspace Structure

```
~/.openclaw/
├── workspace/                   # Working directory
│   ├── AGENTS.md               # Multi-agent coordination patterns
│   ├── SOUL.md                 # Behavioral guidelines and personality
│   ├── TOOLS.md                # Tool capabilities and gotchas
│   ├── MEMORY.md               # Long-term memory (main session only)
│   └── memory/                 # Daily memory files
│       └── YYYY-MM-DD.md
├── skills/                      # Installed skills
│   └── self-improving-meta/
│       └── SKILL.md
└── hooks/                       # Custom hooks
    └── self-improving-meta/
        ├── HOOK.md
        └── handler.ts
```

## Quick Setup

### 1. Install the Skill

```bash
clawdhub install self-improving-meta
```

Or copy the local folder. A `git clone` is optional network access; use only trusted sources.

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

### 2. Install the Hook (Optional)

The OpenClaw hook is **session-start** (`agent:bootstrap`), not matcher-gated. It injects a **log-only** reminder. Skip it unless you want that reminder.

Do **not** copy into `~/.openclaw/hooks/` (user-global). Keep hooks in this workspace:

```bash
mkdir -p .openclaw/hooks
cp -r hooks/openclaw .openclaw/hooks/self-improving-meta
```

### 3. Create Learning Files

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

## Promotion Targets (Meta-Specific)

Meta-learnings promote into the files they govern only after explicit user approval of a reviewed diff:

| Learning Type | Promote To | Example |
|---------------|------------|---------|
| Agent behavior corrections | `SOUL.md` | "Be concise" repeated 6 ways → single directive |
| Workflow/delegation improvements | `AGENTS.md` | Vague "long tasks" → explicit step-count threshold |
| Tool integration fixes | `TOOLS.md` | Missing MCP timeout guidance → add retry config |
| Memory management patterns | `MEMORY.md` | Stale entries accumulating → add 30-day rotation policy |
| Skill authoring improvements | Affected `SKILL.md` | Missing frontmatter field → update template |
| Hook code fixes | Hook source code | Silent failure → add output validation |
| Rule clarifications | Rule file (after approval) | Ambiguous trigger → explicit condition |

### Promotion Decision Tree

```
Is it about agent behavior or personality?
├── Yes → Promote to SOUL.md
└── No → Is it about workflows or delegation?
    ├── Yes → Promote to AGENTS.md
    └── No → Is it about tool usage or integration?
        ├── Yes → Promote to TOOLS.md
        └── No → Is it about memory management?
            ├── Yes → Promote to MEMORY.md
 

Sponsored

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