Memory Consolidator
Clean up and compress old memories while converting episodic experiences into lasting knowledge.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up β so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/cortex-consolidate-cdeust/β the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Works for every skill.What this command does
- Makes a new, empty temporary folder.
- Downloads the skill's folder,
skills/cortex-consolidate, fromgithub.com/cdeust/Cortex(branchmain), the GitHub repository it's listed from. You get the version that is there now, not a copy we keep. - Copies that folder to
~/.claude/skills/cortex-consolidate-cdeust/. - Deletes the temporary folder.
Installing runs none of the skill's files; it only downloads and copies them. When you later use the skill, Claude follows its SKILL.md and may run scripts that come with it. Read them first.
Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates β they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description β no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the βWhat this skill doesβ section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
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.
What this skill does
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:
- Decay cycle β Cool memories by heat * decay_factor. Memories below cold threshold (0.05) become candidates for compression
- Compression β Old memories compress through stages: full text (7+ days) to gist, gist (30+ days) to tags
- CLS consolidation β Frequently-accessed episodic memories promote to semantic store (like hippocampal-to-cortical transfer)
- Causal discovery β PC Algorithm runs on entity co-occurrences to discover causal relationships
- 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 downmemories_compressedβ how many were compressed (and to what level)memories_consolidatedβ how many promoted from episodic to semanticcausal_edges_discoveredβ new relationships foundreplay_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_statsbefore 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_memoriesto process the imported memories through the full pipeline
Related skills
PowerPoint Slide Decks
anthropics
Create, edit, read, and extract content from PowerPoint presentations.
Memory Search
davila7
Search conversation history and recall previous discussions, decisions, and context.
Slide Deck Creator
daymade
Generate professional PowerPoint presentations with structured content, charts, and speaker notes.
Competitive Ads Extractor
Prat011
Extract and analyze competitors' ads to discover messaging and creative strategies that work.