Self-Improving: Enabling Agents to Automatically Consolidate Memory through Error Correction and Reflection

Preface

When using Cursor, Claude Code, or Codex for coding and automation over a long period, common pain points include: having to repeatedly explain the same preferences or lessons learned across multiple conversation turns; and after a task fails, the experience remains only in the context of that specific session, requiring you to start from scratch next time. Manually maintaining AGENTS.md or team wikis can mitigate this somewhat, but the update cost is high, and they often become disconnected from actual execution habits.

The following introduces the SkillHub community Skill Self-Improving + Proactive Agent (coordinate @user_814dbe54/self-improving, current version 1.2.16). It embeds self-reflection, self-criticism, self-learning, and tiered memory into a set of actionable file conventions: when users correct the agent, when tools fail, or when the Agent itself discovers areas for improvement, it writes lessons into a local directory. It loads these by HOT / WARM / COLD tiers to reduce repeated mistakes and allow knowledge to compound across tasks, without relying entirely on manual prompt modifications.

What is this

One-sentence positioning: A “execution quality memory” Skill for Coding Agents—starting from explicit corrections and self-review, it writes reusable rules to ~/self-improving/ and reads them on-demand before subsequent tasks.

Maintainer: Published by SkillHub community publisher user_814dbe54, source marked as community; the homepage in the Skill metadata is https://clawic.com/skills/self-improving. The tag requires_api_key=false indicates it does not depend on additional API Keys nor require extra system binaries.

Official Entrances:

  • API Coordinate Page: https://api.skillhub.cn/zcwl/self-improving
  • SkillHub Display Page: https://www.skillhub.cn/skills/user_814dbe54/self-improving

According to SkillHub scraping data, this Skill is categorized as ai-agent, with a rating of 100000 and 91943 downloads (page data is subject to real-time store display).

Core Features

The following capabilities are derived from the installed SKILL.md and accompanying documentation (v1.2.16), describing only the behavior boundaries declared by the Skill itself.

Four Mechanisms

The official brief summarizes it as: Self-reflection + Self-criticism + Self-learning + Self-organizing memory. The Agent evaluates its own work, captures errors, and attempts to make improvements persistent.

Tiered Local Memory

The memory root directory is ~/self-improving/. If the directory does not exist, perform first-time initialization according to the setup.md included with the Skill. The typical structure is as follows:

~/self-improving/
├── memory.md          # HOT: ≤100 lines, loaded preferentially
├── index.md           # Topic index and line counts
├── heartbeat-state.md # Heartbeat maintenance state (if workspace is connected to HEARTBEAT)
├── projects/          # Experience by project
├── domains/           # By domain (e.g., code, writing)
├── archive/           # COLD: Patterns after decay
└── corrections.md     # Recent correction logs (approx. 50 entries)

Storage Tiers (Rules within the Skill):

Tier Location Size Behavior
HOT memory.md ≤100 lines Always loaded
WARM projects/, domains/ Single file ≤200 lines Read only upon context match
COLD archive/ No hard limit Read only upon explicit query

Automatic promotion/demotion examples: If the same pattern is used 3 times within 7 days, it can be promoted to HOT; if unused for 30 days, it may drop to WARM; if unused for 90 days, it can be archived to COLD. The user must be asked before deleting memory.

Learning Signals and Self-Reflection

Should be recorded: Explicit user corrections (e.g., “No, it should be…”, “Don’t do… in the future”), repeated instructions (3 times or more), and stable practices that have been affirmed.

Should not be recorded: One-off instructions, pure hypotheses, or “preferences” inferred solely from silence.

After completing important tasks, the Skill suggests performing a brief introspection in the format CONTEXT / REFLECTION / LESSON; just like corrections, patterns verified successfully multiple times can be promoted to HOT.

Proactivity and Heartbeat (Optional)

setup.md explains that guidance snippets can be written into AGENTS.md, SOUL.md, and HEARTBEAT.md to bind “read HOT memory before tasks, save corrections immediately after they occur” into workspace habits. If the user agrees, the Proactivity companion Skill can be installed separately (requires user confirmation before executing clawhub install proactivity); if not agreed, simply use self-improving.

Security and Scope

The Skill declares: Does not access calendars, emails, or contacts; Does not proactively initiate network requests; Does not read files outside of ~/self-improving/ to infer preferences; Does not blindly rewrite memory during heartbeat cleanup. See boundaries.md in the package for sensitive boundaries.

Installation and Activation

1. Install SkillHub CLI (if not already installed)

Check or install according to the SkillHub Installation Guide:

command -v skillhub && skillhub --version

If not installed, you can execute (full installation, including default Skills):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

2. Install this Skill to the current Agent’s skills directory

It is mandatory to use --dir to point to the skills path recognized by the current client; otherwise, installing to the default ./skills/ might not be loaded.

skillhub install @user_814dbe54/self-improving --dir <your skills directory>

Common paths (from SkillHub official documentation):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

You can also hand the installation prompt to the Agent: “Please install @user_814dbe54/self-improving based on https://skillhub.cn/install/skillhub.md.”

After installation, you should see @user_814dbe54/self-improving (or the resolved self-improving) and SKILL.md in the corresponding directory.

3. Initialize ~/self-improving/

For first-time use, create the directory and core files according to setup.md:

mkdir -p ~/self-improving/{projects,domains,archive}

Then create memory.md, corrections.md, index.md, and heartbeat-state.md using templates (see memory-template.md and setup.md in the Skill package for structure).

Optional: Add the Self-Improving mode (Passive / Active / Strict) to AGENTS.md, and add the guidance paragraphs provided by the Skill to SOUL.md and HEARTBEAT.md to align pre-task retrieval and periodic maintenance.

4. Verification

Request “memory stats” in the conversation; the Agent should report the number of files in each tier and recent activities according to the Skill convention (see the Memory Stats section in SKILL.md for details).

Typical Usage

Officially Suggested Trigger Timings

Enable or reference this Skill in the following situations:

  1. Commands, tools, APIs, or operations fail;
  2. The user corrects or rejects your output;
  3. You discover that existing knowledge is outdated or incorrect;
  4. You discover a better approach;
  5. The user explicitly installs or references this Skill for the current task.

Persisting Corrections

When the user says “Don’t use Y, I want X”: immediately write to ~/self-improving/corrections.md; if it belongs to a global preference or rule, write to memory.md; project-specific content goes to projects/<name>.md, and domain experience goes to domains/<domain>.md.

Pre-Task Retrieval

For non-trivial tasks, the Skill requires reading memory.md first, then loading a small number of matching files based on project/domain to avoid stuffing the entire namespace into the context.

User Query Commands

User Phrase Agent Action (According to Skill Convention)
What do you know about X? Search for X across all tiers
What have you learned? Show the recent ~10 entries from corrections.md
Show my patterns List the HOT tier memory.md
Forget X Remove from all tiers (confirm first)
Export memory Package all memory files

Self-Reflection Log Example

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

Scenarios and Precautions

Who is it for:

  • Those who want the Agent to remember “how you work,” not just the content of a single chat;
  • Those who frequently correct styles, commands, or workflows in similar projects (same repo, same tech stack);
  • Those willing to use local Markdown files for auditable, exportable memory instead of a black-box vector database.

Limitations and Notes:

  • Memory is stored by default in the user home directory ~/self-improving/. Multi-machine or multi-workspace setups require self-synchronization or agreement on a single source.
  • The Skill emphasizes not inferring rules from silence; if you want “more proactive preference guessing,” you need to adjust the mode from Passive to Active in AGENTS.md and accept the risk of erroneous recording.
  • The companion Proactivity Skill needs to be installed separately and requires user consent; the installation source may differ from self-improving (documentation examples use clawhub).
  • Related extensions (such as memory, learning) are mentioned via clawhub install <slug> in SKILL.md; whether to install them is up to your confirmation.

Common Traps (Skill Self-Description): Promoting single experiences to HOT too early, using deletion instead of merging/archiving, reading all domain files indiscriminately wasting context, etc.—see the Common Traps table in SKILL.md for countermeasures.

Conclusion

Self-Improving writes “corrections + review + tiered file memory” into procedures executable by the Agent: it does not replace factual diaries (like memory/YYYY-MM-DD.md), but specifically accumulates execution quality and reusable patterns. If you are selecting ai-agent capabilities on SkillHub, you can start with the community package @user_814dbe54/self-improving, install it using the commands above, and complete the ~/self-improving/ initialization.

Official URL: https://api.skillhub.cn/zcwl/self-improving
SkillHub Page: https://www.skillhub.cn/skills/user_814dbe54/self-improving

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye