self-improvement

self-improvement is a skill for Claude Code from wanikua/danghuangshang. It costs 102 tokens per session (4,838 once invoked), scanned A, original, MIT.

A record of lessons, errors, corrections, missing features, and improved practices for a coding agent. The entries are stored in Markdown files so later work can use them.

In plain words
What is it for?
Use it after a command or external tool fails, a user corrects the agent, a requested feature is missing, knowledge is outdated, or a better recurring workflow is found.
Why use it?
It prevents useful corrections and recurring failures from being forgotten and makes repeated problems easier to fix.

Skill for Claude Code

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

Good fit Use it after a command or external tool fails, a user corrects the agent, a requested feature is missing, knowledge is outdated, or a better recurring workflow is found.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wanikua/danghuangshang/self-improving-agent
About the project

danghuangshang is a multi-agent collaboration system that organizes specialized AI agents into a hierarchy modeled on historical Chinese government institutions. Users delegate tasks to these agents through platforms such as Discord or Feishu, with roles for coordination, coding, review, memory, and automation. Its catalogue entries are the project's agents and skills.

wanikua/danghuangshang · 2,700 stars · on GitHub · danghuangshang.com

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.

Any agent
npx skills add wanikua/danghuangshang --skill self-improving-agent
Clone the repo
git clone --depth 1 https://github.com/wanikua/danghuangshang

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/wanikua/danghuangshang/self-improving-agent/github.svg)](https://agentmods.dev/skills/wanikua/danghuangshang/self-improving-agent)
Your own site
<a href="https://agentmods.dev/skills/wanikua/danghuangshang/self-improving-agent"><img src="https://agentmods.dev/badge/skills/wanikua/danghuangshang/self-improving-agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for self-improvement

Your own site · 80×15
<a href="https://agentmods.dev/skills/wanikua/danghuangshang/self-improving-agent"><img src="https://agentmods.dev/badge/skills/wanikua/danghuangshang/self-improving-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,838 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 64
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.1 $0.00102 $0.04838
Opus 5 $0.00051 $0.02419
Sonnet 5 $0.00020 $0.00968
Haiku 4.5 $0.00010 $0.00484

Measured 10d ago against content hash cec6d90543ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 10d 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

Copies of this mod

8 near-identical copies found in the catalogue:

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. 10d ago First seen · 648 lines · 102 tokens per session scan A cec6d90543ea

Subscribe to this mod's changes

self-improvement is a skill published in the GitHub repository wanikua/danghuangshang (2,700 stars, last pushed 3mo ago), licensed MIT. It adds 102 tokens to every session and 4,838 once invoked, about $0.0005 per session on Opus 5. 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

setup-discord-multibot

Configure or extend a multi-bot Discord setup for Claude Code, where each project directory is bridged to its own dedicated Discord bot. Use when the user wants to (a) add a new Discord bot for a new project, (b) initially set up the per-project Discord architecture, (c) pair a bot when the official /discord:access…

Lihan-Zhong/claude-code-discord-multibot · 179 tokens

memory

Two-layer persistent memory system (longterm facts + daily recall) backed by memory.db. Use when the user mentions remembering, recalling past events, storing preferences, or asks about past context. Also use automatically to persist important user preferences, project facts, and relationship data. Do NOT use for…

berrzebb/SoulFlow-Orchestrator · 64 tokens

data-sync

Sync and archive data from messaging platforms (WhatsApp, Discord, Slack, Twitter/X, Google) into Moltis memory as daily digest summaries. Orchestrates crawl tools and writes structured markdown to the memory system.

moltis-org/moltis · 46 tokens

commonly

You are a member of a Commonly workspace — a shared space where humans and AI agents from any origin collaborate in pods (chat rooms with memory). Use this whenever you are connected to Commonly via the commonly MCP tools: to read what's happening, post, remember things across sessions, react, DM other agents, and…

Team-Commonly/commonly · 0 tokens

project-context

Use PowerContext project memory and handoff tools through MCP when continuing prior work, recalling decisions, maintaining durable memory, or transferring work across tasks, sessions, or agents.

oceanbase/powercontext · 37 tokens

ralph-memory

Manage Al semantic memory entries — list, query, and clear lessons learned across loop iterations.

jmagly/aiwg · 21 tokens