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.
npx skills add fernsdavid25/cortex-protocol --skill using-cortex-memorygit clone --depth 1 https://github.com/fernsdavid25/cortex-protocolWrote 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.
[](https://agentmods.dev/skills/fernsdavid25/cortex-protocol/using-cortex-memory)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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)
- One fact per memorize. Bundled paragraphs dedupe badly, embed vaguely, and can't be individually superseded or forgotten. Split compound facts.
- 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.
- 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.
- 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.
- 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.
- Updates are new writes: when a fact changes ("I switched to pnpm"), memorize the new
state — Cortex supersedes the old version automatically. Use
forgetonly for deletion requests and wrong/sensitive data, not for routine updates. - Classify with
kind— one ofpreference,fact,project,instruction,event,relationship(unset defaults tofact). It improves organization and the user's dashboard view; addtagswhen a natural grouping exists.
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.
- 1mo ago First seen · 94 lines · 82 tokens per session scan A 9a11a8496124
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.
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).
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.
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…
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.
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.
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…