memory

memory is a command for coding agents from sifxprime/kodelyth-ecc. It costs 21 tokens per session (453 once invoked), scanned A, original, MIT.

A local memory command for recalling, saving, reviewing, listing, and removing knowledge about you and your projects.

In plain words
What is it for?
Use it to search remembered solutions, save a useful approach, review automatically suggested memories, inspect stored entries, or rebuild the search index.
Why use it?
It lets the agent reuse past solutions and preferences instead of starting from zero, while requiring confirmation before newly captured memories are stored.

Command

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 commands/sifxprime/kodelyth-ecc/memory
Clone the repo
git clone --depth 1 https://github.com/sifxprime/kodelyth-ecc

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 memory

README.md
[![agentmods](https://agentmods.dev/badge/commands/sifxprime/kodelyth-ecc/memory.svg)](https://agentmods.dev/commands/sifxprime/kodelyth-ecc/memory)
Your own site
<a href="https://agentmods.dev/commands/sifxprime/kodelyth-ecc/memory"><img src="https://agentmods.dev/badge/commands/sifxprime/kodelyth-ecc/memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 453 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.00021 $0.00453
Opus 5 $0.00010 $0.00227
Sonnet 5 $0.00004 $0.00091
Haiku 4.5 $0.00002 $0.00045

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

Security

Grade A, and why

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

commands/memory.md · 63 lines

What it actually says

/memory

Local self-learning memory. Everything stays on this machine.

Subcommands

/memory

Show storage stats and the 5 most recent memories for this project.

/memory recall <query>

Search memory for <query> using BM25 keyword + tag retrieval. Surfaces the top 5 relevant matches.

Example:

/memory recall stripe webhook signature

/memory remember "<title>"

Capture a new memory. The agent will:

  1. Ask for the approach (what worked) and any gotchas
  2. Auto-extract tags and language from the conversation
  3. Show you the proposed memory
  4. Store only after you confirm

/memory review-pending

Show the queue of candidate memories extracted automatically by the Stop hook from your last session. Confirm each one to store, or skip.

/memory forget <id>

Mark a memory deleted. It's a soft-delete (the row stays in the log marked deleted: true) so you can recover it by editing ~/.kodelythecc/memory/memories.jsonl.

/memory list

Show all stored memories — id, date, language, problem, tags.

/memory rebuild

Rebuild the BM25 index from memories.jsonl. Run this if search results look stale or if you've manually edited the log.

/memory inject [--query <text>]

Print the cache-friendly context block that the SessionStart hook would inject. Useful for debugging what your AI sees about you.

Implementation

This command delegates to:

node ~/.claude/scripts/memory/cli.js <subcommand> [args]

Or invoke the agent directly:

use kodelyth-memory

Storage location

~/.kodelythecc/memory/ (override with KODELYTH_MEMORY_DIR env var)

  • memories.jsonl — the source of truth
  • index.json — BM25 inverted index
  • pending-review.jsonl — Stop-hook candidates awaiting confirmation
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 · 63 lines · 21 tokens per session scan A b25d26817133

Subscribe to this mod's changes

memory is a command published in the GitHub repository sifxprime/kodelyth-ecc (11 stars, last pushed 3d ago), licensed MIT. It adds 21 tokens to every session and 453 once invoked, about $0.0001 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-09-03.