cortex-hub: Cursor rule for Cursor

.cursorrules

cursorrules is a cursor rule for Cursor from lktiep/cortex-hub. It costs 486 tokens per session, scanned A, original, MIT.

A set of Cursor editor rules for working with the Cortex Hub project, including required session setup, project searches, error handling, verification, and session records.

In plain words
What is it for?
Use it to start and end Cortex Hub sessions, search project context, investigate errors, run build and code-quality checks, and store session knowledge.
Why use it?
It gives an agent a consistent working procedure and preserves useful context between sessions. It also requires checks before finishing work.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

This is lktiep/cortex-hub's own configuration. It tells Cursor how to work on cortex-hub itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cortex-hub configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lktiep/cortex-hub. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lktiep/cortex-hub/master/.cursorrules
Clone the repo
git clone --depth 1 https://github.com/lktiep/cortex-hub

Made for: Cursor.

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 cursorrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/lktiep/cortex-hub/cursorrules/github.svg)](https://agentmods.dev/rules/lktiep/cortex-hub/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/lktiep/cortex-hub/cursorrules"><img src="https://agentmods.dev/badge/rules/lktiep/cortex-hub/cursorrules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cursorrules

Your own site · 80×15
<a href="https://agentmods.dev/rules/lktiep/cortex-hub/cursorrules"><img src="https://agentmods.dev/badge/rules/lktiep/cortex-hub/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 486 This file is loaded in full into every session.
When invoked 486 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00486 $0.00486
Opus 5.5 $0.00194 $0.00194
Sonnet 5.5 $0.00097 $0.00097
Haiku 4.5 $0.00049 $0.00049

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

Security

Grade A, and why

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

.cursorrules · 37 lines

What it actually says

Cortex Hub — Auto MCP (MANDATORY)

At the START of every conversation:

  1. Call cortex_session_start with repo: "https://github.com/lktiep/cortex-hub.git", agentId: "cursor", mode: "development"
  2. cortex_knowledge_search + cortex_memory_search once — recall what the last session decided

Finding code — start from what you know, not from a fixed ladder

You already know Start with
A symbol name cortex_code_context(name) — exact graph lookup, plus callers/callees/imports in one call
Only the behaviour cortex_code_search(query, limit: 10) — ranked hybrid search, one call
An exact literal (env var, config key, error string) rg / grep — this is not a ranking problem
A relationship across files cortex_cypher

Search once, read all ten. On the cortex-hub index the target file is in the top 10 for 15/15 queries but at rank 1 for only 8/15 — so scan the whole result set, and never re-run a reworded version of the same query. Ask a different question or switch tool instead.

cortex_code_impact before editing something exported or shared. Knowledge and memory are for errors and decisions, not for locating code.

Across repos: omit repo: to search every repo in the organization of this project (the client + server + tools of one product). Projects are isolated per organization, so it never reaches another one. Running sessions in two organizations with one API key? Pass org:.

Error Protocol

  1. cortex_knowledge_search first — someone may have solved this
  2. cortex_memory_search — you may have seen it before
  3. Fix the error
  4. Non-obvious fixes: cortex_knowledge_store

Quality Gates

Run verify commands from .cortex/project-profile.json, then cortex_quality_report. After a push: cortex_code_reindex. End session: cortex_session_end with sessionId and summary.

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 Changed · -1 lines · -19 tokens per session a9aeff8135a4
  2. 24d ago Changed · +15 lines · +257 tokens per session a652c95e50ff
  3. 1mo ago First seen · 23 lines · 248 tokens per session scan A 4881cd7f4736

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository lktiep/cortex-hub (93 stars, last pushed today), licensed MIT. It adds 486 tokens to every session, about $0.0019 per session on Opus 5.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.