cortex-setup-project

A setup workflow for Cortex, a tool that stores and recalls useful project and coding-session context. It checks the memory store, repairs supported setup problems, builds project methodology, and can import earlier session history.

In plain words
What is it for?
Use it when starting Cortex on a project, importing past sessions, backfilling memories, or initializing project context.
Why use it?
It removes the manual work of preparing Cortex for a new or existing codebase. It also helps recover from common storage setup failures without requiring you to diagnose them yourself.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/cdeust/cortex/cortex-setup-project
Any agent
npx skills add cdeust/Cortex --skill cortex-setup-project
Clone the repo
git clone --depth 1 https://github.com/cdeust/Cortex

Made for: Claude Code, Codex.

Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,087 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00073 $0.01087
Opus 5 $0.00036 $0.00544
Sonnet 5 $0.00015 $0.00217
Haiku 4.5 $0.00007 $0.00109

Measured yesterday against content hash bd19a3d9a4af, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cortex-setup-project scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cortex-setup-project/SKILL.md · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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-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.

Read the full file on GitHub · 67 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 67 lines · 73 tokens per session scan A bd19a3d9a4af

Subscribe to this mod's changes

cortex-setup-project is a skill published in the GitHub repository cdeust/Cortex (71 stars, last pushed 3d ago), licensed MIT. It adds 73 tokens to every session and 1,087 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

food-order

Reorder previous Foodora orders, preview cart contents, and track delivery ETA/status with ordercli. Use when the user wants to reorder food, check delivery status, or browse recent Foodora order history. Never confirm an order without explicit user approval.

Bitterbot-AI/bitterbot-desktop · 53 tokens

opik-diagnose

Surface the Opik traces worth a developer's attention, ranked by signal — errors, failed tool calls, latency, regressions, and low online-eval scores — plus Diagnostics issues. Reads live/production traces via the SDK (searchtraces and agentinsights) and works with no MCP; uses the MCP issue entity when connected.…

comet-ml/opik-mcp · 147 tokens

genesis-development

This skill should be used when developing, debugging, refactoring, or building Genesis itself — tasks like "fix this in Genesis", "add a new MCP tool", "wire up the runtime", "Genesis won't start", "create a worktree", "debug the bridge", or "add a capability". Applies to any task modifying files under src/, .claude/…

WingedGuardian/GENesis-AGI · 115 tokens

client-scripts

Write ServiceNow client scripts (onLoad/onChange/onSubmit/onCellEdit) using gform, guser, GlideAjax, field visibility/mandatory toggles, and validation with debounced server calls.

serac-labs/serac · 45 tokens

agoragentic-transaction-assurance

Prepare, evaluate, and reconcile autonomous agent transactions without self-granting payment or owner authority. Use when an agent must bind principal authority, seller terms, payment evidence, execution, delivered outcome, and reconciliation; handle paid retries safely; or prepare an authority request for owner…

rhein1/agoragentic-integrations · 65 tokens

linkding

Manage bookmarks with Linkding. Use when the user asks to "save a bookmark", "add link", "search bookmarks", "list my bookmarks", "find saved links", "tag a bookmark", "archive bookmark", "check if URL is saved", "list tags", "create bundle", or mentions Linkding bookmark management.

jmagar/claude-homelab · 69 tokens