using-cortex-memory

using-cortex-memory is a skill for Claude Code, Codex from fernsdavid25/cortex-protocol. It costs 82 tokens per session (1,382 once invoked), scanned A, original, Apache-2.0.

Instructions for using Cortex, a shared memory service for AI agents. It explains how to save, find, update, and remove durable facts, preferences, and decisions.

In plain words
What is it for?
Recalling relevant past facts, storing lasting user preferences or project decisions, handling dates and relationships, and responding to requests to remember or forget something.
Why use it?
Important information can be lost between sessions or when different agents work with the same user. Shared memory keeps useful context available across those conversations.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Recalling relevant past facts, storing lasting user preferences or project decisions, handling dates and relationships, and responding to requests to remember or forget something.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fernsdavid25/cortex-protocol/using-cortex-memory
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.

Any agent
npx skills add fernsdavid25/cortex-protocol --skill using-cortex-memory
Clone the repo
git clone --depth 1 https://github.com/fernsdavid25/cortex-protocol

Made for: Claude Code, Codex.

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 using-cortex-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/fernsdavid25/cortex-protocol/using-cortex-memory/github.svg)](https://agentmods.dev/skills/fernsdavid25/cortex-protocol/using-cortex-memory)
Your own site
<a href="https://agentmods.dev/skills/fernsdavid25/cortex-protocol/using-cortex-memory"><img src="https://agentmods.dev/badge/skills/fernsdavid25/cortex-protocol/using-cortex-memory/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 using-cortex-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/fernsdavid25/cortex-protocol/using-cortex-memory"><img src="https://agentmods.dev/badge/skills/fernsdavid25/cortex-protocol/using-cortex-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,382 The whole file, excluding the scripts and references it only reads on demand.
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.00082 $0.01382
Opus 5.5 $0.00033 $0.00553
Sonnet 5.5 $0.00016 $0.00276
Haiku 4.5 $0.00008 $0.00138

Measured 1mo ago against content hash 9a11a8496124, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

using-cortex-memory 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 1mo 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.

skills/using-cortex-memory/SKILL.md · 94 lines

How it starts

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

Using Cortex Memory — get maximum value from the user's memory

Cortex is the USER'S portable, cross-agent memory — you are one of several AIs reading and writing the same store, with their consent. Write for a reader that isn't you; recall before you assume; the user's memory outlives this session and this agent.

How Cortex works (why the rules below exist)

  • Recall is hybrid search with NO LLM: dense embeddings + keyword search fused by rank. Your query text is the entire retrieval signal — names, distinctive words, and paraphrases of meaning all help; no model on the server interprets vague queries. Recall is one embedding call: fast and cheap, so use it liberally.
  • Enrichment happens at WRITE time: when you memorize, Cortex extracts entities and relationships into a knowledge graph, resolves dates onto an event timeline, deduplicates near-identical facts, and supersedes contradicted ones (old versions are kept, marked outdated — never silently lost). The quality of all of that depends on how you phrase what you store.
  • The tools are specialized reads over one store — routing correctly is most of this skill.

Routing — pick the right tool for the question

Situation Tool
Specific question ("what stack does she prefer?") recall — phrase with names + meaning
"Tell me everything about X" (person/project/place) recall_about — exhaustive entity dossier (relations + attached memories); top-k recall structurally can't enumerate
"What happened last month / between dates / when did…" recall_timeline — queries true event time, not storage time
"What's recently stored?" / orientation list_memories
User states something durable / corrects a fact memorize (supersession is automatic)
User asks to delete / data is wrong or sensitive forget — immediately, no debate

Writing memories that retrieve well (the craft)

  1. One fact per memorize. Bundled paragraphs dedupe badly, embed vaguely, and can't be individually superseded or forgotten. Split compound facts.
  2. Self-contained phrasing: resolve every pronoun and implicit reference — "David prefers pnpm over npm for all projects", never "he prefers it". Another agent with zero context is the reader.
  3. Name the entities explicitly (people, projects, places, orgs): names power the graph extraction, the entity dossiers, AND the keyword half of retrieval. "Swizel (David's girlfriend) likes apples" builds graph edges; "she likes apples" builds nothing.
  4. Anchor time absolutely: "on 2026-07-05" or "in March 2026". Relative phrases ("yesterday") are resolved against the write date, so they work — but absolute dates are safer and survive re-telling.
  5. Store the durable, skip the transient: preferences, profile facts, decisions and their reasons, relationships, recurring context, important events. Do NOT store: this-session task state, secrets/credentials/API keys (never — memory is not a vault), huge pasted content (store the fact plus where the content lives), or trivia the user wouldn't expect remembered.
  6. Updates are new writes: when a fact changes ("I switched to pnpm"), memorize the new state — Cortex supersedes the old version automatically. Use forget only for deletion requests and wrong/sensitive data, not for routine updates.
  7. Classify with kind — one of preference, fact, project, instruction, event, relationship (unset defaults to fact). It improves organization and the user's dashboard view; add tags when a natural grouping exists.

Read the full file on GitHub · 94 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. 1mo ago First seen · 94 lines · 82 tokens per session scan A 9a11a8496124

Subscribe to this mod's changes

using-cortex-memory is a skill published in the GitHub repository fernsdavid25/cortex-protocol (2 stars, last pushed 7d ago), licensed Apache-2.0. It adds 82 tokens to every session and 1,382 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

keymem

Use when the conversation reveals or needs durable knowledge about the user, the project, or an earlier decision — the recall/remember protocol for keymem's associative memory (keys, namespaces, corrections, and the passively surfaced hints).

donggyun112/keymem · 56 tokens

lesson

Store a lesson learned from the current conversation. Triggered by /lesson command. Use when Master signals that the recent conversation contains a pitfall, fix, or key insight that should be persisted to long-term memory.

cablate/memory-lancedb-mcp · 45 tokens

mnema

Use the Mnema MCP server to give the AI long-term, searchable memory. Use it whenever the user shares durable facts, preferences, decisions, or context worth recalling in future sessions. Mnema stores memories in a vector database and recalls them with semantic + hybrid search, with decay scoring and summarization so…

mienetic/mnema · 130 tokens

graphmind-memory

A skill connects an agent to GraphMind, a shared memory system for retaining project knowledge across sessions and people. It restores context, records work and decisions, and consolidates the session afterward.

kostya-pakhomov/graphmind · 93 tokens

memory-triage

Persistent long-term memory protocol powered by mem0. Evaluate conversations for durable facts worth storing via memoryadd. Handles identity, preferences, decisions, configurations, rules, projects, and relationships. Loaded by the openclaw-mem0 plugin when skills mode is active.

mem0ai/mem0 · 58 tokens

mem0

Mem0 Platform SDK for adding persistent memory to AI applications. TRIGGER when: user mentions "mem0", "MemoryClient", "memory layer", "remember user preferences", "persistent context", "personalization", or needs to add long-term memory to chatbots, agents, or AI apps. Covers Python SDK (mem0ai), TypeScript SDK…

mem0ai/mem0 · 181 tokens