Code Memory Router — Development skill for Claude Code
Claude Code skill that routes between MemPalace (project memory) and QMD (codebase search).
How to install Code Memory Router
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open OthmanAdi/code-memory-router and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Code Memory Router does
Claude Code skill that routes between MemPalace (project memory) and QMD (codebase search). 13/13 benchmark vs 4/13 without.
Alternatives in Development
- Mempalace Search — Search your memories across the MemPalace using semantic search with wing/room filtering 58.6k ★
- Understand Anything — Claude Code skills that turn any codebase into an interactive knowledge graph you can explore, search, and ask 2.5k ★
- Evo — turns your codebase into an autoresearch loop — discovers what to measure, instruments the benchmark, then run 1.4k ★
README
code-memory-router

A Claude Code skill that routes memory and retrieval tasks to the right tool — **MemPalace** for project memory, **QMD** for codebase search.
The problem
Without routing guidance, Claude defaults to `grep` for everything — even questions like *"why did we build it this way?"* or *"what did we decide last week?"*. That burns tokens, misses the answer, and ignores the memory systems you set up.
The solution
This skill teaches Claude:
- WHERE something is in code → use QMD (hybrid BM25 + semantic search)
- WHY something exists or was decided → use MemPalace (persistent project memory)
- BOTH → combined flow, code-first or history-first depending on the question
Benchmark
Tested on 3 real tasks across 6 parallel runs (with skill vs without):
| Task | With skill | Without skill |
|---|---|---|
| Find WebSocket disconnect handler in Rust backend | 4/4 ✅ | 1/4 ❌ |
| Why did we switch from SSE to WebSocket? | 4/4 ✅ | 1/4 ❌ |
| Show AI chat entry point + architecture decisions | 5/5 ✅ | 2/5 ❌ |
| Total | 13/13 | 4/13 |
| Avg tokens (memory tasks) | 36k | 58k (+61%) |
| Avg time (memory tasks) | 175s | 339s (+94%) |
Without the skill, agents missed MemPalace entirely on every memory task — burning 61% more tokens to find the same answer via brute-force grep.
Requirements
Both must be installed and indexed. See [references/setup-guide.md](references/setup-guide.md).
Install
**Universal (works with Claude Code, Cursor, Codex, Gemini CLI, and 40+ agents):**
npx skills add OthmanAdi/code-memory-router
Or from npm: `pi install npm:code-memory-router` ([package](https://www.npmjs.com/package/code-memory-router))
**Claude Code only:**
claude skills install github:O
Related Skills
Setup Memory
Setup smart session memory system with qmd integration
Mempalace Status
Show the current state of your memory palace — wings, rooms, drawer counts, and suggestions.
PDF Text Router
A Claude Code hook that routes each Read on a PDF to the path that actually works: text layer to UTF-8 text, s
Relayweft
Routes coding work between Codex and Claude Code subscriptions
Claude Router
Switch Claude Code between Anthropic and any 9Router provider, in the terminal or the VSCode panel, on Windows
Benchmark Claude Pdfs
Benchmarks for Claude Code with and without the LiteParse skill, to improve skill usage and efficiency
Related Agents
Mempalace Admin
Use this agent for MemPalace maintenance — auditing palace contents, cleaning up stale wings/drawers, checking
Component Researcher
Investigates best practices and improvement opportunities for Claude Code components using web search and code
Swagger Validator
Use this agent when the user has finished editing a router file or swagger file and wants to validate that all