/cortex-setup-project
Bootstrap Cortex for a new project or import existing session history. Use when the user says 'set up Cortex', 'seed this project', 'import my history', 'backfill memories', 'bootstrap memory', 'initialize Cortex for this project', or when starting to use Cortex on an existing
$ npx -y skills add cdeust/Cortex --skill cortex-setup-project --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-setup-project
Context preview
The summary Claude sees to decide when to auto-load this skill.
Bootstrap Cortex for a new project or import existing session history. Use when the user says 'set up Cortex', 'seed this project', 'import my history', 'backfill memories', 'bootstrap memory', 'initialize Cortex for this project', or when starting to use Cortex on an existing
SKILL.md
cortex-setup-project.SKILL.mdname: cortex-setup-project
description: "Bootstrap Cortex for a new project or import existing session history. Use when the user says 'set up Cortex', 'seed this project', 'import my history', 'backfill memories', 'bootstrap memory', 'initialize Cortex for this project', or when starting to use Cortex on an existing codebase that already has Claude Code conversation history."
Setup Project — Fully Autonomous Bootstrap
Execute all four phases sequentially without asking the user any questions. If a phase fails, attempt automatic recovery before reporting the error. Never ask the user to run commands manually or choose between options.
Phase 1: Infrastructure Verification
1. Call `cortex:memory_stats({})` to verify store connectivity. If it succeeds, the store is healthy — this covers **both** backends (the zero-config SQLite default needs no PostgreSQL, so do NOT run `pg_isready` or any PostgreSQL setup when this passes). Proceed to Phase 2. 2. Only if `memory_stats` fails: call `cortex:check_setup({})` (backend-aware diagnostics) to identify the failure.
- SQLite backend reported: fix per the check output (usually `~/.claude/methodology` permissions or a corrupt `memory.db`); do NOT install PostgreSQL.
- PostgreSQL backend reported: run `pg_isready` via bash, then `bash "${CLAUDE_PLUGIN_ROOT}/scripts/setup.sh"` automatically. Do not ask for permission. After setup.sh completes, call `cortex:memory_stats({})` again to verify.
- If it still fails, report the error output and **stop**. Do not continue to later phases.
Phase 2: Build Methodology Profiles
1. Call `cortex:rebuild_profiles({"force": true})` to scan all session history and build cognitive profiles per domain. 2. This creates the domain hubs that memories, entities, and discussions link to. It must run before seeding. 3. Record the domain count for the final summary.
Phase 3: Codebase Seeding
1. Call `cortex:seed_project({"directory": "<cwd>"})` where `<cwd>` is the current working directory. 2. Record the count of discoveries for the final summary.
Phase 3b: Pipeline Codebase Analysis (Optional)
The ai-automatised-pipeline MCP server provides structured codebase analysis (symbol graph, processes, communities, cross-file impact). It is optional — Cortex core memory/recall works without it. Enable only if the user asks for "deeper code understanding", "symbol-level memory", or the codebase is large (>5k files) where substring-based hooks underperform.
1. Detection: attempt `cortex:ingest_codebase({"project_path": "<cwd>"})`. If it succeeds, record the counts (wiki pages, memory entities, KG edges) for the summary and skip to Phase 4. 2. If `ingest_codebase` fails with `McpConnectionError` (pipeline not installed/configured):
- Check if the sibling checkout exists at `../anthropic/ai-automatised-pipeline/Cargo.toml` (or equivalent). If so, run `bash -c 'cd ../anthropic/ai-automatised-pipeline && cargo install --path . 2>&1 | tail -20'` (accepts ~1-2 min compile) and re-run the ingest.
- If the source checkout is missing or cargo is unavailable, **skip Phase 3b silently** and proceed to Phase 4. Do NOT block setup on this.
3. The pipeline's auto-wire happens on every SessionStart via `pipeline_discovery`, so once the binary exists on PATH (or sibling source is built), future sessions pick it up automatically. No manual mcp-connections.json editing needed.
Phase 4: History Import
1. Call `cortex:backfill_memories({"dry_run": true, "max_files": 500})` to preview available session files. 2. If files are available, call `cortex:backfill_memories({"max_files": 500, "min_importance": 0.35})` to import. 3. Record the count of imported memories for the final summary.
Phase 5: Consolidation and Verification
1. Call `cortex:consolidate({})` to run decay, compression, CLS, and causal discovery on all memories. 2. Call `cortex:memory_stats({})` to get the final system state. 3. Call `cortex:detect_gaps({})` to identify knowledge gaps.
Final Summary
After all phases complete, print a single summary block:
Cortex Setup Complete
---------------------
Domains: <count from rebuild_profiles>
Memories stored: <total from memory_stats>
Entities: <count from memory_stats>
Relationships: <count from memory_stats>
Pipeline: <"active — N wiki pages, M memories" | "skipped (not installed)">
Gaps found: <count and brief description from detect_gaps>
Do not print intermediate status updates between phases beyond what the tool calls themselves return. One summary at the end.
Read more
name: cortex-setup-project description: "Bootstrap Cortex for a new project or import existing session history. Use when the user says 'set up Cortex', 'seed this project', 'import my history', 'backfill memories', 'bootstrap memory', 'initialize Cortex for this project', or when starting to use Cortex on an existing codebase that already has Claude Code conversation history."
Setup Project — Fully Autonomous Bootstrap
Execute all four phases sequentially without asking the user any questions. If a phase fails, attempt automatic recovery before reporting the error. Never ask the user to run commands manually or choose between options.
Phase 1: Infrastructure Verification
1. Call `cortex:memory_stats({})` to verify store connectivity. If it succeeds, the store is healthy — this covers **both** backends (the zero-config SQLite default needs no PostgreSQL, so do NOT run `pg_isready` or any PostgreSQL setup when this passes). Proceed to Phase 2. 2. Only if `memory_stats` fails: call `cortex:check_setup({})` (backend-aware diagnostics) to identify the failure.
- SQLite backend reported: fix per the check output (usually `~/.claude/methodology` permissions or a corrupt `memory.db`); do NOT install PostgreSQL.
- PostgreSQL backend reported: run `pg_isready` via bash, then `bash "${CLAUDE_PLUGIN_ROOT}/scripts/setup.sh"` automatically. Do not ask for permission. After setup.sh completes, call `cortex:memory_stats({})` again to verify.
- If it still fails, report the error output and **stop**. Do not continue to later phases.
Phase 2: Build Methodology Profiles
1. Call `cortex:rebuild_profiles({"force": true})` to scan all session history and build cognitive profiles per domain. 2. This creates the domain hubs that memories, entities, and discussions link to. It must run before seeding. 3. Record the domain count for the final summary.
Phase 3: Codebase Seeding
1. Call `cortex:seed_project({"directory": "<cwd>"})` where `<cwd>` is the current working directory. 2. Record the count of discoveries for the final summary.
Phase 3b: Pipeline Codebase Analysis (Optional)
The ai-automatised-pipeline MCP server provides structured codebase analysis (symbol graph, processes, communities, cross-file impact). It is optional — Cortex core memory/recall works without it. Enable only if the user asks for "deeper code understanding", "symbol-level memory", or the codebase is large (>5k files) where substring-based hooks underperform.
1. Detection: attempt `cortex:ingest_codebase({"project_path": "<cwd>"})`. If it succeeds, record the counts (wiki pages, memory entities, KG edges) for the summary and skip to Phase 4. 2. If `ingest_codebase` fails with `McpConnectionError` (pipeline not installed/configured):
- Check if the sibling checkout exists at `../anthropic/ai-automatised-pipeline/Cargo.toml` (or equivalent). If so, run `bash -c 'cd ../anthropic/ai-automatised-pipeline && cargo install --path . 2>&1 | tail -20'` (accepts ~1-2 min compile) and re-run the ingest.
- If the source checkout is missing or cargo is unavailable, **skip Phase 3b silently** and proceed to Phase 4. Do NOT block setup on this.
3. The pipeline's auto-wire happens on every SessionStart via `pipeline_discovery`, so once the binary exists on PATH (or sibling source is built), future sessions pick it up automatically. No manual mcp-connections.json editing needed.
Phase 4: History Import
1. Call `cortex:backfill_memories({"dry_run": true, "max_files": 500})` to preview available session files. 2. If files are available, call `cortex:backfill_memories({"max_files": 500, "min_importance": 0.35})` to import. 3. Record the count of imported memories for the final summary.
Phase 5: Consolidation and Verification
1. Call `cortex:consolidate({})` to run decay, compression, CLS, and causal discovery on all memories. 2. Call `cortex:memory_stats({})` to get the final system state. 3. Call `cortex:detect_gaps({})` to identify knowledge gaps.
Final Summary
After all phases complete, print a single summary block:
Cortex Setup Complete --------------------- Domains: <count from rebuild_profiles> Memories stored: <total from memory_stats> Entities: <count from memory_stats> Relationships: <count from memory_stats> Pipeline: <"active — N wiki pages, M memories" | "skipped (not installed)"> Gaps found: <count and brief description from detect_gaps>
Do not print intermediate status updates between phases beyond what the tool calls themselves return. One summary at the end.
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-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
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

