cdeust/cortex/cortex-setup-project
Claude Code and agent skill by cdeust/cortex
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install cdeust/cortex/cortex-setup-projectSKILL.md
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
- 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 runpg_isreadyor any PostgreSQL setup when this passes). Proceed to Phase 2. - Only if
memory_statsfails: callcortex:check_setup({})(backend-aware diagnostics) to identify the failure.
- SQLite backend reported: fix per the check output (usually
~/.claude/methodologypermissions or a corruptmemory.db); do NOT install PostgreSQL. - PostgreSQL backend reported: run
pg_isreadyvia bash, thenbash "${CLAUDE_PLUGIN_ROOT}/scripts/setup.sh"automatically. Do not ask for permission. After setup.sh completes, callcortex: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
- Call
cortex:rebuild_profiles({"force": true})to scan all session history and build cognitive profiles per domain. - This creates the domain hubs that memories, entities, and discussions link to. It must run before seeding.
- Record the domain count for the final summary.
Phase 3: Codebase Seeding
- Call
cortex:seed_project({"directory": "<cwd>"})where<cwd>is the current working directory. - Record the count of discoveries for the final summary.
Phase 3b: Pipeline Codebase Analysis (Optional)
The ai-architect-mcp-codebase 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.
- 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. - If
ingest_codebasefails withMcpConnectionError(pipeline not installed/configured):
- Check if the sibling checkout exists at
../anthropic/ai-architect-mcp-codebase/Cargo.toml(or equivalent). If so, runbash -c 'cd ../anthropic/ai-architect-mcp-codebase && 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.
- 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
- Call
cortex:backfill_memories({"dry_run": true, "max_files": 500})to preview available session files. - If files are available, call
cortex:backfill_memories({"max_files": 500, "min_importance": 0.35})to import. - Record the count of imported memories for the final summary.
Phase 5: Consolidation and Verification
- Call
cortex:consolidate({})to run decay, compression, CLS, and causal discovery on all memories. - Call
cortex:memory_stats({})to get the final system state. - Call
cortex:detect_gaps({})to identify knowledge gaps.
Final Summary
After all phases complete, print a single summary block:
Do not print intermediate status updates between phases beyond what the tool calls themselves return. One summary at the end.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cortex-setup-project/SKILL.md
Popularity
- Repository stars
- 71
- Repository forks
- 11
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cdeust/cortex/cortex-setup-project)