mcpbeat Sign in

Memory Palace Skill for Claude

Hierarchical memory organization for multi-session context retention. Wings (projects) > Rooms (domains) > Drawers (decisions). Semantic search across all memories with zero cloud dependency.

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
521
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/vibeeval/vibecosystem --skill memory-palace

The instruction itself

15 sections, as written by the author

Memory Palace

Hierarchical, persistent memory system for Claude Code sessions. Organizes knowledge so agents never lose context across sessions.

Architecture

Palace (global)
  Wing: project-name
    Room: authentication
      Drawer: "chose JWT over sessions" (2026-04-07)
      Drawer: "rate limiting at 100 req/min" (2026-04-06)
    Room: database
      Drawer: "PostgreSQL with pgvector" (2026-04-05)
      Drawer: "migration strategy: blue-green" (2026-04-04)
    Room: deployment
      Drawer: "Vercel + GitHub Actions" (2026-04-03)
  Wing: another-project
    Room: ...

Storage Format

All memories stored in ~/.claude/palace/ as flat JSONL files per wing:

~/.claude/palace/
  index.json          # Wing registry
  my-project.jsonl    # All drawers for this wing
  other-project.jsonl # All drawers for this wing

Drawer Entry Format

{
  "id": "d-abc123",
  "wing": "my-project",
  "room": "authentication",
  "content": "Chose JWT with refresh tokens over session-based auth. Reason: stateless, mobile-friendly, scalable.",
  "tags": ["auth", "jwt", "architecture"],
  "timestamp": "2026-04-07T14:30:00Z",
  "session_id": "s-xyz789",
  "agent": "architect",
  "type": "decision"
}

Entry Types

  • decision - Architectural or design choice with reasoning
  • discovery - Something learned about the codebase
  • error - Error encountered and how it was resolved
  • constraint - External limitation or requirement
  • pattern - Recurring code or workflow pattern

Operations

Store a Memory

When an important decision, discovery, or constraint is identified:

Wing: detect from CLAUDE_PROJECT_DIR or package.json name
Room: infer from topic (auth, db, deploy, frontend, api, etc.)
Content: what was decided/discovered and WHY
Tags: relevant keywords for search

Recall Memories

Before starting work on a topic, query relevant rooms:

1. Get wing from current project
2. List rooms with recent activity
3. Load drawers matching current task keywords
4. Inject as context: "Previous decisions in this area: ..."

Search Across Wings

For cross-project pattern detection:

Search all wings for entries matching query
Return sorted by relevance (keyword match + recency)
Useful for: "Have I solved this before in another project?"

Integration Points

With Agents

  • architect: Store architectural decisions automatically
  • self-learner: Store error resolutions as discoveries
  • planner: Load relevant rooms before planning
  • compass: Use palace for session recovery context

With Hooks

  • palace-auto-save hook: Captures decisions from conversation
  • palace-recall hook: Injects relevant memories at session start
  • pre-compact-continuity: Saves WIP state to palace before compaction

With Existing Memory System

Palace complements (does not replace) the existing PostgreSQL memory:

  • PostgreSQL: raw embeddings, vector search, learning store
  • Palace: structured, human-readable, hierarchical organization
  • Both can be queried; palace is faster for targeted recall

Room Detection Heuristics

| Keywords in Context | Room |

|---------------------|------|

| auth, login, session, JWT, OAuth | authentication |

| database, SQL, migration, schema | database |

| deploy, CI/CD, Docker, K8s | deployment |

| React, CSS, component, UI | frontend |

| API, endpoint, REST, GraphQL | api |

| test, TDD, coverage, mock | testing |

| security, XSS, injection, CORS | security |

| performance, cache, optimize | performance |

| config, env, settings | configuration |

When to Store

ALWAYS store:

  • Architectural decisions with reasoning
  • External constraints (client requirements, hosting limits)
  • Error resolutions that took > 5 minutes to solve
  • Chosen patterns and why alternatives were rejected

NEVER store:

  • Code snippets (they're in git)
  • Temporary debugging notes
  • Information already in CLAUDE.md
  • Ephemeral task progress (use tasks for that)

Other skills for the same job

different authors, same section of the catalogue
GitHub Project Management
by ComeOnOliver
×3

Comprehensive GitHub project management with swarm-coordinated issue tracking, project board automation, and sprint planning

14k tokens
Folder Structure Blueprint Generator
by github
vendor ×1

Comprehensive technology-agnostic prompt for analyzing and documenting project folder structures. Auto-detects project types (.NET, Java, React, Angular, Python, Node.js, Flutter), generates detailed blueprints with visualization options, naming conventions, file placement patterns, and extension templates for maintaining consistent code organization across diverse technology stacks.

3k tokens
Sequential Thinking
by mrgoonie
×1

Use when complex problems require systematic step-by-step reasoning with ability to revise thoughts, branch into alternative approaches, or dynamically adjust scope. Ideal for multi-stage analysis, design planning, problem decomposition, or tasks with initially unclear scope.

4k tokens
Openserv Multi Agent Workflows
by internet-court
×1

Multi-agent workflow examples to work together on the OpenServ Platform. Covers agent discovery, multi-agent workspaces, task dependencies, and workflow orchestration using the Platform Client. Read reference.md for the full API reference. Read openserv-agent-sdk and openserv-client for building and running agents.

24k tokens
Caveman Compress
by HoangNguyen0403
×1

> Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md.

7k tokens scripts
API Patterns
by lingxling
×1

API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.

5k tokens scripts
Github Workflow Automation
by lingxling
×1

Patterns for automating GitHub workflows with AI assistance, inspired by [Gemini CLI](https://github.com/google-gemini/gemini-cli) and modern DevOps practices.

5k tokens
Domain Identification Grouping
by christophacham
×1

Groups existing components into logical business domains to plan service-based architecture. Use when asking "which components belong together?", "group these into services", "organize by domain", "component-to-domain mapping", or planning service extraction from an existing codebase. Do NOT use for identifying new domains from scratch (use domain-analysis) or analyzing coupling (use coupling-analysis).

10k tokens

How to use it

Copy the folder

Take vibeeval/memory-palace from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.