cortex: Cursor rule for Cursor

.cursorrules

cursorrules is a cursor rule for Cursor from MikeSquared-Agency/cortex. It costs 777 tokens per session, scanned A, original, MIT.

Project guidance for Cortex, a Rust-based memory engine for AI agents. It describes an embedded database, graph and vector search, network APIs, client libraries, and commands for building and testing the workspace.

In plain words
What is it for?
Building the Cortex server, running all workspace tests, testing without the optional Warren adapter, running the Rust linter, and initialising Cortex configuration.
Why use it?
It gives the coding agent a map of the repository and the commands needed to check changes. This makes work across its Rust crates and language libraries more predictable.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions CLAUDE.md.

This is MikeSquared-Agency/cortex's own configuration. It tells Cursor how to work on cortex 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 configures →

Reuse

Borrowing it

Nothing to install: this file belongs to MikeSquared-Agency/cortex. 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/MikeSquared-Agency/cortex/main/.cursorrules
Clone the repo
git clone --depth 1 https://github.com/MikeSquared-Agency/cortex

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/mikesquared-agency/cortex/cursorrules/github.svg)](https://agentmods.dev/rules/mikesquared-agency/cortex/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/mikesquared-agency/cortex/cursorrules"><img src="https://agentmods.dev/badge/rules/mikesquared-agency/cortex/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/mikesquared-agency/cortex/cursorrules"><img src="https://agentmods.dev/badge/rules/mikesquared-agency/cortex/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 777 This file is loaded in full into every session.
When invoked 777 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.00777 $0.00777
Opus 5.5 $0.00311 $0.00311
Sonnet 5.5 $0.00155 $0.00155
Haiku 4.5 $0.00078 $0.00078

Measured 2mo ago against content hash 145806383846, 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 2mo 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.

.cursorrules · 88 lines

How it starts

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

CLAUDE.md — Cortex Agent Guide

What is this?

Cortex is an embedded graph memory engine for AI agents. Rust, redb (embedded DB), gRPC + HTTP APIs, vector search (HNSW), auto-linking.

Repo structure

crates/
  cortex-core/     — Storage, graph, vector, auto-linker, types. The library.
  cortex-server/   — gRPC/HTTP server, CLI, config. The binary.
  cortex-client/   — Rust gRPC client crate.
  cortex-proto/    — Protobuf definitions + generated code.
  warren-adapter/  — Optional Warren integration (feature-gated).
sdks/
  typescript/      — @cortex/client npm package
  python/          — cortex-memory PyPI package
  go/              — Go client module
specs/             — Design specs (tagged IMPLEMENTED/DEFERRED)
docs/              — User-facing documentation
examples/          — Integration examples (LangChain, CrewAI, etc.)

Build & test

cargo test --workspace                          # All 176 tests
cargo test --workspace --no-default-features    # Without warren adapter
cargo build -p cortex-server --release          # Release binary
cargo clippy --workspace                        # Lint

Run

cortex init                    # Create cortex.toml
cortex serve                   # Start server (gRPC :9090, HTTP :9091)
cortex node create --kind fact --title "..."
cortex search "query"
cortex briefing <agent-id>
cortex shell                   # Interactive REPL

Key types

  • NodeKind / Relation — validated string newtypes (not enums)
  • Cortex::open(path) — library mode, no server needed
  • Storage trait — RedbStorage implements it
  • IngestAdapter trait — pluggable event sources
  • Config: cortex.toml with #[serde(default)] on all structs

Architecture decisions

  • redb for storage (embedded, ACID, zero-copy mmap)
  • HNSW for vector search (instant-distance crate)
  • gRPC (tonic) for production API, HTTP (axum) for debug/viz
  • warren-adapter is optional (--features warren), cortex-core has zero network deps
  • Auto-linker runs background loop: similarity rules → edges, decay → prune, dedup → merge

Read the full file on GitHub · 88 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. 2mo ago First seen · 88 lines · 777 tokens per session scan A 145806383846

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository MikeSquared-Agency/cortex (11 stars, last pushed 3mo ago), licensed MIT. It adds 777 tokens to every session, about $0.0031 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.

Related

cursorrules compared with cursor rules from other repositories

cursorrules next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cursorrulesMikeSquared-Agency/cortexCursor rule113mo agoMITA777Cursor
mongodb-memory-server-setupprisma/ormCursor rule48kyesterdayApache-2.0A28Cursor
token-optimizationprest/prestCursor rule4.6k3d agoMITA876Cursor
memorymatrixorigin/memoriaCursor rule6232d agoApache-2.0A2,700Cursor
memory-branching-patternsmatrixorigin/memoriaCursor rule6232d agoApache-2.0A18Cursor
cursor-rulesMatthewSherlin/mushroomdbCursor rule5todaynoneA1,337Cursor
common_memory_bankshalomeir/common-memory-bankCursor rule307mo agoUnlicenseA1,801Cursor