self-improvement

self-improvement is a skill for Claude Code from CraftOS-dev/CraftBot. It costs 104 tokens per session (4,840 once invoked), scanned A, a copy of self-improvement, MIT.

A workflow for recording errors, corrections, missing capabilities, and better approaches in project notes. Coding agents can use these notes to improve future work.

In plain words
What is it for?
Use it to log failed commands, user corrections, feature requests, outdated knowledge, tool issues, and reusable lessons.
Why use it?
It prevents the same mistakes and tool problems from being forgotten or repeated.

Skill for Claude Code

Written for Claude Code: UserPromptSubmit hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

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/craftos-dev/craftbot/self-improving-agent
Any agent
npx skills add CraftOS-dev/CraftBot --skill self-improving-agent
Clone the repo
git clone --depth 1 https://github.com/CraftOS-dev/CraftBot

Made for: Claude Code.

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-improvement

README.md
[![agentmods](https://agentmods.dev/badge/skills/craftos-dev/craftbot/self-improving-agent.svg)](https://agentmods.dev/skills/craftos-dev/craftbot/self-improving-agent)
Your own site
<a href="https://agentmods.dev/skills/craftos-dev/craftbot/self-improving-agent"><img src="https://agentmods.dev/badge/skills/craftos-dev/craftbot/self-improving-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,840 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 98% copy Near-identical to another mod 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.1 $0.00104 $0.04840
Opus 5 $0.00052 $0.02420
Sonnet 5 $0.00021 $0.00968
Haiku 4.5 $0.00010 $0.00484

Measured 2d ago against content hash 651c4abaa265, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

self-improvement 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 2d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (hooks/openclaw/handler.js, hooks/openclaw/handler.ts, scripts/activator.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

This is a copy

98% identical to self-improvement — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/self-improving-agent/SKILL.md · 648 lines

How it starts

The opening of the file, as written. The whole thing — 648 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Self-Improvement Skill

Log learnings and errors to markdown files for continuous improvement. Coding agents can later process these into fixes, and important learnings get promoted to project memory.

Quick Reference

Situation Action
Command/operation fails Log to .learnings/ERRORS.md
User corrects you Log to .learnings/LEARNINGS.md with category correction
User wants missing feature Log to .learnings/FEATURE_REQUESTS.md
API/external tool fails Log to .learnings/ERRORS.md with integration details
Knowledge was outdated Log to .learnings/LEARNINGS.md with category knowledge_gap
Found better approach Log to .learnings/LEARNINGS.md with category best_practice
Simplify/Harden recurring patterns Log/update .learnings/LEARNINGS.md with Source: simplify-and-harden and a stable Pattern-Key
Similar to existing entry Link with **See Also**, consider priority bump
Broadly applicable learning Promote to CLAUDE.md, AGENTS.md, and/or .github/copilot-instructions.md
Workflow improvements Promote to AGENTS.md (OpenClaw workspace)
Tool gotchas Promote to TOOLS.md (OpenClaw workspace)
Behavioral patterns Promote to SOUL.md (OpenClaw workspace)

OpenClaw is the primary platform for this skill. It uses workspace-based prompt injection with automatic skill loading.

Installation

Via ClawdHub (recommended):

clawdhub install self-improving-agent

Manual:

git clone https://github.com/peterskoett/self-improving-agent.git ~/.openclaw/skills/self-improving-agent

Remade for openclaw from original repo : https://github.com/pskoett/pskoett-ai-skills - https://github.com/pskoett/pskoett-ai-skills/tree/main/skills/self-improvement

Workspace Structure

OpenClaw injects these files into every session:

~/.openclaw/workspace/
├── AGENTS.md          # Multi-agent workflows, delegation patterns
├── SOUL.md            # Behavioral guidelines, personality, principles
├── TOOLS.md           # Tool capabilities, integration gotchas
├── MEMORY.md          # Long-term memory (main session only)
├── memory/            # Daily memory files
│   └── YYYY-MM-DD.md
└── .learnings/        # This skill's log files
    ├── LEARNINGS.md
    ├── ERRORS.md
    └── FEATURE_REQUESTS.md

Read the full file on GitHub · 648 lines

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. 2d ago First seen · 648 lines · 104 tokens per session scan A 651c4abaa265

Subscribe to this mod's changes

self-improvement is a skill published in the GitHub repository CraftOS-dev/CraftBot (378 stars, last pushed 3d ago), licensed MIT. It adds 104 tokens to every session and 4,840 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. It is 98% identical to self-improvement, differing in 2 lines, and is treated as a copy.