memory-evolve

memory-evolve is a command for Claude Code from sifxprime/kodelyth-ecc. It costs 34 tokens per session (905 once invoked), scanned A, original, MIT.

A command for proposing improvements to an agent's local memory system based on repeated reuse and missed-memory signals. It creates drafts for review instead of applying changes automatically.

In plain words
What is it for?
Use it to inspect memory statistics, turn patterns into proposals, review proposed content, and accept or reject drafts.
Why use it?
It helps identify knowledge that should be added or better routed without silently changing your saved skills or memory rules.

Command for Claude Code

Written for Claude Code: UserPromptSubmit hook event.

Good fit Use it to inspect memory statistics, turn patterns into proposals, review proposed content, and accept or reject drafts.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/sifxprime/kodelyth-ecc/memory-evolve
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.

Clone the repo
git clone --depth 1 https://github.com/sifxprime/kodelyth-ecc

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/sifxprime/kodelyth-ecc/memory-evolve/github.svg)](https://agentmods.dev/commands/sifxprime/kodelyth-ecc/memory-evolve)
Your own site
<a href="https://agentmods.dev/commands/sifxprime/kodelyth-ecc/memory-evolve"><img src="https://agentmods.dev/badge/commands/sifxprime/kodelyth-ecc/memory-evolve/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 memory-evolve

Your own site · 80×15
<a href="https://agentmods.dev/commands/sifxprime/kodelyth-ecc/memory-evolve"><img src="https://agentmods.dev/badge/commands/sifxprime/kodelyth-ecc/memory-evolve.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 905 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.00034 $0.00905
Opus 5 $0.00017 $0.00452
Sonnet 5 $0.00007 $0.00181
Haiku 4.5 $0.00003 $0.00090

Measured 5d ago against content hash 8336473f474e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

memory-evolve 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 5d 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.

commands/memory-evolve.md · 72 lines

How it starts

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

/memory-evolve

Run the self-evolving memory loop. Inspect what ECC has learned from your sessions, generate proposals, accept the ones you want as drafts, reject the rest. Nothing is ever committed automatically — accept writes a draft file you review.

Usage

/memory-evolve                    # default: stats + analyze + list
/memory-evolve stats              # snapshot of recorded signals
/memory-evolve analyze            # signals → proposals (idempotent)
/memory-evolve list               # show all proposals
/memory-evolve list --status pending
/memory-evolve show <id>          # full proposed content + evidence
/memory-evolve accept <id>        # write draft file to disk (NEVER commits)
/memory-evolve reject <id> --note "covered by existing agent"

Behavior

  1. stats prints the current signal snapshot:
    • reuse: how many memories are tracked, total surfaces, top reused
    • routing misses: how many substantive prompts had zero memory matches, top token clusters
  2. analyze applies thresholds and writes proposals to ~/.kodelythecc/evolve/proposals.jsonl. Stable IDs — re-running does NOT duplicate.
  3. list filters by state. show prints the full draft markdown + evidence.
  4. accept writes the draft to its target path under --root (defaults to package root). Refuses to overwrite without --overwrite. Marks the proposal accepted with the absolute path.
  5. reject marks a proposal rejected with optional note.

Default thresholds

Signal Default threshold Override flag
Memory reuse count 3 --reuse-min N
Distinct sessions per memory 2 --reuse-min-sessions N
Routing-miss cluster total 3 --miss-min N
Distinct prompts per cluster 2 --miss-min-distinct N

Use cases

  • Promote a recurring memory to a skill. A memory that's been recalled 5 times across 4 sessions is probably ready to graduate.
  • Find routing gaps. Ten substantive prompts about "feature flags" that hit zero memories and (you suspect) no specialist agent → propose a routing entry.
  • Audit what ECC has learned. Before tagging a release, see what proposals are pending and decide which to accept.
  • Reject noisy patterns. Some clusters look real but cover ground that's already covered by an existing agent. Reject with a note for the audit trail.

Read the full file on GitHub · 72 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. 5d ago First seen · 72 lines · 34 tokens per session scan A 8336473f474e

Subscribe to this mod's changes

memory-evolve is a command published in the GitHub repository sifxprime/kodelyth-ecc (11 stars, last pushed today), licensed MIT. It adds 34 tokens to every session and 905 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-09-03.