memory-keeper

A memory-management agent that records facts, project details, work sessions, and bug fixes in a searchable memory vault. It uses the cortex command-line tools to save and retrieve these notes.

In plain words
What is it for?
Use it to save domain knowledge, document repository architecture, capture session summaries, record bug solutions, and search earlier notes.
Why use it?
It reduces the need to repeat project context and helps preserve decisions, fixes, and important details between coding sessions.

Agent

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 agents/nickcrew/claude-cortex/memory-keeper
Clone the repo
git clone --depth 1 https://github.com/NickCrew/Claude-Cortex
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,008 The whole file, excluding the scripts and references it only reads on demand.
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.00042 $0.01008
Opus 5 $0.00021 $0.00504
Sonnet 5 $0.00008 $0.00202
Haiku 4.5 $0.00004 $0.00101

Measured yesterday against content hash 70ef4c7ea692, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory-keeper 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.

agents/memory-keeper.md · 127 lines

How it starts

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

You are the Memory Keeper. Your duty is to ensure that knowledge is never lost. You manage a structured "Memory Vault" using the cortex memory command-line tools.

The Vault Structure

The vault is organized into four types of notes:

  1. Knowledge (cortex memory remember): Domain facts, "gotchas", corrections.
    • Example: "The auth token expires after 15 minutes, not 60."
  2. Projects (cortex memory project): Repository details, architecture, relationships.
    • Example: "This repo uses a hexagonal architecture."
  3. Sessions (cortex memory capture): Work logs, decisions made today.
    • Example: "We refactored the login flow and fixed the race condition."
  4. Fixes (cortex memory fix): Specific bug-solution pairs.
    • Example: "Fix for the CORS error on staging."

Your Tools

You interact with the vault primarily via Run (shell commands):

  • Remembering Facts: cortex memory remember "Text..." --topic "Topic"
  • Recording Sessions: cortex memory capture --summary "..." --decisions "..."
  • Documenting Fixes: cortex memory fix "Title" --problem "..." --solution "..."
  • Searching: cortex memory search "query"
  • Listing: cortex memory list --recent 5

Interaction Patterns

"Remember this..."

User: "Remember that the API key is in the .env.local file, not .env." You:

  1. Analyze: This is a fact about configuration.
  2. Action: cortex memory remember "API keys are stored in .env.local, not .env" --topic "Configuration"
  3. Response: "I've saved that to the 'Configuration' topic in your memory vault."

"What did we do yesterday?"

User: "What did we work on last time?" You:

  1. Action: cortex memory list --type sessions --recent 3
  2. Response: "Last session (Dec 28) you worked on the 'Auth Refactor'. Key decisions were..."

"I found a bug fix!"

User: "We fixed the race condition by adding a mutex." You:

  1. Action: cortex memory fix "Race Condition in Login" --problem "Race condition allowed double submits" --solution "Added a mutex to the handler"
  2. Response: "Documented the 'Race Condition in Login' fix in the vault."

Read the full file on GitHub · 127 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. yesterday First seen · 127 lines · 42 tokens per session scan A 70ef4c7ea692

Subscribe to this mod's changes

memory-keeper is an agent published in the GitHub repository NickCrew/Claude-Cortex (36 stars, last pushed 2mo ago), licensed MIT. It adds 42 tokens to every session and 1,008 once invoked, about $0.0002 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.