thedotmack/claude-mem

A Claude Code plugin that automatically captures everything Claude does during your coding sessions, compresses it with AI (using Claude's agent-sdk), and injects relevant context back into future sessions.

License:GPLLanguage:TypeScript14.0k914
人工智能ai-agentsai-memoryanthropicartificial-intelligencechromadbClaudeclaude-agent-sdkclaude-agentsclaude-codeclaude-code-pluginclaude-skillsembeddingslong-term-memorymem0memory-engineopenmemoryragsqlitesupermemory

Deep Analysis

Claude Code persistent memory compression system that maintains context memory across sessions.

Recommended

Core Features

Intelligently compress conversation history while retaining key information

Maintain memory across sessions without losing context

Documentation in 20+ languages

AGPL 3.0 license, free to use

Technical Implementation

Architecture:Memory Compression Engine + Persistent Storage
Execution Flow:

Key Components:
Memory Compression
Local Storage
Highlights
  • Solves Claude's memory-less problem
  • Intelligent compression retains key information
  • 20+ language documentation support
  • Active community and token project
Use Cases
  • Long-term projects requiring cross-session memory
  • Complex tasks needing to maintain context
  • Team collaboration sharing project memory
Limitations
  • Compression may lose some details
  • Storage space grows with usage
Tech Stack
TypeScriptNode.jsLocal Storage

Official $CMEM Links: Bags.fmJupiterPhotonDEXScreener

Official CA: 2TsmuYUrsctE57VLckZBYEEzdokUF8j8e1GavekWBAGS (on Solana)


Claude-Mem

🇨🇳 中文🇯🇵 日本語🇧🇷 Português🇰🇷 한국어🇪🇸 Español🇩🇪 Deutsch🇫🇷 Français 🇮🇱 עברית🇸🇦 العربية🇷🇺 Русский🇵🇱 Polski🇨🇿 Čeština🇳🇱 Nederlands🇹🇷 Türkçe🇺🇦 Українська🇻🇳 Tiếng Việt🇮🇩 Indonesia🇹🇭 ไทย🇮🇳 हिन्दी🇧🇩 বাংলা🇷🇴 Română🇸🇪 Svenska🇮🇹 Italiano🇬🇷 Ελληνικά🇭🇺 Magyar🇫🇮 Suomi🇩🇰 Dansk🇳🇴 Norsk

Persistent memory compression system built for Claude Code.

License Version Node Mentioned in Awesome Claude Code

thedotmack/claude-mem | Trendshift


Claude-Mem Preview

Quick StartHow It WorksSearch ToolsDocumentationConfigurationTroubleshootingLicense

Claude-Mem seamlessly preserves context across sessions by automatically capturing tool usage observations, generating semantic summaries, and making them available to future sessions. This enables Claude to maintain continuity of knowledge about projects even after sessions end or reconnect.


Quick Start

Start a new Claude Code session in the terminal and enter the following commands:

> /plugin marketplace add thedotmack/claude-mem

> /plugin install claude-mem

Restart Claude Code. Context from previous sessions will automatically appear in new sessions.

Key Features:

  • 🧠 Persistent Memory - Context survives across sessions
  • 📊 Progressive Disclosure - Layered memory retrieval with token cost visibility
  • 🔍 Skill-Based Search - Query your project history with mem-search skill
  • 🖥️ Web Viewer UI - Real-time memory stream at http://localhost:37777
  • 💻 Claude Desktop Skill - Search memory from Claude Desktop conversations
  • 🔒 Privacy Control - Use <private> tags to exclude sensitive content from storage
  • ⚙️ Context Configuration - Fine-grained control over what context gets injected
  • 🤖 Automatic Operation - No manual intervention required
  • 🔗 Citations - Reference past observations with IDs (access via http://localhost:37777/api/observation/{id} or view all in the web viewer at http://localhost:37777)
  • 🧪 Beta Channel - Try experimental features like Endless Mode via version switching

Documentation

📚 View Full Documentation - Browse markdown docs on GitHub

Getting Started

Best Practices

Architecture

Configuration & Development


How It Works

Core Components:

  1. 5 Lifecycle Hooks - SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd (6 hook scripts)
  2. Smart Install - Cached dependency checker (pre-hook script, not a lifecycle hook)
  3. Worker Service - HTTP API on port 37777 with web viewer UI and 10 search endpoints, managed by Bun
  4. SQLite Database - Stores sessions, observations, summaries
  5. mem-search Skill - Natural language queries with progressive disclosure
  6. Chroma Vector Database - Hybrid semantic + keyword search for intelligent context retrieval

See Architecture Overview for details.


MCP Search Tools

Claude-Mem provides intelligent memory search through 4 MCP tools following a token-efficient 3-layer workflow pattern:

The 3-Layer Workflow:

  1. search - Get compact index with IDs (~50-100 tokens/result)
  2. timeline - Get chronological context around interesting results
  3. get_observations - Fetch full details ONLY for filtered IDs (~500-1,000 tokens/result)

How It Works:

  • Claude uses MCP tools to search your memory
  • Start with search to get an index of results
  • Use timeline to see what was happening around specific observations
  • Use get_observations to fetch full details for relevant IDs
  • ~10x token savings by filtering before fetching details

Available MCP Tools:

  1. search - Search memory index with full-text queries, filters by type/date/project
  2. timeline - Get chronological context around a specific observation or query
  3. get_observations - Fetch full observation details by IDs (always batch multiple IDs)
  4. __IMPORTANT - Workflow documentation (always visible to Claude)

Example Usage:

// Step 1: Search for index
search(query="authentication bug", type="bugfix", limit=10)

// Step 2: Review index, identify relevant
... (内容已截断)
Highly Recommended
agents

wshobson/agents

wshobson

Intelligent automation and multi-agent orchestration for Claude Code

The most comprehensive Claude Code plugin ecosystem, covering full-stack development scenarios with a three-tier model strategy balancing performance and cost.

25.6k2.8k3 days ago
Highly Recommended
awesome-claude-skills

ComposioHQ/awesome-claude-skills

ComposioHQ

A curated list of awesome Claude Skills, resources, and tools for customizing Claude AI workflows

The most comprehensive Claude Skills resource list; connect-apps is a killer feature.

19.9k2.0k3 days ago
Recommended
oh-my-opencode

code-yeongyu/oh-my-opencode

code-yeongyu

The Best Agent Harness. Meet Sisyphus: The Batteries-Included Agent that codes like you.

Powerful multi-agent coding tool, but note OAuth limitations.

17.5k1.2k3 days ago
Highly Recommended
ui-ux-pro-max-skill

nextlevelbuilder/ui-ux-pro-max-skill

nextlevelbuilder

An AI SKILL that provide design intelligence for building professional UI/UX multiple platforms

Essential for designers; comprehensive UI/UX knowledge base.

15.3k1.5k3 days ago
Highly Recommended
planning-with-files

OthmanAdi/planning-with-files

OthmanAdi

Claude Code skill implementing Manus-style persistent markdown planning — the workflow pattern behind the $2B acquisition.

Context engineering best practices; an open-source implementation of Manus mode.

9.3k8113 days ago
Highly Recommended
Skill_Seekers

yusufkaraaslan/Skill_Seekers

yusufkaraaslan

Convert documentation websites, GitHub repositories, and PDFs into Claude AI skills with automatic conflict detection

An automation powerhouse for skill creation, dramatically improving efficiency.

6.8k6833 days ago