
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
llmemory-palace
Advanced tools
LLMemory-Palace: Code genome system for LLM context transfer. Maps codebases into portable format for LLM understanding. Now with MCP server and reference-based minimal context (90%+ token savings).
📦 npm | 💻 GitHub | 📖 Docs | 🗺️ Roadmap | 🐛 Issues
You're working with Claude or ChatGPT. You paste your codebase files one by one. The context fills up. The AI forgets what it saw first. You explain again. Context overflows. You start over.
LLMemory-Palace maps your code into a portable format. Not your actual code—a structural map. Patterns, flows, fingerprints. One string replaces dozens of file pastes.
npm install llmemory-palace
# or
bun add llmemory-palace
Node.js 18+ | Bun 1.0+
npx palace init
npx palace scan
npx palace genome
| Command | Description |
|---|---|
init | Create .palace/ directory |
scan | Analyze codebase structure |
genome | Generate genome string |
export | Export to CXML/JSON/YAML/MessagePack |
rebuild | Reconstruct from genome |
pack | Create portable package |
merge | Merge package into project |
refresh | Incremental update with --ripple for dependents |
patterns | View detected patterns |
flows | View behavior graphs |
deps | Analyze dependencies |
status | Show current state |
query | Interactive LLM query |
validate | Security check genome |
--output, -o Output file/directory
--format, -f cxml | json | yaml | msgpack | genome
--level, -l Compression 1-4 (default: 3)
--ripple, -r Update dependents (refresh command)
--dry-run, -d Preview without changes
--metrics, -m Show before/after metrics
eval()import { Palace } from 'llmemory-palace';
const palace = new Palace({ projectPath: './my-project' });
await palace.init();
await palace.scan();
const genome = await palace.generateGenome();
console.log(genome);
Reference-based output saves 90%+ tokens:
palace:// URIs for on-demand resolution90%+ token savings with reference-based minimal context:
// ~/.claude.json
{
"mcpServers": {
"palace": {
"type": "stdio",
"command": "npx",
"args": ["-y", "llmemory-palace", "mcp"]
}
}
}
Tools:
mcp__palace__init - Initialize projectmcp__palace__scan - Scan with reference output (97% token savings)mcp__palace__genome - Generate compressed genome (99% savings)mcp__palace__resolve_ref - Resolve palace:// URIs at depth 1-3mcp__palace__status - Check project statusToken Savings:
| Operation | Full | Reference | Savings |
|---|---|---|---|
| scan | 5000 | 150 | 97% |
| genome | 20000 | 200 | 99% |
import { HookSystem } from 'llmemory-palace/plugins';
hooks.on('scan', async (result) => { /* ... */ }, { priority: 10 });
import { LargeFileHandler } from 'llmemory-palace/streaming';
const handler = new LargeFileHandler({ chunkSize: 1024 * 1024 });
handler.exportChunked(data, 'output');
import { PromptTemplates } from 'llmemory-palace/ai/prompts';
const prompts = new PromptTemplates(palace);
prompts.formatForLLM('claude', query);
MIT
FAQs
LLMemory-Palace: Code genome system for LLM context transfer. Maps codebases into portable format for LLM understanding. Now with MCP server and reference-based minimal context (90%+ token savings).
We found that llmemory-palace demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.