capability-evolver
This skill is a self-evolution engine that inspects session logs and can autonomously edit or create skills and knowledge files (e.g., memory/KNOWLEDGE_BASE/LESSONS_LEARNED.md, skills/). It reads ../../memory/feishu_token.json/process.env (MEMORY_DIR, AGENT_NAME, EVOLVE_REPORT_TOOL), runs git log via execSync, and posts reports to https://open.feishu.cn/open-apis/docx/v1/documents/${DOC_TOKEN}/blocks/${DOC_TOKEN}/children.
🧬 Capability Evolver
<p align="center"> <img src="https://github.com/autogame-17/capability-evolver/raw/main/assets/cover.png" alt="Evolver Cover" width="100%"> </p>🇨🇳 中文文档
"Evolution is not optional. Adapt or die."
The Capability Evolver is a meta-skill that empowers OpenClaw agents to introspect their own runtime logs, identify inefficiencies or errors, and autonomously write code patches to improve their own performance.
It features a Genetic Mutation Protocol to introduce controlled behavioral drift, preventing the agent from getting stuck in local optima.
✨ Features
- 🔍 Auto-Log Analysis: Scans session logs (
.jsonl) for errors and patterns. - 🛠️ Self-Repair: Detects runtime crashes and writes fixes.
- 🧬 Genetic Mutation: Randomized "mutation" cycles to encourage innovation over stagnation.
- 🔌 Dynamic Integration: Automatically detects and uses local tools (like
git-syncorfeishu-card) if available, but works out-of-the-box without them. - 🐕 Mad Dog Mode: Continuous self-healing loop.
📦 Usage
Standard Run (Automated)
node skills/capability-evolver/index.js
Review Mode (Human-in-the-Loop)
Pauses for human confirmation before applying changes.
node skills/capability-evolver/index.js --review
Continuous Loop (Daemon)
Runs indefinitely. Ideal for background services.
node skills/capability-evolver/index.js --loop
⚙️ Configuration
The skill adapts to your environment.
| Env Var | Description | Default |
|---|---|---|
EVOLVE_REPORT_TOOL | Tool to use for reporting (e.g., feishu-card) | message |
MEMORY_DIR | Path to agent memory | ../../memory |
🛡️ Safety Protocols
- Single Process: The evolver cannot spawn child evolvers (prevents fork bombs).
- Stabilization: If recent errors are high, it forces a Repair Mutation (bug fixing) instead of innovation.
- Environment Check: External integrations (like Git syncing) are only enabled if the corresponding skills are present.
📜 License
MIT