memory-palace
npx skills add https://github.com/algiras/memory-palace --skill memory-palace
Agent 安装分布
Skill 文档
Memory Palace Skill
Transform information into unforgettable memories using the ancient method of loci combined with the Red Queen adversarial learning protocol.
Commands
| Command | Description |
|---|---|
/memory-palace create <name> [theme] |
Create a new memory palace |
/memory-palace store <topic> |
Store a memory in current palace |
/memory-palace recall [topic] |
Walk through with semantic search |
/memory-palace define <concept> |
Instant one-sentence lookup |
/memory-palace navigate [destination] |
Cross-palace exploration with heat maps |
/memory-palace list |
Show all palaces |
/memory-palace open <name> |
Set active palace |
/memory-palace tour |
Full walkthrough of current palace |
/memory-palace add-locus <name> |
Add a new location |
/memory-palace red-queen [strategy] |
Run adversarial recall testing |
/memory-palace interview [topic] [duration] |
Timed rapid-fire Q&A mode |
/memory-palace status |
Show memory statistics with decay prediction |
Quick Start
/memory-palace create "TypeScript Mastery" "Ancient Library"
/memory-palace store "generics"
/memory-palace recall
/memory-palace red-queen weak-spots
Storage Location
Memory is organized into global and project-specific contexts:
~/memory/
âââ config.json # System configuration
âââ global/ # Cross-project knowledge
â âââ palace-registry.json
â âââ meta-index.md
â âââ learning-journal.md
â âââ *.json # Global palaces (system-design, algorithms, etc.)
â
âââ project/
âââ {projectId}/ # Project-specific knowledge
âââ palace-registry.json
âââ meta-index.md
âââ *.json # Project palaces (codebase, domain, conventions)
Context Detection
| Context | When Used | Examples |
|---|---|---|
| Global | General knowledge applicable everywhere | System design, algorithms, career skills |
| Project | Domain-specific to current codebase | Architecture decisions, team conventions, business logic |
Project ID is derived from: hash(git_remote_url) or hash(folder_path)
Command Implementation
/memory-palace create <name> [theme]
-
If no theme provided, suggest 3 options:
- “Ancient Library” (hierarchical knowledge)
- “Space Station” (technical systems)
- “Journey Path” (sequential learning)
-
Create palace JSON structure:
{
"name": "<name>",
"created": "YYYY-MM-DD",
"theme": "<theme>",
"activeLocus": "entrance",
"loci": [
{
"id": "entrance",
"name": "Grand Entrance",
"anchor": "<vivid anchor description>",
"memories": [],
"children": [],
"parent": null
}
]
}
- Save to
~/memory/global/<slugified-name>.json(or project context) - Update
palace-registry.jsonin current context - Describe the entrance vividly to anchor it
/memory-palace store <topic>
-
Ensure palace is active (or ask which to use)
-
Ask what information to memorize
-
Transform using SMASHIN SCOPE:
- Substitute abstract â concrete
- Movement – make it animated
- Absurd – impossible/exaggerated
- Sensory – all 5 senses
- Humor – make it funny
- Interact – user is part of scene
- Numbers – encode with shapes
- Symbols – visual puns
- Color – vivid, unusual
- Oversize – dramatic scale
- Position – precise placement
- Emotion – strong feelings
-
Present image to user, refine if needed
-
Place at specific locus
-
Update palace JSON and meta-index
-
Brief “walk back” to reinforce
/memory-palace recall [topic]
-
If topic specified, search palace for matching memories
-
If no topic, offer options:
- Full tour (walk all loci)
- Recent (last 5 memories)
- Random quiz
-
For each memory:
- Describe the locus vividly
- Present the image
- Reveal the content
- Ask if user wants elaboration
/memory-palace red-queen [strategy]
Strategies:
random– Random sampling (default)weak-spots– Focus on low-confidence itemsdepth-first– Complete palace tourcross-link– Questions connecting conceptsadversarial– Edge cases and failure modes
Protocol:
- Load palace and meta-index
- Launch Examiner agent (haiku) to generate questions
- Launch Learner agent (haiku) for blind recall
- Launch Evaluator agent (haiku) to score
- Update learning journal with gaps
- Optionally launch Evolver to strengthen weak memories
/memory-palace status
Display:
- Total palaces
- Total memories
- Last accessed
- Weak spots count
- Next review due (spaced repetition)
Palace JSON Schema
{
"name": "string",
"created": "YYYY-MM-DD",
"theme": "string",
"description": "string",
"activeLocus": "locus-id",
"loci": [
{
"id": "unique-id",
"name": "Location Name",
"anchor": "memorable feature",
"description": "detailed scene",
"memories": [
{
"id": "memory-id",
"subject": "topic",
"image": "vivid SMASHIN SCOPE image",
"content": "actual information",
"created": "YYYY-MM-DD",
"confidence": 1-5,
"lastRecalled": "YYYY-MM-DD",
"recallCount": 0,
"linkedTo": ["other-memory-ids"]
}
],
"children": ["child-locus-ids"],
"parent": "parent-id or null"
}
]
}
Red Queen Protocol
“It takes all the running you can do, to keep in the same place.” â The Red Queen, Through the Looking-Glass (Lewis Carroll, 1871)
Named after Lewis Carroll’s famous quote, the Red Queen Protocol represents the insight that constant adversarial testing is required just to maintain knowledgeâwithout it, memories decay and hallucinations creep in.
Key Results: -37% retrievals needed, +23% retention for weak memories, F1=0.92 hallucination detection
Four specialized agents continuously challenge and strengthen memories:
âââââââââââââââ âââââââââââââââ âââââââââââââââ
â EXAMINER ââââââºâ LEARNER ââââââºâ EVALUATOR â
â (haiku) â â (haiku) â â (haiku) â
â Generate Qs â â Blind recallâ â Score gaps â
âââââââââââââââ âââââââââââââââ ââââââââ¬âââââââ
â
â¼
âââââââââââââââ
â EVOLVER â
â (opus) â
â Strengthen â
âââââââââââââââ
Agent Roles
| Agent | Model | Role |
|---|---|---|
| Examiner | haiku | Read palace, generate hard questions targeting weak spots |
| Learner | haiku | Attempt blind recall from anchors only, rate confidence |
| Evaluator | haiku | Compare to ground truth, score accuracy, identify gaps |
| Evolver | opus | Create stronger SMASHIN SCOPE images for weak memories |
Evolution Triggers
- Manual:
/memory-palace red-queen [strategy] - Contextual: When discussing a topic with stored memories
- Scheduled: Based on spaced repetition intervals
Context-Aware Evolution
- Global memories evolve from general discussions (~/memory/global/)
- Project memories evolve from codebase-specific work (~/memory/project/{id}/)
- Each context has its own learning journal tracking gaps
Survival Structure
For context loss recovery:
meta-index.mdcontains short anchors that trigger full recallpalace-registry.jsontracks all palaces for chunked loading- Loading strategy:
- Minimal: meta-index only
- Standard: + registry
- Full: + all palace JSONs
Navigation
- Table of Contents
- References – Techniques and templates
- Examples – Sample palaces
- Palaces – Your memory palaces
- Red Queen Protocol – Adversarial testing details
Best Practices
- Start small: 5-7 loci per palace initially
- Review regularly: Run red-queen weekly
- Connect palaces: Link related memories across palaces
- Personalize: More personal = stronger memory
- All senses: Sound, smell, texture, taste, not just visual
- Trust the absurd: Impossible images stick better