Self Improving Agent skill for Claude

Curate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill.

When Claude uses it

Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.

Self Improving Agent SKILL.md

The full skill file from alirezarezvani/claude-skills (MIT).

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

CommandWhat it does
/si:memory-reviewAnalyze MEMORY.md — find promotion candidates, stale entries, consolidation opportunities
/si:promoteGraduate a pattern from MEMORY.md → CLAUDE.md or .claude/rules/
/si:extractTurn a proven pattern into a standalone skill
/si:memory-statusMemory health dashboard — line counts, topic files, recommendations
/si:rememberExplicitly 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

FileWho writesScopeLoaded
./CLAUDE.mdYou (+ /si:promote)Project rulesFull file, every session
~/.claude/CLAUDE.mdYouGlobal preferencesFull file, every session
~/.claude/projects/<path>/memory/MEMORY.mdClaude (auto)Project learningsFirst 200 lines
~/.claude/projects/<path>/memory/*.mdClaude (overflow)Topic-specific notesOn demand
.claude/rules/*.mdYou (+ /si:promote)Scoped rulesWhen 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

PlatformMemory SystemPlugin Works?
Claude CodeAuto-memory (MEMORY.md)✅ Full support
OpenClawworkspace/MEMORY.md✅ Adapted (reads workspace memory)
Codex CLIAGENTS.md✅ Adapted (reads AGENTS.md patterns)
GitHub Copilot.github/copilot-instructions.md⚠️ Manual promotion only

Related

How to install Self Improving Agent

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit alirezarezvani/claude-skills/engineering-team/self-improving-agent/skills/self-improving-agent#main ~/.claude/skills/self-improving-agent

Codex

npx degit alirezarezvani/claude-skills/engineering-team/self-improving-agent/skills/self-improving-agent#main ~/.codex/skills/self-improving-agent

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Self Improving Agent skill do?

Curate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.

+How do I install Self Improving Agent in Claude Code?

Copy the skill folder into ~/.claude/skills/self-improving-agent, for example with "npx degit alirezarezvani/claude-skills/engineering-team/self-improving-agent/skills/self-improving-agent#main ~/.claude/skills/self-improving-agent". Claude Code loads it automatically and uses it when a task matches.

+Does Self Improving Agent work with ChatGPT or Codex?

Yes. Self Improving Agent uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/self-improving-agent. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Self Improving Agent free?

Self Improving Agent is published on GitHub by alirezarezvani under the MIT license, which allows free use.

Related ai agents & skills skills

  1. Grill Me

    A relentless interview to sharpen a plan or design.

    mattpocock/skills★ 327k
  2. Skill Creator

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    anthropics/skills★ 197k
  3. Caveman

    Terse caveman voice: answer first, fluff gone, every technical fact kept.

    JuliusBrussee/caveman★ 121k
  4. Senior Prompt Engineer

    Improve prompts and measure LLM quality: fix inconsistent prompts, build eval sets, score RAG retrieval, check agent tool configs.

    alirezarezvani/claude-skills★ 30k
  5. Skillopt Sleep

    Use when the user wants their Claude agent to self-improve from past usage, asks about a nightly/offline 'sleep' or 'dream' cycle,…

    alirezarezvani/claude-skills★ 30k
  6. Hf Mcp

    Official

    Use Hugging Face Hub via MCP server tools. Search models, datasets, Spaces, papers.

    huggingface/skills★ 11k
  7. Chrome Mcp Troubleshooting

    Official

    Diagnose and fix Claude in Chrome MCP extension connectivity issues.

    trailofbits/skills★ 8.3k
  8. Goal Prompt

    Official

    Drafts copy-paste-ready /goal commands for goal mode in Claude Code and Codex.

    trailofbits/skills★ 8.3k
  9. Let Fate Decide

    Official

    Draws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated.

    trailofbits/skills★ 8.3k

See all ai agents & skills skills →

More skills from alirezarezvani

  1. Senior Backend

    Build and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests.

    alirezarezvani/claude-skills★ 30k
  2. Senior Computer Vision

    Computer vision models: object detection, segmentation, training a custom model, and optimizing or deploying inference (YOLO, DETR, SAM,…

    alirezarezvani/claude-skills★ 30k
  3. Senior Data Engineer

    Data pipelines: Airflow DAGs, Spark, dbt, Kafka, ETL/ELT, data quality checks.

    alirezarezvani/claude-skills★ 30k

All skills by alirezarezvani →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.