Show how to use memex: what it does, how to create skills/rules/memories, available commands, current status, and troubleshooting.
Memex injects relevant knowledge into your session based on what you're working on. Instead of loading everything into context at once, it uses semantic similarity to surface only what's needed right now.
Each prompt you type is embedded locally (ONNX, no API calls) and compared against your indexed skills, rules, and memories. The top matches are injected as additional context. Match counts are tracked via telemetry (~/.claude/cache/memex-telemetry.json).
Entry types and disclosure model:
| Type | First match | Subsequent matches | Matched on |
|---|---|---|---|
rule | Full content | one-liner reminder only | UserPromptSubmit |
memory | Full content |
| Full content |
| UserPromptSubmit |
skill | Description teaser | Full content (via Read) | UserPromptSubmit |
workflow | Description teaser | Full content (via Read) | UserPromptSubmit |
tool-guidance | Full content | Full content | PreToolUse |
stop-rule | Behavioral rules | — | Stop |
session-learning | Full content | Full content | UserPromptSubmit |
| Command | Description |
|---|---|
/sleep | Knowledge lifecycle: migrate CLAUDE.md/MEMORY.md/rules into skills, promote/demote entries based on match telemetry |
/deep-sleep | Analyze past session transcripts to extract recurring patterns, classify into appropriate types |
/reflect | Extract learnings from the current conversation and save as memories, rules, or skills |
/doctor | Diagnose installation and configuration issues |
/handoff | Write a continuation plan to disk so a fresh session can pick up where this one left off |
/takeover | Read a handoff document and resume the work |
/help | This guide |
Create ~/.claude/skills/<name>/SKILL.md (global) or <project>/.claude/skills/<name>/SKILL.md (project):
---