keep-agent-memory-accurate

A set of rules for storing facts the coding agent should remember between sessions in Markdown files and an index.

In plain words
What is it for?
Use it when adding or changing a remembered user preference, project fact, feedback note, or reference note.
Why use it?
It keeps saved preferences and project facts consistent, uniquely named, and easy to find instead of letting memory files drift or conflict.

Skill for Claude CodeCodex

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 skills/everywan-dev/claude-code-engineering/keep-agent-memory-accurate
Any agent
npx skills add everywan-dev/claude-code-engineering --skill keep-agent-memory-accurate
Clone the repo
git clone --depth 1 https://github.com/everywan-dev/claude-code-engineering

Made for: Claude Code, Codex.

Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 900 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.00088 $0.00900
Opus 5 $0.00044 $0.00450
Sonnet 5 $0.00018 $0.00180
Haiku 4.5 $0.00009 $0.00090

Measured 2d ago against content hash 7a14fea90f97, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

keep-agent-memory-accurate 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 2d 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/keep-agent-memory-accurate/SKILL.md · 89 lines

How it starts

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

Keep agent memory accurate

Agent memory is one Markdown file per fact under memory/, plus a one-line-per-entry index at memory/MEMORY.md. Write and edit the files directly; lint only checks what is there.

Write a memory file

---
name: short-kebab-slug        # required; unique; must match the filename
description: one-line summary # required
metadata:
  type: user                  # required; user | project | feedback | reference
---

Body, in prose. May reference another memory with a [[wikilink]].

Name the file first, then copy that name into name. The filename without .md is the memory's canonical identity, so the file memory/short-kebab-slug.md carries name: short-kebab-slug. Choose a slug, not a title: name is an identifier that wikilinks resolve against, not a label -- the human-readable title belongs in the index entry. lint warns when the two disagree, and the repair is always to rewrite name, never to rename the file.

Since the filename is the identity, no two memories may carry the same one -- including across subdirectories. There the repair is renaming: what may never be renamed is a file being made to match its own name.

Add a matching bullet to memory/MEMORY.md:

- [Title](short-kebab-slug.md) — one-line summary

Only bullets shaped - [Title](file.md) count as index entries; the index and the files must agree in both directions.

Supersede a memory

To correct or retire a memory, do not delete the file. Rewrite its description to start with the literal prefix superseded by followed by a wikilink to the memory that replaces it:

description: superseded by [[coffee-preference-v2]]

The wikilink must resolve to a different memory that exists; pointing at itself -- by name or by this memory's own filename -- or at a name that does not exist, is malformed.

Unlike an ordinary wikilink, a successor cannot be left pending: this is an ERROR and it gates. If lint says the target does not resolve by name but names a file that exists, repair that file's name rather than re-point the supersession.

Read the full file on GitHub · 89 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. 2d ago First seen · 89 lines · 88 tokens per session scan A 7a14fea90f97

Subscribe to this mod's changes

keep-agent-memory-accurate is a skill published in the GitHub repository everywan-dev/claude-code-engineering (2 stars, last pushed 13d ago), licensed Apache-2.0. It adds 88 tokens to every session and 900 once invoked, about $0.0004 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-31.