self-improving

self-improving is a skill for Claude Code, Codex from MuduiClaw/ClawKing. It costs 0 tokens per session (771 once invoked), scanned A, original, MIT.

A system for recording lessons from corrections, tool failures, completed tasks, and better working methods. Lessons are stored in a file, searched when new tasks begin, and sometimes promoted into permanent agent rules.

In plain words
What is it for?
Use it to record recurring errors, retrieve relevant lessons before work, review important tasks, and promote critical or frequently repeated lessons into agent instructions.
Why use it?
It helps an agent avoid repeating known mistakes by turning past failures and improvements into searchable guidance.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/muduiclaw/clawking/self-improving
Any agent
npx skills add MuduiClaw/ClawKing --skill self-improving
Clone the repo
git clone --depth 1 https://github.com/MuduiClaw/ClawKing

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for self-improving

README.md
[![agentmods](https://agentmods.dev/badge/skills/muduiclaw/clawking/self-improving.svg)](https://agentmods.dev/skills/muduiclaw/clawking/self-improving)
Your own site
<a href="https://agentmods.dev/skills/muduiclaw/clawking/self-improving"><img src="https://agentmods.dev/badge/skills/muduiclaw/clawking/self-improving.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 771 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00771
Opus 5 $0.00000 $0.00385
Sonnet 5 $0.00000 $0.00154
Haiku 4.5 $0.00000 $0.00077

Measured 5d ago against content hash 476a27b9c599, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

self-improving scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

workspace/skills/self-improving/SKILL.md · 75 lines

What it actually says

Self-Improving — 教训管理体系

基于 ClawHub self-improving(ivangdavila)+ self-improving-agent(pskoett)改写

触发条件

  • 被用户纠正
  • 操作/工具执行失败
  • 完成重要任务后复盘
  • 发现更好的做法
  • 启动新任务时主动检索相关教训

快速参考

场景 动作
被纠正 记录到 memory/archive/lessons.md,格式见 references/format.md
操作失败 同上。先归因再记录,修根因不打补丁
新增教训 grep "pattern_key:.*关键词" memory/archive/lessons.md 去重。命中 → 更新复现计数;未命中 → 新建
任务启动 memory_search("lessons + 关键词") 检索相关教训
发现复现 ≥3 检查是否需要晋升(见 references/promotion.md
完成重要任务 主动自评:哪里做得好、哪里可以改进、有无新教训

教训格式(速查)

## [LSN-YYYYMMDD-XXX] pattern_key: 关键词

- **优先级**: critical | high | medium | low
- **状态**: pending | resolved | promoted → <目标文件>
- **复现**: N 次(日期列表)
- **领域**: infra | content | product | trading | ops

### 摘要
一句话描述

### 触发场景 + 错误模式
什么情况下犯的、错在哪

### 正确做法
应该怎么做

### if-then
IF <触发条件> THEN <正确行为>

ID 格式:LSN-YYYYMMDD-<3位随机字符>(如 LSN-20260308-A7B),避免序号冲突。

完整格式定义和示例 → references/format.md

晋升规则(速查)

优先级 晋升条件 目标
🔴 Critical 首次发生即晋升 AGENTS.md 铁律 / IDENTITY.md 已知缺陷
🟡 High 复现 ≥3 次 AGENTS.md 铁律 / IDENTITY.md 已知缺陷
🟢 Medium/Low 不晋升 留在 lessons.md 供检索

晋升后原条目状态改为 promoted → <目标文件>#<编号>

完整晋升规则 → references/promotion.md

分层存储

层级 对应文件 加载时机
HOT AGENTS.md 铁律 + IDENTITY.md 已知缺陷 每个 session 自动注入
WARM memory/archive/lessons.md memory_search 按需检索
COLD memory/archive/lessons-cold.md 极少访问,90天+ 未引用的非 critical 条目

衰减规则

  • 90 天未被引用 + 非 critical → 移入 lessons-cold.md(手动,不自动)
  • 移入 COLD 前在原位留一行引用:→ moved to lessons-cold.md [LSN-ID]
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 75 lines · 0 tokens per session scan A 476a27b9c599

Subscribe to this mod's changes

self-improving is a skill published in the GitHub repository MuduiClaw/ClawKing (11 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 771 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

media-ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

garrytan/gbrain · 52 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

agent-memory

../../../engineering/agent-memory/skills/agent-memory/SKILL.md.

alirezarezvani/claude-skills · 0 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens