perpetual-memory
БесплатноЗапускает вложенные скриптыНе проверенUse when you need to auto-log all tool interactions into a self-organizing vector DB with instant recall. Intercepts interactions, extracts key information…
от oimiragieo★ 48 звёзд на GitHubОб этом скилле
Perpetual Memory
Overview
Auto-embed all tool interactions into a vector store without explicit "remember" commands. Every significant interaction is captured, categorized, and stored in LanceDB for instant semantic recall across sessions.
Core principle: If it happened and it mattered, it is in perpetual memory. No explicit "remember" commands needed. The system auto-captures decisions, learnings, patterns, gotchas, and issues from every agent interaction.
When to Use
- After completing any significant task (auto-triggered)
- When agents produce findings, decisions, or learnings
- When debugging reveals root causes or workarounds
- When architectural decisions are made
- When new patterns or anti-patterns are discovered
- At session boundaries to capture session summaries
Do NOT use for:
- Trivial read-only queries that produce no insights
- Ephemeral debugging output that has no lasting value
- Duplicate content already in the memory system
Integration with Existing Memory System
This skill extends (does NOT replace) the existing memory system:
| System | Purpose | Perpetual Memory Role |
|---|---|---|
learnings.md |
Human-readable learning archive | Auto-populates from embeddings |
decisions.md |
ADR-style decisions | Indexes for semantic recall |
issues.md |
Known blockers and workarounds | Indexes for semantic recall |
patterns.json |
Structured patterns (MemoryRecord) | Deduplicates against |
gotchas.json |
Structured gotchas (MemoryRecord) | Deduplicates against |
memory-search.cjs |
Semantic search over markdown | Complementary (different index) |
pnpm search:code |
Code search (BM25 + semantic) | Does NOT interfere |
| perpetual_memory table | Vector store of all interactions | Primary perpetual store |
Workflow
Step 1: Intercept Interaction
After a tool completes (PostToolUse), extract the significant content:
- TaskUpdate completions with metadata.summary
- Write/Edit operations with file paths and descriptions
- Bash command outputs with significant findings
- Skill invocation results
Step 2: Extract Key Information
From the raw interaction, extract:
- What happened: One-line summary of the action
- Why it matters: The significance or decision rationale
- Context: Agent name, task ID, affected files
- Category signal: Keywords that indicate decision/learning/pattern/gotcha/issue
Step 3: Generate Embeddings and Store
# Embed and store via the auto-embed CLI tool
node .claude/tools/cli/auto-embed.cjs \
--text "Discovered that routing-guard.cjs blocks Write on creator paths. This is Gate 4 enforcement." \
--agent developer \
--task-id task-12 \
--category learning
Step 4: Auto-Categorize
The tool auto-categorizes based on keyword matching:
| Category | Trigger Keywords |
|---|---|
decision |
decided, chose, selected, tradeoff, rationale, ADR |
learning |
learned, discovered, found that, realized, insight |
pattern |
pattern, approach, technique, best practice, convention |
gotcha |
gotcha, pitfall, anti-pattern, risk, warning, sharp edge |
issue |
issue, bug, error, broken, failing, blocker, regression |
Override with --category <name> when auto-detection is wrong.
Step 5: Deduplication
Before storing, the tool checks similarity against existing entries:
- Default threshold: 0.92 (92% cosine similarity)
- If a near-duplicate exists, the store is skipped
- Configurable via
--dedup-threshold <float>
Step 6: Build Retrieval Index
The LanceDB perpetual_memory table automatically maintains a vector index.
Queries use ANN (Approximate Nearest Neighbor) search for sub-second retrieval.
CLI Reference
# Store an interaction
node .claude/tools/cli/auto-embed.cjs --text "interaction text" --agent developer --task-id task-5
# Query perpetual memory
node .claude/tools/cli/auto-embed.cjs --query "how does routing work" --limit 10
# View statistics
node .claude/tools/cli/auto-embed.cjs --stats
# Pipe from stdin
echo "important finding" | node .claude/tools/cli/auto-embed.cjs --stdin --agent qa
Agent Integration
All agents should embed significant findings at task completion:
// In TaskUpdate(completed) metadata handler:
// Auto-embed the summary into perpetual memory
const summary = metadata.summary;
if (summary && summary.length > 20) {
// The auto-embed tool handles categorization and dedup
Bash({
command: `node .claude/tools/cli/auto-embed.cjs --text "${summary.replace(/"
Установить perpetual-memory в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл perpetual-memory?
Use when you need to auto-log all tool interactions into a self-organizing vector DB with instant recall. Intercepts interactions, extracts key information, generates embeddings, stores in LanceDB, auto-categorizes, and builds a retrieval index. Inspired by OpenClaw SQLite LCM + summary DAG pattern.
Как установить скилл perpetual-memory?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл perpetual-memory запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic