克劳德自我反思 是 AI Skill Hub 本期精选MCP工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
克劳德自我反思 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
克劳德自我反思 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/ramakay/claude-self-reflect
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"-------": {
"command": "npx",
"args": ["-y", "claude-self-reflect"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 克劳德自我反思 执行以下任务... Claude: [自动调用 克劳德自我反思 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"_______": {
"command": "npx",
"args": ["-y", "claude-self-reflect"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
<img src="docs-site/public/favicon.svg" alt="Claude Self-Reflect" width="80" height="80" />
Claude forgets everything. This fixes that.
Single 44MB binary. No databases. No containers. No API keys required.
Install | How It Works | MCP Tools | Paper | FAQ
v9.4 — Multi-Source Memory CSR now remembers more than transcripts: task outcomes, plan documents, and a cross-project session registry — each absorbed at the lifecycle stage it belongs to. Episodes carry real task state again (Claude Code's TodoWrite→TaskCreate rename had silently emptied them — found, fixed, and guarded with schema-miss telemetry). Sub-millisecond search, ~150ms cached startup, 720+ tests, zero external dependencies. Release notes
<img src="docs-site/public/images/csr-demo.gif" alt="CSR Demo — Setup, Search, and Hooks" width="800" />
</div>
curl -fsSL https://raw.githubusercontent.com/ramakay/claude-self-reflect/main/scripts/install.sh | sh
Downloads the binary (SHA256-verified), then asks before activating. Setup — which registers the MCP server, installs 6 hooks, and imports your conversations — only runs with your consent. Restart Claude Code after.
Non-interactive installs never activate on their own: set CSR_AUTO_SETUP=1 to opt in, or run csr-engine setup yourself.
| Platform | Support |
|---|---|
| macOS (Apple Silicon) | Prebuilt binary |
| Linux x86_64 / WSL | Prebuilt binary |
| Linux ARM64 | Prebuilt binary |
| macOS (Intel) | Build from source |
<details> <summary>Alternative: npm</summary>
npm install -g claude-self-reflect
csr-engine setup # activation is a separate, explicit step
By default npm install only downloads the checksummed binary — it does not touch ~/.claude or index conversations. Activation happens when you run csr-engine setup, or set CSR_AUTO_SETUP=1 during install to opt in.
</details>
<details> <summary>Build from source</summary>
git clone https://github.com/ramakay/claude-self-reflect.git
cd claude-self-reflect/csr-engine
cargo build --release
cp target/release/csr-engine ~/.local/bin/
csr-engine setup
</details>
<details> <summary><strong>What You'll Ask</strong> — after install, just ask Claude naturally</summary>
No special syntax. No commands. CSR finds relevant past context and injects it automatically.
</details>
<details> <summary><strong>Performance</strong> — sub-millisecond search, ~150ms cached startup</summary>
| Metric | Value |
|---|---|
| **Cached startup** | ~150ms (p50, 54K-chunk index) |
| **Search latency (p95)** | <1ms |
| **Binary size** | 44MB |
| **Import speed** | ~20 conversations/sec |
| **Embedding** | 0.73ms/text (batch) |
</details>
<details> <summary><strong>MCP Tools</strong> — 15 annotated tools available to Claude</summary>
All tools include MCP tool annotations so Claude Code understands their safety characteristics.
| Tool | Description | Safety |
|---|---|---|
csr_reflect_on_past | Semantic search across past conversations | read-only |
store_reflection | Store insights for future retrieval | **writes** |
csr_quick_check | Fast existence check (count + top match) | read-only |
search_by_recency | Time-constrained search ("last week") | read-only |
get_recent_work | "What did we work on?" with session grouping | read-only |
get_timeline | Activity timeline with statistics | read-only |
csr_search_by_file | Find conversations that touched a file | read-only |
csr_search_by_concept | Theme-based search ("security", "testing") | read-only |
csr_search_insights | Aggregated patterns from search results | read-only |
csr_get_more | Paginate through additional results | read-only |
get_full_conversation | Retrieve complete JSONL conversation | read-only |
get_session_learnings | Iteration-level memory for Ralph loops | read-only |
csr_code_graph | Which conversations shaped a function or file (AST anchors) | read-only |
csr_why | Provenance chain — why does this code/decision exist | read-only |
csr_resolve | Record verified verdicts (resolved/still_open/regressed) on chunks | **writes** |
</details>
<details> <summary><strong>Hooks</strong> — 6 session lifecycle hooks</summary>
| Hook | What it does |
|---|---|
| **SessionStart** | Surfaces relevant past context at conversation start |
| **UserPromptSubmit** | Predicts and injects context before Claude responds |
| **PostToolUse** | Tracks file edits with session-scoped dedup |
| **Stop** | Stores iteration learnings, detects stuck patterns |
| **PreCompact** | Backs up state before context compaction |
| **SessionEnd** | Stores session narrative for future retrieval |
All hooks use catch-all error handling. They never block Claude Code.
</details>
<details> <summary><strong>AI Narratives</strong> — optional 9.3x quality boost</summary>
Transform raw conversations into rich, searchable narratives. Requires an Anthropic API key.
csr-engine daemon
| Metric | Without | With AI Narratives |
|---|---|---|
| Search quality | 0.074 | 0.691 (9.3x) |
| Token compression | 100% | 18% (82% reduction) |
| Cost per conversation | - | ~$0.012 (Batch API) |
Token transparency: Optional AI narratives (session briefings + story extraction) runclaude -pagainst your existing Claude subscription — smallest available model, capped prompts, debounced, and skipped entirely when nothing changed. Every call — including failures and timeouts — is counted:csr-engine statusshows calls and tokens spent today; cache read/creation tokens (often the majority of real usage) are tracked separately in the status JSON (cache_tokens_today/cache_tokens_total). Disable anytime withCSR_NO_AI_NARRATIVES=1; pin a model withCSR_NARRATIVE_MODEL=<model>.
</details>
<details> <summary><strong>CLI Reference</strong></summary>
csr-engine Start MCP server (default)
csr-engine setup One-shot setup: import + MCP + hooks
csr-engine status System status (JSON)
csr-engine status --compact One-line statusline output
csr-engine daemon Background enrichment daemon
csr-engine hook install --apply Install Claude Code hooks
csr-engine eval Quick eval (5 tests)
csr-engine eval --full Full eval (20 tests)
csr-engine quality <file> AST-based code quality analysis
</details>
<details> <summary><strong>Upgrading from v7.x</strong></summary>
v8.0 replaces the Python/Docker stack with a single Rust binary.
docker compose down 2>/dev/null
curl -fsSL https://raw.githubusercontent.com/ramakay/claude-self-reflect/main/scripts/install.sh | sh
Your conversation data (~/.claude/projects/) is untouched. The new engine re-imports from the same JSONL files.
</details>
<details> <summary><strong>Troubleshooting</strong></summary>
| Symptom | Fix |
|---|---|
| No search results | Run csr-engine setup |
| MCP tools not available | Run csr-engine setup, restart Claude Code |
| "spawn ENOENT" in MCP | Ensure csr-engine is in PATH |
| Slow first startup | Normal (~14s for index rebuild, subsequent: ~150ms) |
Full guide: Documentation
</details>
<details> <summary><strong>Uninstall</strong></summary>
claude mcp remove claude-self-reflect
rm -rf ~/.claude-self-reflect/
rm ~/.local/bin/csr-engine
npm uninstall -g claude-self-reflect # if installed via npm
</details>
<details> <summary><strong>Contributors (v1–v7)</strong></summary>
</details>
---
Documentation | npm | Issues | MIT License
<a href="https://ramakay.github.io/claude-self-reflect/#/docs/enrichment"> <picture> <source media="(prefers-color-scheme: dark)" srcset="docs-site/public/images/card-03-pipeline-dark.png" /> <img align="right" src="docs-site/public/images/card-03-pipeline-light.png" alt="The Pipeline — 3 layers, 9.3x improvement" width="420" /> </picture> </a>
Three layers progressively improve search quality from raw chunks to AI-enriched narratives — 9.3x improvement.
Higher quality context. Better decisions. Fewer tokens.
<br clear="both" />
Explore the full documentation →
---
克劳德自我反思工具,有效解决对话记忆问题
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,克劳德自我反思 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | claude-self-reflect |
| 原始描述 | 开源MCP工具:Claude forgets everything. This fixes that. 🔗 www.npmjs.com/package/claude-self。⭐217 · Rust |
| Topics | ai-memoryclaudeconversation-memory |
| GitHub | https://github.com/ramakay/claude-self-reflect |
| License | MIT |
| 语言 | Rust |
收录时间:2026-07-10 · 更新时间:2026-07-10 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端