← 返回
未分类

claudemem — Persistent Agent Memory & Notes

Persistent memory that survives across conversations. Automatically remembers important context (API specs, decisions, quirks, preferences) and saves session...
zelinewang
未分类 clawhub v1.1.0 100000 Key: 无需
★ 0
Stars
📥 267
下载
💾 1
安装

概述

claudemem — Your Persistent Memory

Memory that carries across conversations. Automatically captures important knowledge during work

and saves structured session summaries when you're done. Searches past context before new tasks.

Slash Commands

  • /wrap-up — End-of-session save: extracts ALL important knowledge + saves session summary in one step. Deduplicates automatically.
  • /save-session — Save only the session summary (without extracting notes)
  • /recall [topic] — Search persistent memory for a topic, or show recent activity

Natural Trigger Phrases

These natural phrases also activate memory operations:

To save knowledge:

  • "remember this" / "save this" / "note this down" / "keep this in mind"

To search memory:

  • "what do you remember about..." / "do you recall..." / "what do we know about..."

To wrap up (save everything):

  • "wrap up" / "let's wrap up" / "save everything" — triggers /wrap-up (notes + session)
  • "save this session" / "summarize what we did" — triggers /save-session (session only)

To recall past work:

  • "what did we do last time" / "show me recent sessions" / "what happened with [topic]"

Setup

Before first use, verify the CLI is installed. If claudemem is not found on PATH, install it:

curl -fsSL https://raw.githubusercontent.com/zelinewang/claudemem/main/skills/claudemem/scripts/install.sh | bash

Or run the bundled installer:

bash "SKILL_DIR/scripts/install.sh"

After installation, verify with claudemem --version.

Commands

# Notes (knowledge fragments)
claudemem note add <category> --title "..." --content "..." --tags "tag1,tag2"
claudemem note search "query" [--in category] [--tag tags]
claudemem note list [category]
claudemem note get <id>
claudemem note update <id> --content "..." [--title "..."] [--tags "..."]
claudemem note append <id> "additional content"
claudemem note delete <id>
claudemem note categories
claudemem note tags

# Sessions (conversation summaries)
claudemem session save --title "..." --branch "..." --project "..." --session-id "..." --content "..."
claudemem session list [--last N] [--date today] [--date-range 7d] [--branch X]
claudemem session search "query" [--branch X]
claudemem session get <id>

# Unified search (across notes AND sessions)
claudemem search "query" [--type note|session] [--limit N]

# Statistics
claudemem stats

# Configuration
claudemem config set/get/list/delete <key> [value]

# Data portability
claudemem export [output-file]              # Backup as tar.gz
claudemem import <archive-file>             # Restore from backup (auto-reindexes)

# Data integrity
claudemem verify                            # Check DB-file consistency
claudemem repair                            # Fix orphaned entries

Add --format json to any command for structured output.

Autonomous Behavior

Recommended: Auto Wrap-Up Before Session Ends

If the user has enabled auto wrap-up in their CLAUDE.md, automatically execute /wrap-up before the conversation ends:

  1. Extract unsaved knowledge fragments → save as notes (with dedup)
  2. Generate session summary → save as session
  3. Show brief report of what was saved

Auto-Save Notes (Silent + Brief Indicator)

Automatically capture knowledge without asking during normal conversation. After saving,

add a brief indicator at the end of your response so the user knows what was captured:

[📝 Saved: "TikTok Rate Limits" → api-specs]

What to auto-save (proactive, no user prompt needed):

  • API specs, field mappings, rate limits, endpoint details
  • Technical decisions with rationale (why X over Y)
  • Integration quirks, gotchas, workarounds
  • Resolved bugs and their root causes
  • Configuration requirements and defaults
  • User preferences and project conventions
  • Important URLs, endpoints, environment configs

How to auto-save gracefully:

  1. Identify the knowledge fragment during your normal response
  2. Choose an appropriate category (create new if none fits)
  3. Before saving, quickly search to avoid duplicates: claudemem note search "keyword" --format json
  4. If related note exists: claudemem note append "new info" instead of creating duplicate
  5. Save: claudemem note add --title "..." --content "..." --tags "..."
  6. Show the indicator: [📝 Saved: "" → <category>]</code></li></ol><p><strong>Do NOT auto-save:</strong></p><ul><li>Temporary debugging output or transient state</li><li>File paths or code snippets without context</li><li>General programming knowledge available in docs</li><li>Information the user is likely to change immediately</li></ul><h3>Auto-Search Before Tasks (Silent)</h3><p>Search memory at the start of tasks that might benefit from prior context:</p><ul><li>Before implementing a feature in a domain previously discussed</li><li>When working with an API or system previously documented</li><li>Before making architectural decisions</li></ul><p>Search silently. If relevant results found, mention them briefly:</p><pre><code>[🔍 Found related memory: "TikTok Rate Limits" — rate limit is 100/min] </code></pre><h3>Save Sessions (On Request via /save-session or Natural Phrase)</h3><p>Session summaries are saved when the user explicitly asks — via <code>/save-session</code> command</p><p>or natural phrases like "save this session" or "wrap up". Do NOT auto-save sessions</p><p>without the user's request, as they may want to continue the conversation.</p><h3>Workflow Rules</h3><ol><li><strong>Before saving</strong>: search existing content first — update or append if related note exists</li><li><strong>Before working</strong>: search for relevant context that may inform the current task</li><li><strong>Merge related information</strong> under existing categories/titles when possible</li><li><strong>Preserve existing content</strong> unless contradicted by new information</li><li><strong>Focus on evergreen knowledge</strong>, not transient conversation artifacts</li></ol><h2>Session Summary Template</h2><p>When saving a session, generate content following this structure:</p><pre><code>## Summary One or two paragraphs describing what was accomplished. ## Key Decisions - Decision 1 with rationale - Decision 2 with rationale ## What Changed - `path/to/file.py` — Description of change ## Problems & Solutions - **Problem**: Description of issue **Solution**: How it was resolved ## Questions Raised - Open question needing future attention ## Next Steps - [ ] First follow-up task </code></pre><h2>What NOT to Capture</h2><ul><li>Temporary debugging sessions or transient state</li><li>File paths or code snippets without context</li><li>General programming knowledge available in docs</li><li>Meta-commentary about the conversation itself</li><li>Information that changes frequently without lasting value</li></ul><h2>Data Portability</h2><p>All data stored at <code>~/.claudemem/</code> as plain Markdown files with YAML frontmatter.</p><p>SQLite FTS5 index is a rebuildable cache — only the Markdown files matter.</p><p><strong>Backup</strong>: <code>claudemem export backup.tar.gz</code></p><p><strong>Restore</strong>: <code>claudemem import backup.tar.gz</code> (auto-rebuilds search index)</p><h2>Storage</h2><p><code>~/.claudemem/</code> — Plain text Markdown files organized by type (notes/ and sessions/).</p><p>FTS5 SQLite index for sub-10ms full-text search. File permissions: 0600/0700.</p></div> </div> </div> <div id="tab-versions" class="detail-content"> <div class="detail-section"> <h2>版本历史</h2> <p style="margin-bottom:12px;font-size:14px;color:#94a3b8;">共 1 个版本</p> <ul class="version-list"> <li> <div> <span class="version-tag">v1.1.0</span> <span style="font-size:11px;color:#5b6abf;margin-left:8px;background:#eef0ff;padding:1px 8px;border-radius:10px;">当前</span> </div> <div style="font-size:12px;color:#94a3b8;"> 2026-05-12 05:50 安全 安全 </div> </li> </ul> </div> </div> <div id="tab-security" class="detail-content"> <div class="detail-section"> <h2>安全检测</h2> <p style="color:#94a3b8;">暂无安全检测报告</p> </div> </div> <!-- Recommended Skills --> </div> <script> document.addEventListener('DOMContentLoaded',function(){ document.querySelectorAll('.detail-tab').forEach(function(btn){ btn.addEventListener('click',function(e){ var tab = this.getAttribute('data-tab'); document.querySelectorAll('.detail-tab').forEach(function(b){b.classList.remove('active')}); document.querySelectorAll('.detail-content').forEach(function(c){c.classList.remove('active')}); this.classList.add('active'); var el = document.getElementById('tab-'+tab); if(el) el.classList.add('active'); }); }); }); </script> <div class="footer"> <p>Skill工具集 © 2026</p> </div></body> </html>