cortex-hub CLAUDE.md

cortex-hub CLAUDE.md is an instructions file for coding agents from lktiep/cortex-hub. It costs 778 tokens per session, scanned A, original, MIT.

A maintainer guide for Cortex Hub, a software project with a shared code search and project-memory system.

In plain words
What is it for?
Use it when developing Cortex Hub, especially to start sessions, search or understand code, assess the impact of changes, and check known solutions.
Why use it?
It ensures each work session starts with the project's saved context and assigned tasks. It also defines the project's languages, frameworks, naming rules, and preferred ways to inspect code.

Instructions file

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 instructions/lktiep/cortex-hub/claude-md
Clone the repo
git clone --depth 1 https://github.com/lktiep/cortex-hub

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cortex-hub CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lktiep/cortex-hub/claude-md.svg)](https://agentmods.dev/instructions/lktiep/cortex-hub/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/lktiep/cortex-hub/claude-md"><img src="https://agentmods.dev/badge/instructions/lktiep/cortex-hub/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 778 This file is loaded in full into every session.
When invoked 778 The same file — it is already loaded in full.
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.00778 $0.00778
Opus 5 $0.00389 $0.00389
Sonnet 5 $0.00156 $0.00156
Haiku 4.5 $0.00078 $0.00078

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

Security

Grade A, and why

cortex-hub CLAUDE.md 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 5d ago.

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.

CLAUDE.md · 73 lines

How it starts

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

Cortex Hub — Claude Code Instructions

Quick Start (MANDATORY)

Run /cs at the start of every conversation. This initializes the session, recalls context from previous sessions, and checks for conflicts. Editing is blocked until this completes.

If /cs is unavailable, run manually:

  1. cortex_session_start(repo: "cortex-hub", mode: "development", agentId: "claude-code")
  2. cortex_knowledge_search(query: "session summary progress next session")
  3. cortex_memory_search(query: "session context decisions lessons")
  4. cortex_task_pickup() — check for assigned tasks

Tech Stack

Monorepo: pnpm + Turborepo. TypeScript strict. Hono API. Next.js 15 frontend. SQLite + Qdrant. Docker Compose.

Code Conventions

camelCase vars/functions, PascalCase types. @cortex/* path aliases. No any without comment.

How to Use Cortex Tools

Cortex tools replace grep/find with smarter alternatives. Use them naturally as part of your workflow:

Finding code

Use cortex_code_search instead of grep. It understands AST structure and returns focused results (~90% fewer tokens than raw grep). Fall back to grep only if it returns nothing.

Understanding code

  • cortex_code_context(name: "functionName") — see who calls it, what it calls, what imports it
  • cortex_code_impact(target: "symbolName") — check blast radius before editing
  • cortex_cypher(query: "MATCH ...") — advanced graph queries when you need exact relationships

Before editing shared files

Call cortex_changes(agentId: "claude-code", projectId: "<from session>") to check if another agent touched the same files.

When you hit an error

  1. cortex_knowledge_search(query: "<error message>") — someone may have solved this already
  2. cortex_memory_search(query: "<error context>") — you may have seen this before
  3. Fix the error
  4. If the fix was non-obvious: cortex_knowledge_store(title: "<fix>", content: "<steps>") — save it so nobody debugs this again

Sharing what you learn

  • cortex_memory_store(content: "...") — personal recall for future sessions (decisions, gotchas, context)
  • cortex_knowledge_store(title: "...", content: "...") — team-wide knowledge (bug fixes, patterns, architecture decisions)

Read the full file on GitHub · 73 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. 5d ago First seen · 73 lines · 778 tokens per session scan A e29a4e966970

Subscribe to this mod's changes

cortex-hub CLAUDE.md is an instructions file published in the GitHub repository lktiep/cortex-hub (58 stars, last pushed 1mo ago), licensed MIT. It adds 778 tokens to every session, about $0.0039 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.