cortex-setup-project skill
✓ VerifiedBootstrap Cortex for new projects or import existing session history to build cognitive profiles and seed codebase memories.
- GitHub stars
- 76
- Files
- 1
- Last commit
- Nov 12, 2026
- License
- MIT
- Allowed tools
- —
What does the cortex-setup-project skill do?
cortex-setup-project is an agent skill. Bootstrap Cortex for new projects or import existing session history to build cognitive profiles and seed codebase memories.
Summary generated from the skill's SKILL.md.
About the cortex-setup-project skill
Initializing cognitive profiles and seeding codebase memories for new projects is what this skill enables. Developers use it to bootstrap the Cortex system by either starting from scratch or importing existing session history to build a foundation of knowledge. The process is fully autonomous, moving through infrastructure verification, profile building, and codebase seeding without requiring manual command execution or user decisions.
An agent should load this skill when a user requests to set up Cortex, seed a project, or backfill memories. It relies on tools like cortex:memory_stats for connectivity checks and cortex:rebuild_profiles to create domain hubs. If the ai-architect-mcp-codebase server is available, the skill can perform deeper symbol-level analysis to ingest codebase structures. The process concludes by consolidating memories through decay and compression, providing a final summary of domains, entities, and knowledge gaps.
What an agent can do with it
- 1Bootstrap a new project memoryInitialize the Cortex environment for a fresh codebase to begin building domain-specific cognitive profiles.
- 2Import previous conversation historyBackfill the memory store with up to 500 existing session files to maintain continuity in project knowledge.
- 3Perform deep codebase analysisEnable symbol-level memory and structured analysis for large codebases by integrating the ai-architect-mcp-codebase server.
- 4Verify and repair memory infrastructureAutomatically diagnose and fix connectivity issues with the SQLite or PostgreSQL memory backends.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the cortex-setup-project skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the cortex-setup-project skill in Plugin
/plugin marketplace add cdeust/Cortex /plugin install hypermnesia-mcp@cortex-plugins
Install the cortex-setup-project skill in Claude Code
~/.claude/skills/cortex-setup-project/SKILL.md
$ npx degit cdeust/Cortex/skills/cortex-setup-project ~/.claude/skills/cortex-setup-projectInstall the cortex-setup-project skill in Claude Code (project)
.claude/skills/cortex-setup-project/SKILL.md
$ npx degit cdeust/Cortex/skills/cortex-setup-project .claude/skills/cortex-setup-projectInstall the cortex-setup-project skill in Codex
~/.agents/skills/cortex-setup-project/SKILL.md
$ npx degit cdeust/Cortex/skills/cortex-setup-project ~/.agents/skills/cortex-setup-projectInstall the cortex-setup-project skill in Gemini CLI
~/.gemini/skills/cortex-setup-project/SKILL.md
$ npx degit cdeust/Cortex/skills/cortex-setup-project ~/.gemini/skills/cortex-setup-projectInstall the cortex-setup-project skill in Claude.ai
npx degit cdeust/Cortex/skills/cortex-setup-project cortex-setup-project && zip -r cortex-setup-project.zip cortex-setup-project # claude.ai → Customize → Skills → + → Create skill → Upload a skill → cortex-setup-project.zip
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work
- Source repository linked and reachablecdeust/cortex/skills/cortex-setup-project is public and reachablegithub.com/cdeust/cortex/tree/HEAD/skills/cortex-setup-proje ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit 2026-11-12github.com/cdeust/cortex/commits ↗Pass
- No download-and-run or credential theft in scriptsNo scripts in the skill folderPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/cdeust/cortex/blob/HEAD/skills/cortex-setup-proje ↗Pass
- Pre-approved tools are scopedNo pre-approved tools; the agent asks before using onegithub.com/cdeust/cortex/blob/HEAD/skills/cortex-setup-proje ↗Pass
- SKILL.md follows the Agent Skills formatValid name and description; says when to use it; 67 linesgithub.com/cdeust/cortex/blob/HEAD/skills/cortex-setup-proje ↗Pass
SKILL.md
View on GitHubSetup 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.
- SQLite backend reported: fix per the check output (usually
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.
- Check if the sibling checkout exists at
- 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:
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.
Files in this skill
1cortex-setup-project skill questions
How do I install the cortex-setup-project skill in Claude Code?
Run npx degit cdeust/Cortex/skills/cortex-setup-project ~/.claude/skills/cortex-setup-project. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the cortex-setup-project skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
What happens if the database connection fails during setup?
The system attempts automatic recovery by running backend-aware diagnostics. For SQLite, it checks permissions or corruption; for PostgreSQL, it attempts to run a setup script via bash.
Can I get a deeper understanding of my codebase during setup?
Yes, you can enable optional pipeline codebase analysis for symbol-level memory and structured analysis if requested or if the codebase is large.
Does the setup process require manual user intervention?
No, the setup is designed to be fully autonomous, executing all phases sequentially without asking questions or requiring manual command execution.