.claude/skills/perpetual-memory/SKILL.md
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.
npx skillsauth add oimiragieo/agent-studio perpetual-memoryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Do NOT use for:
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 |
After a tool completes (PostToolUse), extract the significant content:
From the raw interaction, extract:
# 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
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.
Before storing, the tool checks similarity against existing entries:
--dedup-threshold <float>The LanceDB perpetual_memory table automatically maintains a vector index.
Queries use ANN (Approximate Nearest Neighbor) search for sub-second retrieval.
# 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
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(/"/g, '\\"')}" --agent ${agentType} --task-id ${taskId}`,
});
}
| Anti-Pattern | Why It Fails | Correct Approach | | ----------------------------------- | ------------------------------------------------ | ----------------------------------------------- | | Embedding raw Bash output | Noise drowns signal; embeddings are low quality | Extract the finding or decision from the output | | Skipping deduplication | Storage bloat; retrieval quality degrades | Always use dedup threshold (default 0.92) | | Replacing markdown memory files | Breaks existing agent workflows that read .md | Perpetual memory supplements, never replaces | | Storing without agent/task metadata | Cannot trace or audit memory provenance | Always pass --agent and --task-id | | Embedding everything | Context pollution; irrelevant results in queries | Only embed significant findings and decisions |
Before starting:
Read .claude/context/memory/learnings.md
After completing:
.claude/context/memory/learnings.md.claude/context/memory/issues.md.claude/context/memory/decisions.mdASSUME INTERRUPTION: If it's not in memory, it didn't happen.
tools
Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable for heart rate variability analysis, event-related potentials, complexity measures, autonomic nervous system assessment, psychophysiology research, and multi-modal physiological signal integration.
tools
Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python. Use when working with network/graph data structures, analyzing relationships between entities, computing graph algorithms (shortest paths, centrality, clustering), detecting communities, generating synthetic networks, or visualizing network topologies. Applicable to social networks, biological networks, transportation systems, citation networks, and any domain involving pairwise relationships.
data-ai
Molecular featurization for ML (100+ featurizers). ECFP, MACCS, descriptors, pretrained models (ChemBERTa), convert SMILES to features, for QSAR and molecular ML.
development
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.