New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Curate Claude Code's auto-memory into durable project

Self improving agent

by alirezarezvani · MIT license · ★ 26,349 on GitHub · updated Aug 30

Self improving agent cover

Curate Claude Code's auto-memory into durable project knowledge. Analyze MEMORY.md for patterns, promote proven learnings to CLAUDE.md and .claude/rules/, extract recurring solutions into reusable skills.

---
name: "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/, extract recurring solutions into reusable skills. Use when: (1) reviewing what Claude has learned about your project, (2) graduating a pattern from notes to enforced rules, (3) turning a debugging solution into a skill, (4) checking memory health and capacity."
---

# 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:memory-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 |

Overview

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.

Manual install (npx, ZIP)
Claude Codenpx skills add alirezarezvani/claude-skills --skill self-improving-agent -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/alirezarezvani/claude-skills/tar.gz/19392f7a0826 \ | tar -xz -C ~/.claude/skills --strip-components=4 claude-skills-19392f7a0826/engineering-team/self-improving-agent/skills/self-improving-agent
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/1045c7f70a38d495167f/self-improving-agent.zip" -OutFile "$env:TEMP\self-improving-agent.zip"; Expand-Archive "$env:TEMP\self-improving-agent.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md6.9 KB
Read the files here
alirezarezvani/19392f71 file
Shared references101SKILL.md reads these from elsewhere in the repo. Not in the ZIP.Get them on GitHub ↗
SKILL.md
Show the full text163 lines

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:memory-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:memory-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:memory-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/<path>/memory/MEMORY.md Claude (auto) Project learnings First 200 lines
~/.claude/projects/<path>/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:memory-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
1---
2name: "self-improving-agent"
3description: "Curate Claude Code's auto-memory into durable project knowledge. Analyze MEMORY.md for patterns, promote proven learnings to CLAUDE.md and .claude/rules/, extract recurring solutions into reusable skills. Use when: (1) reviewing what Claude has learned about your project, (2) graduating a pattern from notes to enforced rules, (3) turning a debugging solution into a skill, (4) checking memory health and capacity."
4---
5 
6# Self-Improving Agent
7 
8> Auto-memory captures. This plugin curates.
9 
10Claude 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.
11 
12## Quick Reference
13 
14| Command | What it does |
15|---------|-------------|
16| `/si:memory-review` | Analyze MEMORY.md — find promotion candidates, stale entries, consolidation opportunities |
17| `/si:promote` | Graduate a pattern from MEMORY.md → CLAUDE.md or `.claude/rules/` |
18| `/si:extract` | Turn a proven pattern into a standalone skill |
19| `/si:memory-status` | Memory health dashboard — line counts, topic files, recommendations |
20| `/si:remember` | Explicitly save important knowledge to auto-memory |
21 
22## How It Fits Together
23 
24```
25┌─────────────────────────────────────────────────────────┐
26│ Claude Code Memory Stack │
27├─────────────┬──────────────────┬────────────────────────┤
28│ CLAUDE.md │ Auto Memory │ Session Memory │
29│ (you write)│ (Claude writes)│ (Claude writes) │
30│ Rules & │ MEMORY.md │ Conversation logs │
31│ standards │ + topic files │ + continuity │
32│ Full load │ First 200 lines│ Contextual load │
33├─────────────┴──────────────────┴────────────────────────┤
34│ ↑ /si:promote ↑ /si:memory-review │
35│ Self-Improving Agent (this plugin) │
36│ ↓ /si:extract ↓ /si:remember │
37├─────────────────────────────────────────────────────────┤
38│ .claude/rules/ │ New Skills │ Error Logs │
39│ (scoped rules) │ (extracted) │ (auto-captured)│
40└─────────────────────────────────────────────────────────┘
41```
42 
43## Installation
44 
45### Claude Code (Plugin)
46```
47/plugin marketplace add alirezarezvani/claude-skills
48/plugin install self-improving-agent@claude-code-skills
49```
50 
51### OpenClaw
52```bash
53clawhub install self-improving-agent
54```
55 
56### Codex CLI
57```bash
58./scripts/codex-install.sh --skill self-improving-agent
59```
60 
61## Memory Architecture
62 
63### Where things live
64 
65| File | Who writes | Scope | Loaded |
66|------|-----------|-------|--------|
67| `./CLAUDE.md` | You (+ `/si:promote`) | Project rules | Full file, every session |
68| `~/.claude/CLAUDE.md` | You | Global preferences | Full file, every session |
69| `~/.claude/projects/<path>/memory/MEMORY.md` | Claude (auto) | Project learnings | First 200 lines |
70| `~/.claude/projects/<path>/memory/*.md` | Claude (overflow) | Topic-specific notes | On demand |
71| `.claude/rules/*.md` | You (+ `/si:promote`) | Scoped rules | When matching files open |
72 
73### The promotion lifecycle
74 
75```
761. Claude discovers pattern → auto-memory (MEMORY.md)
772. Pattern recurs 2-3x → /si:memory-review flags it as promotion candidate
783. You approve → /si:promote graduates it to CLAUDE.md or rules/
794. Pattern becomes an enforced rule, not just a note
805. MEMORY.md entry removed → frees space for new learnings
81```
82 
83## Core Concepts
84 
85### Auto-memory is capture, not curation
86 
87Auto-memory is excellent at recording what Claude learns. But it has no judgment about:
88- Which learnings are temporary vs. permanent
89- Which patterns should become enforced rules
90- When the 200-line limit is wasting space on stale entries
91- Which solutions are good enough to become reusable skills
92 
93That's what this plugin does.
94 
95### Promotion = graduation
96 
97When 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:
98 
99- **MEMORY.md**: "I noticed this project uses pnpm" (background context)
100- **CLAUDE.md**: "Use pnpm, not npm" (enforced instruction)
101 
102Promoted rules have higher priority and load in full (not truncated at 200 lines).
103 
104### Rules directory for scoped knowledge
105 
106Not everything belongs in CLAUDE.md. Use `.claude/rules/` for patterns that only apply to specific file types:
107 
108```yaml
109# .claude/rules/api-testing.md
110---
111paths:
112 - "src/api/**/*.test.ts"
113 - "tests/api/**/*"
114---
115- Use supertest for API endpoint testing
116- Mock external services with msw
117- Always test error responses, not just happy paths
118```
119 
120This loads only when Claude works with API test files — zero overhead otherwise.
121 
122## Agents
123 
124### memory-analyst
125Analyzes MEMORY.md and topic files to identify:
126- Entries that recur across sessions (promotion candidates)
127- Stale entries referencing deleted files or old patterns
128- Related entries that should be consolidated
129- Gaps between what MEMORY.md knows and what CLAUDE.md enforces
130 
131### skill-extractor
132Takes a proven pattern and generates a complete skill:
133- SKILL.md with proper frontmatter
134- Reference documentation
135- Examples and edge cases
136- Ready for `/plugin install` or `clawhub publish`
137 
138## Hooks
139 
140### error-capture (PostToolUse → Bash)
141Monitors command output for errors. When detected, appends a structured entry to auto-memory with:
142- The command that failed
143- Error output (truncated)
144- Timestamp and context
145- Suggested category
146 
147**Token overhead:** Zero on success. ~30 tokens only when an error is detected.
148 
149## Platform Support
150 
151| Platform | Memory System | Plugin Works? |
152|----------|--------------|---------------|
153| Claude Code | Auto-memory (MEMORY.md) | ✅ Full support |
154| OpenClaw | workspace/MEMORY.md | ✅ Adapted (reads workspace memory) |
155| Codex CLI | AGENTS.md | ✅ Adapted (reads AGENTS.md patterns) |
156| GitHub Copilot | `.github/copilot-instructions.md` | ⚠️ Manual promotion only |
157 
158## Related
159 
160- [Claude Code Memory Docs](https://code.claude.com/docs/en/memory)
161- [pskoett/self-improving-agent](https://clawhub.ai/pskoett/self-improving-agent) — inspiration
162- [playwright-pro](engineering-team/playwright-pro/) — sister plugin in this repo
163 
View all files on GitHub →

Details

Updated
Aug 30, 2026
License
MIT
Stars on the repo
★ 26,349
Checked
Source
alirezarezvani/claude-skills ↗
Creator
alirezarezvani · 363 listings
View creator

Similar skills

See all →
SkillExport the Obsidian wiki's knowledge graph to structuredWiki Export — Knowledge Graph ExportAr9av/obsidian-wiki · by Ar9avExport the Obsidian wiki's knowledge graph to structured formats for use in external tools. Use this skill when the user says "export wiki", "export graph", "export to JSON", "export to Gephi", export to Neo4j", "export to Postgres", "export to SQL", "graphml", "visualize wiki", knowledge graph export", "export to OKF", "OKF bundle", "open knowledge format", export as markdown bundle", or wants to use their wiki data in another tool. Outputs graph.json, graph.graphml, cypher.txt (Neo4j), postgres.sql (Postgres), and graph.html (interactive browser visualization) into a wiki-export/ directory at the vault root, plus an optional OKF (Open Knowledge Format) markdown bundle under wiki-export/okf/.★ 3.5k GitHub starsSkillImport a wiki knowledge graph into the current vaultWiki Import — Reconstruct Pages from an ExportAr9av/obsidian-wiki · by Ar9avImport a wiki knowledge graph into the current vault — either from a graph.json export file (stubs) or from an OKF (Open Knowledge Format) markdown bundle (full page bodies). Use this skill when the user says "import wiki", "import from export", "load graph.json", import vault", "import OKF bundle", "import OKF", "load OKF", "import markdown bundle", /wiki-import", or wants to transfer pages from one vault to another using the output of wiki-export.★ 3.5k GitHub starsSkillYour team's shared, AI-ready knowledge base/company-brain — Team-shared AI-ready knowledge basecoreyhaines31/makerskills · by coreyhaines31Your team's shared, AI-ready knowledge base — people, companies, meetings, SOPs, and decisions structured so an agent can answer on your team's behalf. Team-scope sibling to second-brain. Modes — capture, compile (wiki pages + INDEX.md), query (trust-weighted, saved to outputs/), review (verify / deprecate / supersede stale captures), lint, connect, search. Structured raw dirs (people/, companies/, meetings/, sops/, decisions/, customer-language/, sales-objections/). Every capture stamps author, timestamp, and trust status. Optional sync from call transcripts, Slack/email exports, CRM. Vault at ${COMPANY_BRAIN_VAULT:-$HOME/Documents/CompanyBrain}/. Triggers on "/company-brain," "/cb," "capture this into the team brain," "log this meeting," "save this SOP," "compile the company wiki," "query the team brain," "what does the team know about X," "review the company brain," "lint the company brain," "who's the internal expert on X.★ 855 GitHub starsSkillGive Claude a permanent, searchable long-term memoryAI Brain — persistent memory for Claude via ObsidianOotto-AI/claude-content-skills · by Ootto-AIGive Claude a permanent, searchable long-term memory using an Obsidian vault as the store. At the end of a session, summarize what mattered and save it as a Markdown note in your "AI Brain" vault; at the start of a session (or on demand), read back only the relevant past notes. Local markdown you own — connected via the Filesystem MCP. Trigger with "wrap up", "save this session", or "remember this".★ 139 GitHub starsSkillFind prior Claude Code and Codex sessions with an indexed/recall: session memory engineParcha-ai/parcha-skills · by Parcha-aiFind prior Claude Code and Codex sessions with an indexed local search engine, then continue the work, repeat it with fresh inputs, or distill it into a skill. Runs from Claude Code, Codex, or pi; the current index covers Claude Code and Codex transcripts. Use when the user names Recall, says "find that conversation where…", "what did we do last time about…", "continue what we did yesterday on X", "what did codex do on this branch", "turn what we did about Y into a skill", or "remember when you…". Not for searching code (use grep on the repo) or for facts already in MEMORY.md.★ 62 GitHub starsMCPA basic implementation of persistent memory using a localKnowledge Graph Memory Servermodelcontextprotocol/servers · by modelcontextprotocolA basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across…★ 90.5k GitHub stars

More from alirezarezvani

SkillResume a paused experiment/ar:ar-resume — Resume Experimentalirezarezvani/claude-skills · by alirezarezvaniResume a paused experiment. Checkout the experiment branch, read results history, continue iterating. Use when the user runs /ar:ar-resume or asks to pick up a previously started autoresearch experiment.★ 26.3k GitHub starsSkillShow experiment dashboard with results, active loops/ar:ar-status — Experiment Dashboardalirezarezvani/claude-skills · by alirezarezvaniShow experiment dashboard with results, active loops, and progress. Use when the user runs /ar:ar-status or asks how an autoresearch experiment is going.★ 26.3k GitHub starsSkillStart an autonomous experiment loop with user-selected/ar:loop — Autonomous Experiment Loopalirezarezvani/claude-skills · by alirezarezvaniStart an autonomous experiment loop with user-selected interval (10min, 1h, daily, weekly, monthly). Uses CronCreate for scheduling. Use when the user runs /ar:loop or asks to run an autoresearch experiment continuously on a schedule.★ 26.3k GitHub starsSkillRun a single experiment iteration/ar:run — Single Experiment Iterationalirezarezvani/claude-skills · by alirezarezvaniRun a single experiment iteration. Edit the target file, evaluate, keep or discard. Use when the user runs /ar:run or asks for one manual autoresearch iteration.★ 26.3k GitHub starsSkillSet up a new autoresearch experiment interactively/ar:setup — Create New Experimentalirezarezvani/claude-skills · by alirezarezvaniSet up a new autoresearch experiment interactively. Collects domain, target file, eval command, metric, direction, and evaluator. Use when the user runs /ar:setup or asks to start optimizing a file with the autoresearch loop.★ 26.3k GitHub starsSkill/cs:boardroom <brief/cs:boardroom — Multi-Role Boardroom Deliberationalirezarezvani/claude-skills · by alirezarezvani/cs:boardroom <brief> — 6-phase multi-role deliberation across the C-suite with Phase 2 isolation, critic pre-screen, and synthesis. Outputs a board memo. Use when a decision spans multiple executive domains — e.g. a pricing change touching finance, positioning, and product, or a raise-vs-cut runway call.★ 26.3k GitHub stars