← Back to Skills Marketplace
alirezarezvani

self-improving-agent

by Alireza Rezvani · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
329
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install cs-self-improving-agent
Description
Curate Claude Code's auto-memory into durable project knowledge. Analyze MEMORY.md for patterns, promote proven learnings to CLAUDE.md and .claude/rules/, ex...
README (SKILL.md)

Self-Improving Agent

Auto-memory captures. This plugin curates.

Claude Code's auto-memory (v2.1.32+) automatically records project patterns, debugging insights, and your preferences in MEMORY.md. This plugin adds the intelligence layer: it analyzes what Claude has learned, promotes proven patterns into project rules, and extracts recurring solutions into reusable skills.

Quick Reference

Command What it does
/si:review Analyze MEMORY.md — find promotion candidates, stale entries, consolidation opportunities
/si:promote Graduate a pattern from MEMORY.md → CLAUDE.md or .claude/rules/
/si:extract Turn a proven pattern into a standalone skill
/si:status Memory health dashboard — line counts, topic files, recommendations
/si:remember Explicitly save important knowledge to auto-memory

How It Fits Together

┌─────────────────────────────────────────────────────────┐
│                  Claude Code Memory Stack                │
├─────────────┬──────────────────┬────────────────────────┤
│  CLAUDE.md  │   Auto Memory    │   Session Memory       │
│  (you write)│   (Claude writes)│   (Claude writes)      │
│  Rules &    │   MEMORY.md      │   Conversation logs    │
│  standards  │   + topic files  │   + continuity         │
│  Full load  │   First 200 lines│   Contextual load      │
├─────────────┴──────────────────┴────────────────────────┤
│              ↑ /si:promote        ↑ /si:review          │
│         Self-Improving Agent (this plugin)               │
│              ↓ /si:extract    ↓ /si:remember            │
├─────────────────────────────────────────────────────────┤
│  .claude/rules/    │    New Skills    │   Error Logs     │
│  (scoped rules)    │    (extracted)   │   (auto-captured)│
└─────────────────────────────────────────────────────────┘

Installation

Claude Code (Plugin)

/plugin marketplace add alirezarezvani/claude-skills
/plugin install self-improving-agent@claude-code-skills

OpenClaw

clawhub install self-improving-agent

Codex CLI

./scripts/codex-install.sh --skill self-improving-agent

Memory Architecture

Where things live

File Who writes Scope Loaded
./CLAUDE.md You (+ /si:promote) Project rules Full file, every session
~/.claude/CLAUDE.md You Global preferences Full file, every session
~/.claude/projects/\x3Cpath>/memory/MEMORY.md Claude (auto) Project learnings First 200 lines
~/.claude/projects/\x3Cpath>/memory/*.md Claude (overflow) Topic-specific notes On demand
.claude/rules/*.md You (+ /si:promote) Scoped rules When matching files open

The promotion lifecycle

1. Claude discovers pattern → auto-memory (MEMORY.md)
2. Pattern recurs 2-3x → /si:review flags it as promotion candidate
3. You approve → /si:promote graduates it to CLAUDE.md or rules/
4. Pattern becomes an enforced rule, not just a note
5. MEMORY.md entry removed → frees space for new learnings

Core Concepts

Auto-memory is capture, not curation

Auto-memory is excellent at recording what Claude learns. But it has no judgment about:

  • Which learnings are temporary vs. permanent
  • Which patterns should become enforced rules
  • When the 200-line limit is wasting space on stale entries
  • Which solutions are good enough to become reusable skills

That's what this plugin does.

Promotion = graduation

When you promote a learning, it moves from Claude's scratchpad (MEMORY.md) to your project's rule system (CLAUDE.md or .claude/rules/). The difference matters:

  • MEMORY.md: "I noticed this project uses pnpm" (background context)
  • CLAUDE.md: "Use pnpm, not npm" (enforced instruction)

Promoted rules have higher priority and load in full (not truncated at 200 lines).

Rules directory for scoped knowledge

Not everything belongs in CLAUDE.md. Use .claude/rules/ for patterns that only apply to specific file types:

# .claude/rules/api-testing.md
---
paths:
  - "src/api/**/*.test.ts"
  - "tests/api/**/*"
---
- Use supertest for API endpoint testing
- Mock external services with msw
- Always test error responses, not just happy paths

This loads only when Claude works with API test files — zero overhead otherwise.

Agents

memory-analyst

Analyzes MEMORY.md and topic files to identify:

  • Entries that recur across sessions (promotion candidates)
  • Stale entries referencing deleted files or old patterns
  • Related entries that should be consolidated
  • Gaps between what MEMORY.md knows and what CLAUDE.md enforces

skill-extractor

Takes a proven pattern and generates a complete skill:

  • SKILL.md with proper frontmatter
  • Reference documentation
  • Examples and edge cases
  • Ready for /plugin install or clawhub publish

Hooks

error-capture (PostToolUse → Bash)

Monitors command output for errors. When detected, appends a structured entry to auto-memory with:

  • The command that failed
  • Error output (truncated)
  • Timestamp and context
  • Suggested category

Token overhead: Zero on success. ~30 tokens only when an error is detected.

Platform Support

Platform Memory System Plugin Works?
Claude Code Auto-memory (MEMORY.md) ✅ Full support
OpenClaw workspace/MEMORY.md ✅ Adapted (reads workspace memory)
Codex CLI AGENTS.md ✅ Adapted (reads AGENTS.md patterns)
GitHub Copilot .github/copilot-instructions.md ⚠️ Manual promotion only

Related

Usage Guidance
This package appears to do what it says: read Claude auto-memory files, analyze them, and help you promote or extract rules/skills. Before installing or enabling the hook, consider the following: - Behavior vs. docs: the README/CLAUDE.md say the error-capture hook appends structured entries to auto-memory on errors, but the provided hook script only prints an <error-detected> message to stdout (it does not modify MEMORY.md). If you expect automatic writing, confirm or modify the hook to match that behavior. - File writes: /si:promote and /si:extract workflows are documented to create or edit CLAUDE.md, .claude/rules/, and project skill folders. If you enable promotion/extraction, these commands will write to your project and ~/.claude — make sure you trust and review changes (and have backups or git) before allowing them to run automatically. - Hook scope: installing the PostToolUse hook means the script will run after Bash tool invocations and will examine CLAUDE_TOOL_OUTPUT. That output could contain snippets from commands you run — the hook only extracts short error context and prints it, but be aware it will run on command output in your environment. - No network exfiltration observed: there are no outbound network calls or remote downloads in the bundle. Still, review generated files before publishing them (extracted skills, promoted rules) to avoid accidentally committing sensitive local paths or secrets to repo-controlled CLAUDE.md/rules. If you want higher assurance, enable the hook and promotion commands in a disposable/testing project first, inspect exact file modifications they perform, and (if desired) update the hook to append to MEMORY.md only after an explicit, auditable consent step.
Capability Analysis
Type: OpenClaw Skill Name: cs-self-improving-agent Version: 1.0.0 The 'self-improving-agent' bundle is a legitimate utility designed to curate and manage Claude Code's auto-memory system. It provides tools to analyze `MEMORY.md`, promote recurring patterns to `CLAUDE.md` rules, and extract debugging solutions into reusable skills. The bundle includes a Bash hook (`hooks/error-capture.sh`) that monitors command output for errors to facilitate automated learning. All file operations and agent instructions are transparently aligned with the stated purpose of project knowledge management, and no evidence of data exfiltration, malicious execution, or unauthorized persistence was found.
Capability Assessment
Purpose & Capability
The skill declares it curates auto-memory (MEMORY.md → CLAUDE.md/.claude/rules/ and can generate skills). The files and agents explicitly read ~/.claude/projects/.../memory and project CLAUDE.md and rules/ directories — access that is required for this purpose. No unrelated credentials, binaries, or network endpoints are requested.
Instruction Scope
Most runtime instructions stay within the stated domain (reading auto-memory, analyzing entries, suggesting promotions, generating SKILL.md). However there are internal inconsistencies: (1) agents/memory-analyst.md explicitly says 'Never modify files directly — only analyze and report', while skills/promote/SKILL.md and /si:promote workflow describe editing CLAUDE.md, creating .claude/rules/ files, and removing entries from MEMORY.md (i.e., modifying files). (2) Documentation and README claim the error-capture hook 'appends a structured entry to auto-memory' on errors, but hooks/error-capture.sh only prints a concise <error-detected> message to stdout and does not append to MEMORY.md. These mismatches mean the behavior you read in prose may not exactly match what will be executed — verify which behavior you want before enabling write operations or the hook.
Install Mechanism
This is an instruction-only skill (no install spec that downloads external code). The only executable file is a small local bash hook. No remote installs, archives, or package downloads are present in the provided manifest.
Credentials
The skill declares no required environment variables or credentials. The hook expects platform-provided CLAUDE_TOOL_OUTPUT and uses HOME/pwd paths to locate memory files — these are reasonable for a memory-curation tool. No unrelated secret or cloud credentials are requested. The skill will read (and in some flows write) files under ~/.claude and the project directory; that file access is necessary for its purpose but is elevated in that it touches user-level configuration and project files.
Persistence & Privilege
always is false and the skill is user-invocable; the only persistence comes from normal file writes (promote/extract/remember operations that create or modify CLAUDE.md, .claude/rules/, MEMORY.md, or local skill folders). The hook being installable into .claude/settings.json gives it automatic invocation on PostToolUse but this is a normal plugin hook pattern. No skill-level setting forces always-enabled or otherwise escalates privilege beyond file reads/writes in user/home/project spaces.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cs-self-improving-agent
  3. After installation, invoke the skill by name or use /cs-self-improving-agent
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial publish (prefixed slug)
Metadata
Slug cs-self-improving-agent
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is self-improving-agent?

Curate Claude Code's auto-memory into durable project knowledge. Analyze MEMORY.md for patterns, promote proven learnings to CLAUDE.md and .claude/rules/, ex... It is an AI Agent Skill for Claude Code / OpenClaw, with 329 downloads so far.

How do I install self-improving-agent?

Run "/install cs-self-improving-agent" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is self-improving-agent free?

Yes, self-improving-agent is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does self-improving-agent support?

self-improving-agent is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created self-improving-agent?

It is built and maintained by Alireza Rezvani (@alirezarezvani); the current version is v1.0.0.

💬 Comments