/cortex-consolidate
Run memory maintenance — decay old memories, compress stale content, consolidate episodic memories into semantic knowledge, and run sleep-like replay. Use when the user says 'clean up memories', 'consolidate', 'run maintenance', 'compress old memories', 'memory cleanup', or
$ npx -y skills add cdeust/Cortex --skill cortex-consolidate --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/cortex-consolidate
Context preview
The summary Claude sees to decide when to auto-load this skill.
Run memory maintenance — decay old memories, compress stale content, consolidate episodic memories into semantic knowledge, and run sleep-like replay. Use when the user says 'clean up memories', 'consolidate', 'run maintenance', 'compress old memories', 'memory cleanup', or
SKILL.md
cortex-consolidate.SKILL.mdname: cortex-consolidate
description: "Run memory maintenance — decay old memories, compress stale content, consolidate episodic memories into semantic knowledge, and run sleep-like replay. Use when the user says 'clean up memories', 'consolidate', 'run maintenance', 'compress old memories', 'memory cleanup', or periodically to keep the memory system healthy. Also use after importing many memories or at the end of a long session."
Consolidate — Memory Maintenance and Evolution
Keywords
consolidate, maintenance, cleanup, compress, decay, merge, evolve, sleep, replay, consolidation, memory health, prune, clean up, optimize memories, reduce noise
Overview
Run the full memory maintenance pipeline — modeled after biological memory consolidation. This includes heat decay (cooling unused memories), compression (full text to gist to tags), CLS consolidation (episodic to semantic), causal graph discovery, and sleep-like replay that strengthens important memory clusters.
**Use this skill when:** After a long session, after bulk imports, periodically (weekly), or when memory_stats shows too many hot memories or high noise.
Workflow
Step 1: Run Full Consolidation
cortex:consolidate({})This runs the complete pipeline:
1. **Decay cycle** — Cool memories by heat * decay_factor. Memories below cold threshold (0.05) become candidates for compression 2. **Compression** — Old memories compress through stages: full text (7+ days) to gist, gist (30+ days) to tags 3. **CLS consolidation** — Frequently-accessed episodic memories promote to semantic store (like hippocampal-to-cortical transfer) 4. **Causal discovery** — PC Algorithm runs on entity co-occurrences to discover causal relationships 5. **Sleep compute** — Dream-like replay strengthens clusters, summarizes related memories, and re-embeds compressed content
Step 2: Review Results
The response includes:
- `memories_decayed` — how many cooled down
- `memories_compressed` — how many were compressed (and to what level)
- `memories_consolidated` — how many promoted from episodic to semantic
- `causal_edges_discovered` — new relationships found
- `replay_clusters` — memory clusters that were replayed and strengthened
Step 3: Selective Operations
For targeted maintenance instead of the full pipeline:
**Forget specific memories:**
cortex:forget({
"memory_id": <id>,
"hard": false
})Soft delete (sets heat to 0) by default. Use `"hard": true` for permanent deletion. Protected memories require explicit `"force": true`.
**Save checkpoint before risky operations:**
cortex:checkpoint({
"action": "save",
"label": "before-consolidation"
})**Restore if something went wrong:**
cortex:checkpoint({
"action": "restore",
"label": "before-consolidation"
})Tips
- **Don't over-consolidate**: Running too frequently prevents memories from naturally developing heat signals. Weekly is usually sufficient.
- **Check stats first**: Run `cortex:memory_stats` before consolidating to understand what needs maintenance
- **Checkpoint before bulk operations**: Always save a checkpoint before consolidation if you have critical memories
- **After backfill**: Always consolidate after `cortex:backfill_memories` to process the imported memories through the full pipeline
Read more
name: cortex-consolidate description: "Run memory maintenance — decay old memories, compress stale content, consolidate episodic memories into semantic knowledge, and run sleep-like replay. Use when the user says 'clean up memories', 'consolidate', 'run maintenance', 'compress old memories', 'memory cleanup', or periodically to keep the memory system healthy. Also use after importing many memories or at the end of a long session."
Consolidate — Memory Maintenance and Evolution
Keywords
consolidate, maintenance, cleanup, compress, decay, merge, evolve, sleep, replay, consolidation, memory health, prune, clean up, optimize memories, reduce noise
Overview
Run the full memory maintenance pipeline — modeled after biological memory consolidation. This includes heat decay (cooling unused memories), compression (full text to gist to tags), CLS consolidation (episodic to semantic), causal graph discovery, and sleep-like replay that strengthens important memory clusters.
**Use this skill when:** After a long session, after bulk imports, periodically (weekly), or when memory_stats shows too many hot memories or high noise.
Workflow
Step 1: Run Full Consolidation
cortex:consolidate({})This runs the complete pipeline:
1. **Decay cycle** — Cool memories by heat * decay_factor. Memories below cold threshold (0.05) become candidates for compression 2. **Compression** — Old memories compress through stages: full text (7+ days) to gist, gist (30+ days) to tags 3. **CLS consolidation** — Frequently-accessed episodic memories promote to semantic store (like hippocampal-to-cortical transfer) 4. **Causal discovery** — PC Algorithm runs on entity co-occurrences to discover causal relationships 5. **Sleep compute** — Dream-like replay strengthens clusters, summarizes related memories, and re-embeds compressed content
Step 2: Review Results
The response includes:
- `memories_decayed` — how many cooled down
- `memories_compressed` — how many were compressed (and to what level)
- `memories_consolidated` — how many promoted from episodic to semantic
- `causal_edges_discovered` — new relationships found
- `replay_clusters` — memory clusters that were replayed and strengthened
Step 3: Selective Operations
For targeted maintenance instead of the full pipeline:
**Forget specific memories:**
cortex:forget({
"memory_id": <id>,
"hard": false
})Soft delete (sets heat to 0) by default. Use `"hard": true` for permanent deletion. Protected memories require explicit `"force": true`.
**Save checkpoint before risky operations:**
cortex:checkpoint({
"action": "save",
"label": "before-consolidation"
})**Restore if something went wrong:**
cortex:checkpoint({
"action": "restore",
"label": "before-consolidation"
})Tips
- **Don't over-consolidate**: Running too frequently prevents memories from naturally developing heat signals. Weekly is usually sufficient.
- **Check stats first**: Run `cortex:memory_stats` before consolidating to understand what needs maintenance
- **Checkpoint before bulk operations**: Always save a checkpoint before consolidation if you have critical memories
- **After backfill**: Always consolidate after `cortex:backfill_memories` to process the imported memories through the full pipeline
Cross-platform persistent memory MCP for Codex, Gemini CLI, Claude Code, and other local MCP hosts. 36 cited neuroscience mechanisms, local-first SQLite/PostgreSQL, hybrid retrieval, decay-based consolidation, and reproducible benchmarks. Claude adds optional automatic lifecycle hooks.
Repo: cdeust/Cortex
Other skills on hypermnesia-mcp.
- /cortex-automate
Set up automation — prospective memory triggers, neuro-symbolic rules, and CLAUDE.md sync. Use when the user says 'remind me when', 'trigger when', 'create a rule', 'auto-remember', 'sync to CLAUDE.md', 'push insights', 'set up trigger', 'when I open this file', 'when this
Open skill - /cortex-debug-memory
Debug and fix memory system issues — validate memories, rate quality, manage protection, forget bad memories, and restore from checkpoints. Use when the user says 'fix memory', 'bad memory', 'wrong memory', 'delete this', 'protect this', 'this memory is wrong', 'memory quality',
Open skill - /cortex-explore-memory
Explore the memory system's state, find gaps in knowledge, assess coverage, and get diagnostic information. Use when the user asks 'what does my memory look like', 'show me memory stats', 'what am I missing', 'how good is my knowledge', 'memory health', 'show coverage', 'find
Open skill - /cortex-import
Import memories from other AI memory systems into Cortex. Supports claude-mem (SQLite), Claude Desktop sessions, ChatGPT web export (JSON), Gemini Takeout (JSON), Cursor conversations, and Claude Code JSONL. Use when the user says 'import from claude-mem', 'migrate memories',
Open skill - /cortex-navigate-knowledge
Navigate the knowledge graph — trace entity relationships, explore causal chains, drill into memory clusters, and traverse co-access paths. Use when the user asks 'how are these related', 'what connects X to Y', 'show me the knowledge graph', 'trace the relationship', 'what
Open skill - /cortex-profile
View and manage your cognitive profile — how you think, work patterns, blind spots, and cross-domain connections. Use when the user says 'show my profile', 'how do I work', 'what are my patterns', 'cognitive style', 'blind spots', 'methodology', or at the start of a session to
Open skill

