Back to skills
SkillHub ClubShip Full StackFull Stack

Self-Evolving Skill

Meta-cognitive self-learning system - Automated skill evolution based on predictive coding and value-driven mechanisms.

Packaged view

This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.

Stars
3,127
Hot score
99
Updated
March 20, 2026
Overall rating
C5.0
Composite score
5.0
Best-practice grade
C61.2

Install command

npx @skill-hub/cli install openclaw-skills-self-evolving-skill-1-0-2

Repository

openclaw/skills

Skill path: skills/86293073/self-evolving-skill-1-0-2

Meta-cognitive self-learning system - Automated skill evolution based on predictive coding and value-driven mechanisms.

Open repository

Best for

Primary workflow: Ship Full Stack.

Technical facets: Full Stack.

Target audience: everyone.

License: Unknown.

Original source

Catalog source: SkillHub Club.

Repository owner: openclaw.

This is still a mirrored public skill entry. Review the repository before installing into production workflows.

What it helps with

  • Install Self-Evolving Skill into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
  • Review https://github.com/openclaw/skills before adding Self-Evolving Skill to shared team environments
  • Use Self-Evolving Skill for development workflows

Works across

Claude CodeCodex CLIGemini CLIOpenCode

Favorites: 0.

Sub-skills: 0.

Aggregator: No.

Original source / Raw SKILL.md

---
name: Self-Evolving Skill
description: Meta-cognitive self-learning system - Automated skill evolution based on predictive coding and value-driven mechanisms.
homepage: https://github.com/whtoo/self-evolving-bot

---


# Self-Evolving Skill

元认知自学习系统 - 基于预测编码和价值驱动的Skill自动演化。

## 功能

- **ResidualPyramid金字塔分解,量化认知缺口
-**: 残差 **自适应反思触发**: 基于残差能量自动判断何时需要学习
- **经验回放**: 缓存已学模式,降低重复触发
- **价值门控**: 只有提升长期价值才接受变异
- **持久化**: 经验自动保存/加载

## 安装

```bash
# 技能已安装到 ~/.openclaw/skills/self-evolving-skill
# 或使用ClawHub
clawhub install self-evolving-skill
```

## 架构

```
self-evolving-skill/
├── core/                      # Python核心
│   ├── residual_pyramid.py     # 残差金字塔(SVD分解)
│   ├── reflection_trigger.py  # 自适应触发器
│   ├── experience_replay.py   # 经验回放缓存
│   ├── skill_engine.py        # 核心引擎+ValueGate
│   ├── storage.py             # 持久化
│   └── mcp_server.py          # MCP服务器
├── src/                       # TypeScript SDK
│   ├── index.ts               # 主入口
│   ├── cli.ts                 # CLI
│   └── mcp-tools.ts           # 工具定义
├── skills/                    # OpenClaw Skill
│   └── self-evolving-skill/    # 技能封装
├── MCP_CONFIG.md              # MCP配置
└── README.md                   # 文档
```

## MCP工具

| 工具 | 描述 | 参数 |
|------|------|------|
| `skill_create` | 创建Skill | `name`, `description` |
| `skill_execute` | 执行并学习 | `skill_id`, `context`, `success`, `value` |
| `skill_analyze` | 分析嵌入 | `embedding` |
| `skill_list` | 列出Skills | - |
| `skill_stats` | 系统统计 | - |
| `skill_save` | 持久化保存 | `skill_id` |
| `skill_load` | 加载 | `skill_id` |

## 使用方式

### CLI

```bash
# 列出所有Skill
openclaw skill self-evolving-skill list

# 创建Skill
openclaw skill self-evolving-skill create --name "MySkill"

# 执行
openclaw skill self-evolving-skill execute <id> --success

# 分析
openclaw skill self-evolving-skill analyze --embedding '[0.1,0.2,...]'

# 统计
openclaw skill self-evolving-skill stats
```

### MCP服务器

```bash
# 启动MCP服务器
cd ~/.openclaw/skills/self-evolving-skill
./run_mcp.sh

# 或使用适配器
python3 mcporter_adapter.py skill_list '{}'
```

### 编程

```typescript
import { SelfEvolvingSkillEngine } from 'self-evolving-skill';

const engine = new SelfEvolvingSkillEngine();
await engine.init();

const { skillId } = await engine.createSkill({ name: 'Analyzer' });
const stats = await engine.stats();
```

## 核心算法

### 1. 残差金字塔分解

```python
pyramid = ResidualPyramid(max_layers=5, use_pca=True)
decomposition = pyramid.decompose(embedding)

# 输出:
# - residual_ratio: 残差能量比率
# - suggested_abstraction: POLICY / SUB_SKILL / PREDICATE
# - novelty_score: 综合新颖性
```

### 2. 三层跃迁规则

| 覆盖率 | 抽象层级 | 操作 |
|--------|---------|------|
| >80% | POLICY | 调整策略权重 |
| 40-80% | SUB_SKILL | 生成子Skill |
| <40% | PREDICATE | 归纳新谓词 |

### 3. 自适应阈值

```python
trigger = ReflectionTrigger(
  min_energy_ratio=0.10,     # 初始阈值
  value_gain_threshold=0.20, # 触发阈值
  target_trigger_rate=0.15   # 目标15%触发率
)
```

## 文件位置

| 路径 | 说明 |
|------|------|
| `~/.openclaw/skills/self-evolving-skill` | 技能根目录 |
| `~/.openclaw/mcp_servers/self-evolving-skill.json` | MCP服务器配置 |
| `~/.openclaw/workspace/self-evolving-skill/storage` | 数据存储 |

## 相关文档

- [README.md](./README.md) - 完整文档
- [MCP_CONFIG.md](./MCP_CONFIG.md) - MCP配置说明
- [MEMORY.md](../MEMORY.md) - 研究笔记


---

## Referenced Files

> The following files are referenced in this skill and included for context.

### README.md

```markdown
# Self-Evolving Skill - OpenClaw集成

## 项目结构

```
self-evolving-skill/
├── core/                    # Python核心模块
│   ├── residual_pyramid.py   # 残差金字塔分解
│   ├── reflection_trigger.py  # 自适应触发器
│   ├── experience_replay.py  # 经验回放
│   ├── skill_engine.py       # 核心引擎
│   ├── storage.py           # 持久化
│   └── mcp_server.py        # MCP服务器
├── src/                     # TypeScript封装
│   ├── index.ts            # 主入口
│   ├── cli.ts              # CLI
│   └── mcp-tools.ts        # MCP工具定义
├── skills/                 # 供OpenClaw调用
│   └── self-evolving-skill/  # OpenClaw Skill
├── SKILL.md                # 技能文档
├── package.json
└── README.md
```

## 安装到OpenClaw

```bash
# 方式1: 链接到OpenClaw skills目录
cd skills/self-evolving-skill
npm install
npm run build

# 链接
ln -s $(pwd)/skills/self-evolving-skill ~/.openclaw/skills/self-evolving-skill

# 方式2: 通过ClawHub
clawhub install self-evolving-skill
```

## OpenClaw中调用

```typescript
// 直接调用MCP工具
const result = await useTool('skill_create', {
  name: 'ProblemSolver'
});

const analysis = await useTool('skill_analyze', {
  embedding: [0.1, 0.2, 0.3, ...]
});
```

## MCP工具列表

| 工具 | 描述 | 参数 |
|------|------|------|
| `skill_create` | 创建Skill | `name`, `description` |
| `skill_execute` | 执行并学习 | `skill_id`, `context`, `success` |
| `skill_analyze` | 分析嵌入 | `embedding` |
| `skill_list` | 列出Skills | - |
| `skill_stats` | 系统统计 | - |
| `skill_save` | 持久化保存 | `skill_id` |
| `skill_load` | 加载 | `skill_id` |

## 示例

```typescript
// 1. 创建Skill
const skill = await useTool('skill_create', {
  name: 'TextAnalyzer',
  description: '文本分析自学习Skill'
});

// 2. 执行并观察学习
const result = await useTool('skill_execute', {
  skill_id: skill.skill_id,
  context: { task: 'sentiment' },
  success: true,
  value: 1.0
});

console.log('反思触发:', result.reflection_triggered);

// 3. 分析新输入
const analysis = await useTool('skill_analyze', {
  embedding: generateEmbedding(text)
});
```

## 配置

在OpenClaw配置文件中:

```yaml
skills:
  self-evolving-skill:
    max_layers: 5
    energy_threshold: 0.1
    similarity_threshold: 0.85
    target_trigger_rate: 0.15
    storage_dir: ~/.openclaw/self-evolving
```

```



---

## Skill Companion Files

> Additional files collected from the skill directory layout.

### _meta.json

```json
{
  "owner": "86293073",
  "slug": "self-evolving-skill-1-0-2",
  "displayName": "Self Evolving Skill 1.0.2",
  "latest": {
    "version": "1.0.0",
    "publishedAt": 1772541552616,
    "commit": "https://github.com/openclaw/skills/commit/6e6447361c9eaaac52b79acd707918854eda7fdd"
  },
  "history": []
}

```

Self-Evolving Skill | SkillHub