Skip to content
Back to skills

Self Improving Agent

ASecurity

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.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 14, 2026
code-qualitygobashtestingdebuggingapi

Works with

  • claude code
  • api

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned November 14, 2026

npx -y skills add SebastianLuser/claude-code-arcane --skill self-improving-agent --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Self Improving Agent?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Self Improving Agent
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sebastianluser-self-improving-agent/badge)](https://www.skillsdirectory.com/skills/sebastianluser-self-improving-agent)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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."
argument-hint: "[extract|promote|remember|review|status] [args]"
category: "arcane"
user-invocable: true
allowed-tools: Read, Glob, Grep, Bash, Write, Edit
---

# Self-Improving Agent

Claude Code's auto-memory (v2.1.32+) automatically records project patterns, debugging insights, and your preferences in `MEMORY.md`. This skill adds the intelligence layer: it analyzes what Claude has learned, promotes proven patterns into project rules, and extracts recurring solutions into reusable skills. May write or edit CLAUDE.md, .claude/rules/ files, and new skill files during promotion and extraction.

## Sub-commands

`/self-improving-agent` with no argument shows this overview. With a sub-command as its first argument, read `skills/<sub-command>/SKILL.md` from this skill's directory and follow it, passing the remaining arguments. Sub-commands: `extract`, `promote`, `remember`, `review`, `status`.

## Quick Reference

| Command | What it does |
|---------|-------------|
| `/self-improving-agent review` | Analyze MEMORY.md -- find promotion candidates, stale entries, consolidation opportunities |
| `/self-improving-agent promote` | Graduate a pattern from MEMORY.md to CLAUDE.md or `.claude/rules/` |
| `/self-improving-agent extract` | Turn a proven pattern into a standalone skill |
| `/self-improving-agent status` | Memory health dashboard -- line counts, topic files, recommendations |
| `/self-improving-agent 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      │
├─────────────┴──────────────────┴────────────────────────┤
│              /self-improving-agent promote          /self-improving-agent review             │
│         Self-Improving Agent (this skill)                │
│              /self-improving-agent extract      /self-improving-agent remember              │
├─────────────────────────────────────────────────────────┤
│  .claude/rules/    │    New Skills    │   Error Logs     │
│  (scoped rules)    │    (extracted)   │   (auto-captured)│
└─────────────────────────────────────────────────────────┘
```

## Memory Architecture

### Where things live

| File | Who writes | Scope | Loaded |
|------|-----------|-------|--------|
| `./CLAUDE.md` | You (+ `/self-improving-agent 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 (+ `/self-improving-agent promote`) | Scoped rules | When matching files open |

### The promotion lifecycle

```
1. Claude discovers pattern -> auto-memory (MEMORY.md)
2. Pattern recurs 2-3x -> /self-improving-agent review flags it as promotion candidate
3. You approve -> /self-improving-agent 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 is what this skill 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

Use `.claude/rules/` for patterns that only apply to specific file types:

```yaml
# .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
```

Files in this skill

  • LICENSE1 KB
  • SKILL.md5.5 KB
  • reference/memory-architecture.md4.8 KB
  • reference/promotion-rules.md3.2 KB
  • reference/rules-directory-patterns.md3.4 KB
  • reference/skill-extractor.md3 KB
  • skills/extract/SKILL.md5.2 KB
  • skills/promote/SKILL.md4.7 KB
  • skills/remember/SKILL.md3.3 KB
  • skills/review/SKILL.md4.2 KB
  • skills/status/SKILL.md2.9 KB
  • templates/rule-template.md240 B
  • templates/skill-template.md873 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in code-quality →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.