Self Evolving Skill
Meta-cognitive self-learning system - Automated skill evolution based on predictive coding and value-driven mechanisms.
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 27 · 7.8k · 55 current installs · 61 all-time installs
bybltdz Orion@whtoo
MIT-0
Security Scan
OpenClaw
Suspicious
medium confidencePurpose & Capability
The skill claims a Python core (core/*.py) and an MCP server, and the adapter/imports (mcporter_adapter.py, src/index.ts) expect those core modules. However the repository/package as provided does not include the core/ Python files referenced throughout the docs and code. There are also hardcoded default storage paths (/Users/blitz/...) in multiple places which are unrelated to the skill's stated purpose and indicate leftovers from a developer environment. These inconsistencies mean the shipped files cannot legitimately implement the described capabilities as-is.
Instruction Scope
SKILL.md and INSTALLATION.md instruct activating a venv, running an MCP server (run_mcp.sh / mcp_server.py) and manipulating ~/.openclaw/mcp_servers.json, but no run_mcp.sh and the core Python modules that would implement mcp_server.py are missing. The provided mcporter_adapter.py uses environment variables (MCP_STORAGE_DIR) and will attempt to import core modules that are not present. The mismatch gives the agent broad discretion to run commands that will fail or behave unexpectedly if the missing components are supplied later (unknown behavior).
Install Mechanism
There is no remote install spec or network download; install.sh simply symlinks the skill directory into ~/.openclaw/skills and copies the adapter. That is low-risk in terms of remote code fetch. However INSTALLATION.md claims a venv and automatic MCP registration exist (and shows an mcp_servers.json entry), but install.sh does not create a venv or modify mcp_servers.json — the docs and script are inconsistent.
Credentials
The skill declares no required env vars, which matches registry metadata. In practice the code uses env vars like MCP_STORAGE_DIR and STORAGE_DIR and falls back to hardcoded defaults (including /Users/blitz/...). No cloud credentials or tokens are requested. The hardcoded absolute paths and developer-specific defaults are concerning because they may point to sample data or inadvertently expose local filesystem expectations.
Persistence & Privilege
The skill does not request elevated privileges and always:false. install.sh only writes/symlinks under the user's home (~/.openclaw/skills and a storage dir). Documentation shows how an MCP server entry could be added to OpenClaw's mcp_servers.json, but the included installer does not modify system-wide agent settings automatically. Persistence is limited to the user's OpenClaw skill and storage directories.
What to consider before installing
Do not install blindly. Key red flags: (1) the Python core modules referenced throughout the docs and adapter (core/*.py, mcp_server.py) are missing from the package — without them the skill cannot operate as described; (2) several files use hardcoded developer paths (/Users/blitz/...), which suggests the package was packaged from a developer environment and may contain stale defaults; (3) INSTALLATION.md and SKILL.md reference a virtualenv and auto-registered MCP server, but install.sh does not create a venv or modify mcp_servers.json — this mismatch could cause surprising behavior if you add missing components later. Recommended steps before using: inspect the missing core/ files (if you obtain them), review any mcp_server.py for network endpoints or remote telemetry, search for code that persists or executes stored policies (review how saved skills are deserialized/executed), and remove or change hardcoded paths. If you cannot obtain or review the missing core Python files, treat the skill as untrusted and avoid installing it into your OpenClaw skills directory.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.2
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
Self-Evolving Skill
元认知自学习系统 - 基于预测编码和价值驱动的Skill自动演化。
功能
- ResidualPyramid金字塔分解,量化认知缺口 -: 残差 自适应反思触发: 基于残差能量自动判断何时需要学习
- 经验回放: 缓存已学模式,降低重复触发
- 价值门控: 只有提升长期价值才接受变异
- 持久化: 经验自动保存/加载
安装
# 技能已安装到 ~/.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
# 列出所有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服务器
# 启动MCP服务器
cd ~/.openclaw/skills/self-evolving-skill
./run_mcp.sh
# 或使用适配器
python3 mcporter_adapter.py skill_list '{}'
编程
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. 残差金字塔分解
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. 自适应阈值
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 - 完整文档
- MCP_CONFIG.md - MCP配置说明
- MEMORY.md - 研究笔记
Files
11 totalSelect a file
Select a file to preview.
Comments
Loading comments…
