Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

mempalace

БесплатноБез исполняемых скриптовНе проверен

MemPalace local-first AI memory system. Use when setting up persistent memory for Claude Code sessions, mining project files or conversation transcripts…

enunoот enuno★ 17 звёзд на GitHub

Об этом скилле

MemPalace Skill

MemPalace (v3.3.6) is a local-first AI memory system. It stores conversation history and project content verbatim — no summarization, no paraphrasing, no external API calls by default. Retrieval uses hybrid BM25 + semantic search, achieving 96.6% R@5 on LongMemEval with zero LLM involvement.

When to Use This Skill

  • Setting up persistent memory for Claude Code or another LLM agent
  • Mining project files (mempalace mine) or Claude Code transcripts (--mode convos)
  • Retrieving forgotten context from past sessions (mempalace search, wake-up)
  • Wiring auto-save hooks so sessions survive context compression
  • Installing and configuring the MCP server (29 palace tools)
  • Managing the knowledge graph (entities, predicates, temporal relationships)
  • Backfilling existing ~/.claude/projects/ JSONL transcripts
  • Repairing, deduplicating, or migrating a corrupted or upgraded palace
  • Writing custom storage backends or switching embedding models
  • Reproducing or extending memory benchmarks

Core Architecture

Palace structure:
  WING   — broad category (person, project, topic)
    └── ROOM   — time-based grouping (day, session)
          └── DRAWER — verbatim text chunk (exact words)

Index layer (AAAK dialect):
  Compressed pointers → DRAWER locations
  LLM scans AAAK index to know which drawer to open — no full content read needed

Knowledge Graph (SQLite):
  ENTITY → PREDICATE → ENTITY  (with valid_from / valid_to dates)

4-Layer Memory Stack (token budget)

Layer Tokens Loaded Purpose
L0 ~100 Always Identity — ~/.mempalace/identity.txt
L1 ~500–800 Always Essential story — top moments from the palace
L2 ~200–500 each On demand Wing/topic content when referenced
L3 Unlimited On demand Full ChromaDB semantic search

mempalace wake-up loads L0+L1 (~600–900 tokens total), leaving 95%+ of context free.

Install

# Recommended — isolates deps, puts CLI on PATH
uv tool install mempalace

# Or with pipx
pipx install mempalace

# Inside an activated venv only
pip install mempalace

Python 3.9+ required. ChromaDB is the default backend (~300 MB for the embedding model).

First-run setup (choose embedding model, configure palace path):

python -m mempalace.onboarding

Key CLI Commands

Initialize a palace for a project

mempalace init ~/projects/myapp

Mine content into the palace

# Project source files
mempalace mine ~/projects/myapp

# Claude Code conversation transcripts
mempalace mine ~/.claude/projects/ --mode convos

# Scope to a specific wing (person/project)
mempalace mine ~/.claude/projects/myapp --wing myapp

Sweep — store one drawer per message (per-message granularity)

# Idempotent and resume-safe; run periodically for fine-grained recall
mempalace sweep ~/.claude/projects/myapp/

Search past sessions

mempalace search "why did we switch to GraphQL"
mempalace search "auth bug fix" --wing myapp

Load memory context for a new session

mempalace wake-up

Knowledge graph

# Query graph (entities, relationships, timelines)
mempalace status          # palace overview

Hooks

mempalace hook install    # wire stop + precompact hooks
mempalace hook status     # verify hooks are active

Repair and maintenance

mempalace repair          # consistency checks
mempalace repair --status # dry-run report
mempalace migrate         # ChromaDB version migration

Claude Code Hooks

Two hooks ship with MemPalace for automatic session persistence:

Hook Trigger Purpose
mempal_save_hook.sh Stop Saves session diary to palace before Claude exits
mempal_precompact_hook.sh PreCompact Saves state before context compression

Wire the hooks (required for automatic persistence):

mempalace hook install

The hooks must find the mempalace CLI. If installed via uv tool, ensure ~/.local/bin is on PATH inside the hook:

export PATH="$HOME/.local/bin:$PATH"

MCP Server

29 MCP tools cover palace reads/writes, knowledge-graph operations, cross-wing navigation, drawer management, and agent diaries.

# Start MCP server
mempalace mcp

Key tool categories:

  • Palace read/write (drawers, rooms, wings)
  • Knowledge graph (entity add/query/invalidate, timeline)
  • Agent diaries (per-agent wings, diary entries)
  • Cross-wing navigation and tunnels
  • mempalace_list_agents — discover agent wings at runtime (no system-prompt bloat)

Design Principles (non-negotiable)

  • Verbatim always — never summarizes, paraphrases, or lossy-compresses user data
  • Incremental only — append-only after initial build; crashes leave existing palace untouched
  • Entity-first — keyed by real names with DOB/ID disambiguation
  • Local-first — zero external API by default; BYOK (An
Полный SKILL.md на GitHub

Установить mempalace в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл mempalace?

MemPalace local-first AI memory system. Use when setting up persistent memory for Claude Code sessions, mining project files or conversation transcripts, querying past context, configuring MCP tools, managing the knowledge graph, or troubleshooting palace operations.

Как установить скилл mempalace?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл mempalace запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить mempalace с