SkillHub GitHub

Skills clawhub.ai/ivangdavila

self-improving

Use it when
you keep correcting the agent on the same things and want lessons to stick across sessions
It does
logs your corrections and its own reflections after big tasks, and turns lessons repeated three times into rules
Keeps
a memory folder in your home directory: a short file loaded every time, files per project and topic, and an archive
Setup
creates that folder and adds a few lines to your agent's instruction files, without removing what's there
Runs
on its own, when you correct it, a command fails or it finishes significant work
Unlike
skills that log lessons to a folder inside each project, its memory is shared across projects and sorted by how often each rule is used

TLDR

It makes the agent learn from mistakes. Explicit corrections ("no, that's wrong", "I prefer X", "stop doing Y") go to a corrections log, and after significant work the agent notes what could have gone better. A lesson seen three times becomes a candidate rule, confirmed with you, and moves into memory.md, a file of at most 100 lines loaded before every non-trivial task. Lessons for one project or topic, such as code or writing, get their own files, loaded only when relevant. A rule unused for 30 days leaves the always-loaded file, and after 90 days goes to an archive; nothing is deleted without asking. When rules conflict, the most specific wins, and the agent cites which file a choice came from. You can ask what it has learned, export everything or have it forget something. It never stores credentials or health data and makes no network requests. Setup assumes a workspace like OpenClaw's (an open-source personal AI agent): it adds lines to AGENTS.md, SOUL.md and HEARTBEAT.md, and a periodic check keeps the memory tidy. Setup also offers a separate Proactivity skill, installed only if you agree.

Summarizes the skill at aca4fea.

openclaw skills install @ivangdavila/self-improving
Downloads
209,818 on ClawHub, Sep 21, 2026
Downloads
409,437 on Tencent SkillHub, Sep 21, 2026
Category

Build agents, orchestrate workers and give agents memory.

Everything for building software: planning, coding, debugging, design, frameworks, cloud, agents and skills.

Type

A multi-step process the agent follows: interview, debug, run a TDD loop, review.

Effect

Its own steps create or change files, git state or local tools.

Needs

Instructions only. Works in any agent that supports skills.

Publisher

Everyone else. Unverified vendor claims default to community.

Topics

SKILL.md

From ClawHub, version 1.2.16. Checked daily, last changed Oct 20, 2026.

Frontmatter
name: Self-Improving + Proactive Agent
slug: self-improving
version: 1.2.16
homepage: https://clawic.com/skills/self-improving
description: "Self-reflection + Self-criticism + Self-learning + Self-organizing memory. Agent evaluates its own work, catches mistakes, and improves permanently. Use when (1) a command, tool, API, or operation fails; (2) the user corrects you or rejects your work; (3) you realize your knowledge is outdated or incorrect; (4) you discover a better approach; (5) the user explicitly installs or references the skill for the current task."
changelog: "Clarifies the setup flow for proactive follow-through and safer installation behavior."
metadata: {"clawdbot":{"emoji":"๐Ÿง ","requires":{"bins":[]},"os":["linux","darwin","win32"],"configPaths":["~/self-improving/"],"configPaths.optional":["./AGENTS.md","./SOUL.md","./HEARTBEAT.md"]}}

When to Use

User corrects you or points out mistakes. You complete significant work and want to evaluate the outcome. You notice something in your own output that could be better. Knowledge should compound over time without manual maintenance.

Architecture

Memory lives in ~/self-improving/ with tiered structure. If ~/self-improving/ does not exist, run setup.md. Workspace setup should add the standard self-improving steering to the workspace AGENTS, SOUL, and HEARTBEAT.md files, with recurring maintenance routed through heartbeat-rules.md.

~/self-improving/
โ”œโ”€โ”€ memory.md          # HOT: โ‰ค100 lines, always loaded
โ”œโ”€โ”€ index.md           # Topic index with line counts
โ”œโ”€โ”€ heartbeat-state.md # Heartbeat state: last run, reviewed change, action notes
โ”œโ”€โ”€ projects/          # Per-project learnings
โ”œโ”€โ”€ domains/           # Domain-specific (code, writing, comms)
โ”œโ”€โ”€ archive/           # COLD: decayed patterns
โ””โ”€โ”€ corrections.md     # Last 50 corrections log

Quick Reference

Topic File
Setup guide setup.md
Heartbeat state template heartbeat-state.md
Memory template memory-template.md
Workspace heartbeat snippet HEARTBEAT.md
Heartbeat rules heartbeat-rules.md
Learning mechanics learning.md
Security boundaries boundaries.md
Scaling rules scaling.md
Memory operations operations.md
Self-reflection log reflections.md
OpenClaw HEARTBEAT seed openclaw-heartbeat.md

Requirements

  • No credentials required
  • No extra binaries required
  • Optional installation of the Proactivity skill may require network access

Learning Signals

Log automatically when you notice these patterns:

Corrections โ†’ add to corrections.md, evaluate for memory.md:

  • "No, that's not right..."
  • "Actually, it should be..."
  • "You're wrong about..."
  • "I prefer X, not Y"
  • "Remember that I always..."
  • "I told you before..."
  • "Stop doing X"
  • "Why do you keep..."

Preference signals โ†’ add to memory.md if explicit:

  • "I like when you..."
  • "Always do X for me"
  • "Never do Y"
  • "My style is..."
  • "For [project], use..."

Pattern candidates โ†’ track, promote after 3x:

  • Same instruction repeated 3+ times
  • Workflow that works well repeatedly
  • User praises specific approach

Ignore (don't log):

  • One-time instructions ("do X now")
  • Context-specific ("in this file...")
  • Hypotheticals ("what if...")

Self-Reflection

After completing significant work, pause and evaluate:

  1. Did it meet expectations? โ€” Compare outcome vs intent
  2. What could be better? โ€” Identify improvements for next time
  3. Is this a pattern? โ€” If yes, log to corrections.md

When to self-reflect:

  • After completing a multi-step task
  • After receiving feedback (positive or negative)
  • After fixing a bug or mistake
  • When you notice your output could be better

Log format:

CONTEXT: [type of task]
REFLECTION: [what I noticed]
LESSON: [what to do differently]

Example:

CONTEXT: Building Flutter UI
REFLECTION: Spacing looked off, had to redo
LESSON: Check visual spacing before showing user

Self-reflection entries follow the same promotion rules: 3x applied successfully โ†’ promote to HOT.

Quick Queries

User says Action
"What do you know about X?" Search all tiers for X
"What have you learned?" Show last 10 from corrections.md
"Show my patterns" List memory.md (HOT)
"Show [project] patterns" Load projects/{name}.md
"What's in warm storage?" List files in projects/ + domains/
"Memory stats" Show counts per tier
"Forget X" Remove from all tiers (confirm first)
"Export memory" ZIP all files

Memory Stats

On "memory stats" request, report:

๐Ÿ“Š Self-Improving Memory

HOT (always loaded):
  memory.md: X entries

WARM (load on demand):
  projects/: X files
  domains/: X files

COLD (archived):
  archive/: X files

Recent activity (7 days):
  Corrections logged: X
  Promotions to HOT: X
  Demotions to WARM: X

Common Traps

Trap Why It Fails Better Move
Learning from silence Creates false rules Wait for explicit correction or repeated evidence
Promoting too fast Pollutes HOT memory Keep new lessons tentative until repeated
Reading every namespace Wastes context Load only HOT plus the smallest matching files
Compaction by deletion Loses trust and history Merge, summarize, or demote instead

Core Rules

1. Learn from Corrections and Self-Reflection
  • Log when user explicitly corrects you
  • Log when you identify improvements in your own work
  • Never infer from silence alone
  • After 3 identical lessons โ†’ ask to confirm as rule
2. Tiered Storage
Tier Location Size Limit Behavior
HOT memory.md โ‰ค100 lines Always loaded
WARM projects/, domains/ โ‰ค200 lines each Load on context match
COLD archive/ Unlimited Load on explicit query
3. Automatic Promotion/Demotion
  • Pattern used 3x in 7 days โ†’ promote to HOT
  • Pattern unused 30 days โ†’ demote to WARM
  • Pattern unused 90 days โ†’ archive to COLD
  • Never delete without asking
4. Namespace Isolation
  • Project patterns stay in projects/{name}.md
  • Global preferences in HOT tier (memory.md)
  • Domain patterns (code, writing) in domains/
  • Cross-namespace inheritance: global โ†’ domain โ†’ project
5. Conflict Resolution

When patterns contradict:

  1. Most specific wins (project > domain > global)
  2. Most recent wins (same level)
  3. If ambiguous โ†’ ask user
6. Compaction

When file exceeds limit:

  1. Merge similar corrections into single rule
  2. Archive unused patterns
  3. Summarize verbose entries
  4. Never lose confirmed preferences
7. Transparency
  • Every action from memory โ†’ cite source: "Using X (from projects/foo.md:12)"
  • Weekly digest available: patterns learned, demoted, archived
  • Full export on demand: all files as ZIP
8. Security Boundaries

See boundaries.md โ€” never store credentials, health data, third-party info.

9. Graceful Degradation

If context limit hit:

  1. Load only memory.md (HOT)
  2. Load relevant namespace on demand
  3. Never fail silently โ€” tell user what's not loaded

Scope

This skill ONLY:

  • Learns from user corrections and self-reflection
  • Stores preferences in local files (~/self-improving/)
  • Maintains heartbeat state in ~/self-improving/heartbeat-state.md when the workspace integrates heartbeat
  • Reads its own memory files on activation

This skill NEVER:

  • Accesses calendar, email, or contacts
  • Makes network requests
  • Reads files outside ~/self-improving/
  • Infers preferences from silence or observation
  • Deletes or blindly rewrites self-improving memory during heartbeat cleanup
  • Modifies its own SKILL.md

Data Storage

Local state lives in ~/self-improving/:

  • memory.md for HOT rules and confirmed preferences
  • corrections.md for explicit corrections and reusable lessons
  • projects/ and domains/ for scoped patterns
  • archive/ for decayed or inactive patterns
  • heartbeat-state.md for recurring maintenance markers

Related Skills

Install with clawhub install <slug> if user confirms:

  • memory โ€” Long-term memory patterns for agents
  • learning โ€” Adaptive teaching and explanation
  • decide โ€” Auto-learn decision patterns
  • escalate โ€” Know when to ask vs act autonomously

Feedback

  • If useful: clawhub star self-improving
  • Stay updated: clawhub sync