插件低风险未认领
si
Self-Improving Agent: curate auto-memory, promote learnings to CLAUDE.md and rules, extract proven patterns into reusable skills. Provides /si:memory-review, /si:promote, /si:extract, /si:memory-status, and /si:remember slash commands.
alirezarezvanialirezarezvani/self-improving-agent-plugin
说明
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
宿主
成员6 个技能 · 2 个助手
extractTurn a fix or pattern that keeps coming up into a reusable skill with SKILL.md, reference docs and examples. Use whenever the user runs /si:extract or wants to package a recurring solution or lesson as a skill.
memory-reviewReview what the agent has learned in auto-memory: what to promote to permanent rules, stale entries to prune, duplicates to merge. Use whenever the user runs /si:memory-review or asks what you learned or what to keep.
memory-statusHealth check of agent auto-memory: line counts, topic files, capacity, stale entries and what to prune. Use whenever the user asks how full or healthy memory is, or runs /si:memory-status.
promoteGraduate a proven pattern from auto-memory (MEMORY.md) to CLAUDE.md or .claude/rules/ for permanent enforcement. Use when the user runs /si:promote or asks to make a learned behavior permanent.
rememberSave something important to auto-memory with a timestamp and context. Use whenever the user says remember this, note it for next time or don't forget, wants you to stop repeating a mistake across sessions, or a discovery is too important for auto-capture.
self-improving-agentCurate 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.
memory-analyst助手Read-only analyst for `~/.claude/projects/<project>/memory/`. Identifies promotion candidates (entries proven enough for CLAUDE.md), stale references, consolidation opportunities, conflicts with existing CLAUDE.md rules, and reports health metrics (capacity, freshness, organization). Spawned by `/si:memory-review`.
skill-extractor助手Transforms a proven pattern or debugging solution into a standalone, portable skill package. Generates `SKILL.md` with proper frontmatter, reference docs, and examples that work in any project (no hardcoded paths or project-specific values). Spawned by `/si:extract` when a recurring solution should become reusable.
权限
- 完整安装
- 2.14.11
自动运行
- 钩子Claude CodePostToolUse
"${CLAUDE_PLUGIN_ROOT}/hooks/error-capture.sh" - 钩子Claude CodeUserPromptSubmit
python3 "${CLAUDE_PLUGIN_ROOT}/hooks/skill_router.py"
pythonshellnpmpnpm/yarnalirezarezvani.comclawhub.aicode.claude.comgithub.com~/.claude检查
低风险 · 没有发现需要提醒的地方。
未经人工审核 · 已做规则检查;模型审核尚未开启。
另有 1 处低风险标记:常见命令之类,只记录、不提醒
- 规则 · command_injection
agents/skill-extractor.md:5
文件22 个文件 · 66.2 KB
- CLAUDE.md3.2 KB
- LICENSE1.0 KB
- README.md4.1 KB
- settings.json852 B
.claude-plugin/1
- plugin.json623 B
agents/2
- memory-analyst.md3.0 KB
- skill-extractor.md4.0 KB
hooks/4
- error-capture.shx4.0 KB
- hooks.json489 B
- skill_router.py4.4 KB
- skill_routes.json815 B
reference/3
- memory-architecture.md4.7 KB
- promotion-rules.md3.2 KB
- rules-directory-patterns.md3.4 KB
skills/extract/1
- SKILL.md5.6 KB
skills/memory-review/1
- SKILL.md4.2 KB
skills/memory-status/1
- SKILL.md2.8 KB
skills/promote/1
- SKILL.md4.5 KB
skills/remember/1
- SKILL.md3.2 KB
skills/self-improving-agent/1
- SKILL.md7.1 KB
templates/2
- rule-template.md240 B
- skill-template.md873 B
版本
- #12.14.11最新2026年11月17日