Two description rewrites left 21 skills that the model never loads on its own. Every one is already a slash command (/<plugin>:<skill>), so new commands would only duplicate them; what was missing is automatic invocation, which only a hook provides. Eight plugins now ship a UserPromptSubmit hook, hooks/skill_router.py, that matches the prompt against hand-written patterns in hooks/skill_routes.json and adds one line naming the skill on a match. Silent otherwise, one hint per plugin per prompt, once per session, skips /commands, no model or network calls, fails open, ~30 ms. SKILL_ROUTER=0 turns it off. Measured live on held-out prompts (Claude Code 2.1.322, Sonnet): the skills loaded in 24/84 runs with the hook vs 2/84 without, 0/21 near-miss loads either way. Per-skill decisions in audit/silent-skill-triggers-2026-11/. scripts/check_skill_router.py (new CI step) keeps the copies identical, the plugin names right and the routes pointing at shipped skills; it caught the si namespace on the first run. derive_counters counts the shared router once. Plugin versions bumped (engineering-advanced-skills 2.14.18, the other seven 2.14.11). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8KYFL29bT12FJxEPDSBxi |
||
|---|---|---|
| .. | ||
| .claude-plugin | ||
| agents | ||
| hooks | ||
| reference | ||
| skills | ||
| templates | ||
| CLAUDE.md | ||
| LICENSE | ||
| README.md | ||
| settings.json | ||
Self-Improving Agent
Auto-memory captures. This plugin curates.
A Claude Code plugin that turns auto-memory into a structured self-improvement loop. Analyze what Claude has learned, promote proven patterns to enforced rules, and extract recurring solutions into reusable skills.
Why
Claude Code's auto-memory (v2.1.32+) automatically records project patterns in MEMORY.md. But it has no judgment about what to keep, what to promote, or when entries go stale. This plugin adds the intelligence layer.
The difference:
- MEMORY.md: "I noticed this project uses pnpm" (background note, truncated at 200 lines)
- CLAUDE.md: "Use pnpm, not npm" (enforced instruction, loaded in full)
Promoting a pattern from memory to rules fundamentally changes how Claude treats it.
Commands
| Command | What it does |
|---|---|
/si:memory-review |
Analyze auto-memory — find promotion candidates, stale entries, health metrics |
/si:promote |
Graduate a pattern from MEMORY.md → CLAUDE.md or .claude/rules/ |
/si:extract |
Turn a recurring pattern into a standalone reusable skill |
/si:memory-status |
Memory health dashboard — line counts, capacity, recommendations |
/si:remember |
Explicitly save important knowledge to auto-memory |
Skill hints (UserPromptSubmit hook)
Some skills in this plugin rarely load on their own: in our trigger evals the model answered prompts squarely in their scope without opening them. The plugin ships a small hook, hooks/skill_router.py, that reads each prompt and, when it clearly matches one of these skills, adds one line telling Claude which skill fits: si:remember.
It is quiet by design. It prints nothing on prompts that don't match, suggests at most one skill per prompt and each skill at most once per session, skips prompts that start with /, never blocks a prompt and makes no network or model calls. The patterns live in hooks/skill_routes.json. Turn it off with SKILL_ROUTER=0 (all plugins) or SKILL_ROUTER_SI=0 (this plugin only).
Install
Claude Code
/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
How It Works
Claude discovers pattern → auto-memory (MEMORY.md)
↓
Pattern recurs 2-3x → /si:memory-review flags it
↓
You approve → /si:promote graduates it to CLAUDE.md
↓
Pattern becomes enforced rule, memory entry removed
↓
Space freed for new learnings
What's Included
| Component | Count | Description |
|---|---|---|
| Skills | 5 | review, promote, extract, status, remember |
| Agents | 2 | memory-analyst, skill-extractor |
| Hooks | 1 | PostToolUse error capture (zero overhead on success) |
| Reference docs | 3 | memory architecture, promotion rules, rules directory patterns |
| Templates | 2 | rule template, skill template |
Design Principles
- Don't fight auto-memory — orchestrate it. Auto-memory captures. This plugin curates.
- No duplicate storage. Reads from
~/.claude/projects/directly. No.learnings/directory. - Zero capture overhead. Auto-memory handles capture. Hook only fires on errors.
- Promotion = graduation. Moving a pattern from MEMORY.md to CLAUDE.md changes its priority.
- Respect the 200-line limit. Actively manages MEMORY.md capacity.
Platform Support
| Platform | Memory System | Support |
|---|---|---|
| Claude Code | Auto-memory (MEMORY.md) | ✅ Full |
| OpenClaw | workspace/MEMORY.md | ✅ Adapted |
| Codex CLI | AGENTS.md | ✅ Adapted |
| GitHub Copilot | copilot-instructions.md | ⚠️ Manual |
Credits
Inspired by pskoett/self-improving-agent — a structured learning loop for AI coding agents. This plugin builds on that concept by integrating natively with Claude Code's auto-memory system.
License
MIT — see LICENSE