cortex-automate
Set up automation — prospective memory triggers, neuro-symbolic rules, and CLAUDE.md sync. Use when the user says 'remind me…
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
Claude Code
$ npx -y skills add cdeust/Cortex --skill cortex-consolidate --agent claude-code
Codex
$ npx skills add cdeust/Cortex --skill cortex-consolidate -a codex -y
Cursor
$ npx skills add cdeust/Cortex --skill cortex-consolidate -a cursor -y
Gemini CLI
$ npx skills add cdeust/Cortex --skill cortex-consolidate -a gemini-cli -y
GitHub Copilot
$ npx skills add cdeust/Cortex --skill cortex-consolidate -a github-copilot -y
OpenCode
$ npx skills add cdeust/Cortex --skill cortex-consolidate -a opencode -y
Windsurf
$ npx skills add cdeust/Cortex --skill cortex-consolidate -a windsurf -y
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, maintenance, cleanup, compress, decay, merge, evolve, sleep, replay, consolidation, memory health, prune, clean up, optimize memories, reduce noise
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.
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
The response includes:
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"
})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.
Set up automation — prospective memory triggers, neuro-symbolic rules, and CLAUDE.md sync. Use when the user says 'remind me…
Debug and fix memory system issues — validate memories, rate quality, manage protection, forget bad memories, and restore from…
Explore the memory system's state, find gaps in knowledge, assess coverage, and get diagnostic information. Use when the user…
Import memories from other AI memory systems into Cortex. Supports claude-mem (SQLite), Claude Desktop sessions, ChatGPT web…
Navigate the knowledge graph — trace entity relationships, explore causal chains, drill into memory clusters, and traverse…
View and manage your cognitive profile — how you think, work patterns, blind spots, and cross-domain connections. Use when the…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.