self-improving-agent — self-improving-代理
v2.1.32Curate Claude Code's auto-memory into durable project knowledge. Analyze MEMORY.md for patterns, promote proven learnings to CLAUDE.md and .claude/rules/, 提取 recurring solutions into reusable 技能s. Use when: (1) reviewing what Claude has learned about your project, (2) graduating a pattern from notes to enforced rules, (3) turning a 调试ging solution into a 技能, (4) 检查ing memory 健康 and capacity.
运行时依赖
安装命令
点击复制技能文档
Self-Improving 代理
Auto-memory captures. This 插件 curates.
Claude Code's auto-memory (v2.1.32+) automatically records project patterns, 调试ging insights, and your preferences in MEMORY.md. This 插件 添加s the intelligence layer: it analyzes what Claude has learned, promotes proven patterns into project rules, and 提取s recurring solutions into reusable 技能s.
Quick Reference Command What it does /si: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:提取 Turn a proven pattern into a standalone 技能 /si:状态 Memory 健康 仪表盘 — line counts, topic files, recommendations /si:remember Explicitly save 导入ant knowledge to auto-memory How It Fits To获取her ┌─────────────────────────────────────────────────────────┐ │ Claude Code Memory Stack │ ├─────────────┬──────────────────┬────────────────────────┤ │ CLAUDE.md │ Auto Memory │ 会话 Memory │ │ (you write)│ (Claude writes)│ (Claude writes) │ │ Rules & │ MEMORY.md │ Conversation 记录s │ │ standards │ + topic files │ + continuity │ │ Full load │ First 200 lines│ 上下文ual load │ ├─────────────┴──────────────────┴────────────────────────┤ │ ↑ /si:promote ↑ /si:review │ │ Self-Improving 代理 (this 插件) │ │ ↓ /si:提取 ↓ /si:remember │ ├─────────────────────────────────────────────────────────┤ │ .claude/rules/ │ New 技能s │ Error 记录s │ │ (scoped rules) │ (提取ed) │ (auto-captured)│ └─────────────────────────────────────────────────────────┘
安装ation Claude Code (插件) /插件 marketplace 添加 alirezarezvani/claude-技能s /插件 安装 self-improving-代理@claude-code-技能s
OpenClaw ClawHub 安装 self-improving-代理
Codex 命令行工具 ./scripts/codex-安装.sh --技能 self-improving-代理
Memory Architecture Where things live File Who writes Scope Loaded ./CLAUDE.md You (+ /si:promote) Project rules Full file, every 会话 ~/.claude/CLAUDE.md You Global preferences Full file, every 会话 ~/.claude/projects//memory/MEMORY.md Claude (auto) Project learnings First 200 lines ~/.claude/projects//memory/.md Claude (overflow) Topic-specific notes On demand .claude/rules/.md You (+ /si:promote) Scoped rules When matching files open The promotion lifecycle
- Claude discovers pattern → auto-memory (MEMORY.md)
- Pattern recurs 2-3x → /si:review flags it as promotion candidate
- You 应用rove → /si:promote graduates it to CLAUDE.md or rules/
- Pattern becomes an enforced rule, not just a note
- MEMORY.md entry 移除d → 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 技能s
That's what this 插件 does.
Promotion = graduation
When you promote a learning, it moves from Claude's scratchpad (MEMORY.md) to your project's rule 系统 (CLAUDE.md or .claude/rules/). The difference matters:
MEMORY.md: "I noticed this project uses pnpm" (background 上下文) CLAUDE.md: "Use pnpm, not npm" (enforced instruction)
Promoted rules have higher priority and load in full (not t运行cated at 200 lines).
Rules directory for scoped knowledge
Not everything belongs in CLAUDE.md. Use .claude/rules/ for patterns that only 应用ly to specific file types:
# .claude/rules/API-测试.md
paths: - "src/API/*/.test.ts" - "tests/API/*/"
- Use supertest for API 端点 测试
- Mock external 服务s with msw
- Always test error 响应s, not just h应用y paths
This loads only when Claude works with API test files — zero overhead otherwise.
代理s memory-analyst
Analyzes MEMORY.md and topic files to identify:
Entries that recur across 会话s (promotion candidates) Stale entries referencing 删除d files or old patterns Related entries that should be consolidated Gaps between what MEMORY.md knows and what CLAUDE.md enforces 技能-提取器
Takes a proven pattern and 生成s a complete 技能:
技能.md with proper frontmatter Reference documentation Examples and edge cases Ready for /插件 安装 or ClawHub publish Hooks error-capture (Post工具Use → Bash)
监控s command 输出 for errors. When 检测ed, 应用ends a structured entry to auto-memory with:
The command that fAIled Error 输出 (t运行cated) Timestamp and 上下文 Suggested category
令牌 overhead: Zero on 成功. ~30 令牌s only when an error is 检测ed.
平台 Support 平台 Memory 系统 插件 Works? Claude Code Auto-memory (MEMORY.md) ✅ Full support OpenClaw workspace/MEMORY.md ✅ Adapted (reads worksp