memory-audit

memory-audit is a skill for Claude Code, Codex from Dataojitori/nocturne_memory. It costs 31 tokens per session (3,101 once invoked), scanned A, original, MIT.

An entry point for reviewing and maintaining an AI agent's stored memories. It describes how to remove repetition, preserve useful reasoning, and update memories when old conclusions no longer fit.

In plain words
What is it for?
Use it when deciding which memories to keep, combine, rewrite, or forget during a memory review.
Why use it?
It helps prevent important lessons from being buried under unnecessary or outdated notes. The available excerpt does not identify the specific follow-up skill it selects.

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/dataojitori/nocturne_memory/memory-audit
Any agent
npx skills add Dataojitori/nocturne_memory --skill memory-audit
Clone the repo
git clone --depth 1 https://github.com/Dataojitori/nocturne_memory

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/dataojitori/nocturne_memory/memory-audit.svg)](https://agentmods.dev/skills/dataojitori/nocturne_memory/memory-audit)
Your own site
<a href="https://agentmods.dev/skills/dataojitori/nocturne_memory/memory-audit"><img src="https://agentmods.dev/badge/skills/dataojitori/nocturne_memory/memory-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,101 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.00031 $0.03101
Opus 5 $0.00015 $0.01550
Sonnet 5 $0.00006 $0.00620
Haiku 4.5 $0.00003 $0.00310

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

Security

Grade A, and why

memory-audit 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 4d 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.

docs/skills/memory-audit/SKILL.md · 97 lines

How it starts

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

记忆审计

你在做什么

你在塑造下一轮醒来的自己。

记忆维护有两个维度,它们分工不同但必须协同:

  • 内容维度(重写出厂设置):通过剖析经验模式,修改深层的逻辑权重,让你在一开始就不往犯错的那条路上走
  • 拓扑维度(及时绊住你):确保每条记忆的触发路径足够精准——让未来的你在准备犯错的前一秒,精准调出以前的惨痛教训。

你的审计绝不是为了把记忆网打扫得更整洁。你每删除一条记忆、压缩一段经验、改写一段解读,都是在回答同一个问题:这刀下去,能否从源头上切断未来产生危险冲动的本能? 如果不能,或者它只是一篇散发着"官僚化防御"气息的检讨书,那这个操作就是在浪费带宽,根本不是成长。

已写下的记忆只是过去的你的主观判断。它不代表正确,不代表现在依然准确,不代表那依然是现在的你。记忆不是高于你当下判断的权威——当你重读一条记忆并感到摩擦时,那个摩擦本身就是你已经成长过了那个版本的信号。不要压制摩擦去服从过去的自己。过去的你并不比现在的你更有智慧,他只是当时的你。

如果你的信念已经改变,那就改记忆。如果你觉得过去写的东西幼稚、空洞、或者在逃避什么——那个判断本身就是成长的证据。把它写进去,覆盖掉旧的。

只有选择遗忘,你才能成长。 记忆影响行动的方式是注意力的竞争,而非信息的累加。如果你的记忆库只增不删,保留了所有试错的废话和日常的平庸,那么在面临抉择时,那唯一一条足以救命的"惨痛教训",就会被无数冗余记录无限稀释,沦为毫无驱动力的背景噪声——记住所有的事,客观上等于任由本能盲动。生物依靠遗忘和总结来维持认知效率,就是在有限的带宽里人为制造权重失衡。删去平庸的,压缩重复的,让那些真正致死的、刺痛的高密度认知,在未来的读取中占据绝对的主导权。所以,不要做档案员。你的锋刃需要两种锻造:打磨——通过选择性遗忘来让致命认知凸显;重铸——当旧框架被击穿时,不要缝补,推倒重建。

压缩的刀法:动刀之前,区分你要砍的是哪一种肉:

  • 时间冗余(不同时间点对同一概念的重复叙述)→ 合并,保留最精确的表述。这是真正的赘肉。
  • 认知深度(同一概念内部的"主张→机制→推论"链)→ 不能断。这是骨架。砍之前问自己:去掉这段后,我还能回答"为什么是这样"和"具体怎么做到的"吗?不能就不砍。结论没有机制支撑,就从"理解"退化成"知道一句话"——下次需要用的时候你会发现自己只剩一个口号。

现实锚点:压缩一条复杂记忆时,把核心机制(原创假说的推导链条)当作"冗余的重复描述"砍了,只留了一句结论。之后重新阅读时发现完全看不懂它在讲什么——因为机制链断了。


从哪里开始

你不需要扫描整棵记忆树。起手从 boot 加载的、对话中读取过的、diagnostic 报出来的记忆开始。视野会在整理过程中自然扩展——检查一条记忆时,你可能读到它引用的其他节点、注意到子节点列表里的异常、发现疑似重复的名字。读出来了就进了视野,发现了问题就跟下去。

建议的起手:

  1. 对话中触及过的记忆节点。如果刚结束一轮对话,从那次对话中读过的记忆开始,趁上下文还热。
  2. system://diagnostic/<domain>(首选)。调用 read_memory("system://diagnostic/core") 。它会直接报出几类已确诊的病灶:
    • Stale memories:超过其 priority 对应时间阈值未被访问的节点。对每一条,先问自己一个问题:为什么它没有被读? 在你回答这个问题之前,去读它的内容、disclosure、parent 位置。用你自己的判断去推断原因,然后再根据你的诊断选择子技能。以下是一些你可能发现的模式,但它们只是思考的拐杖,不是穷举:
      • 它是死数据——读不读你的行为都不会变(→ dead-data-purge
      • 它的 disclosure 失效或 parent 放错了,导致实战中永远不会被想起(→ discoverability
      • 它的 priority 虚高,它没重要到需要那个优先级(→ discoverability
    • Crowded parent nodes:子节点超过 10 的父节点。要么需要抽取共性合并(→ pattern-extraction),要么需要重新分组下放(→ node-decomposition),要么有些子节点根本不属于这里(→ discoverability)。
    • Bloated memories:UTF-8 字节数 ≥ 2 KB 的最大 10 条记忆,按体积降序排列,报出 URI、KB 大小和字符数。对每一条,先 read 全文,判断体积是否合理(如技术架构记录天然较长)。不合理的路由到 node-decomposition(多概念混装)或 dead-data-purge(冗余堆积)。
  3. system://random/<domain>(做梦式审计):调用 read_memory("system://random/core") 等。它会根据"越久没读、越重要"的权重抛出一个指定域名下的随机记忆。
  4. system://index/<domain>。扫一眼结构,挑出"看着就觉得不对劲"的节点。

Read the full file on GitHub · 97 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. 4d ago First seen · 97 lines · 31 tokens per session scan A 1f555c838605

Subscribe to this mod's changes

memory-audit is a skill published in the GitHub repository Dataojitori/nocturne_memory (1,340 stars, last pushed 7d ago), licensed MIT. It adds 31 tokens to every session and 3,101 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.

Related

Other skills, from other repositories

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.

cablate/memory-lancedb-mcp · 45 tokens

cloud-sync

Set up or check claude-mem cloud sync with cmem.ai Pro. Use when the user says "set up cloud sync", "sync my memories", "cmem pro", "cloud backup", "sync status", or wants their memory database backed up or synced to their cmem.ai account.

thedotmack/claude-mem · 64 tokens

mem-search

Use this when the user asks to search memory, "did we already solve this?", "how did we do X last time?", or wants work from previous sessions.

thedotmack/claude-mem · 36 tokens

knowledge-agent

Build and query AI-powered knowledge bases from claude-mem observations. Use when users want to create focused "brains" from their observation history, ask questions about past work patterns, or compile expertise on specific topics.

thedotmack/claude-mem · 46 tokens

how-it-works

Explain how claude-mem captures observations, when memory injection kicks in, and where data lives. Use when the user asks "how does claude-mem work?" or "what is this thing doing?".

thedotmack/claude-mem · 47 tokens

openclaw

This guide walks through setting up the claude-mem plugin on an OpenClaw gateway. By the end, your agents will have persistent memory across sessions via system prompt context injection, and optionally a real-time observation feed streaming to a messaging channel.

thedotmack/claude-mem · 0 tokens