memory-audit

memory-audit is a skill for Claude Code from Dataojitori/nocturne_memory. It costs 37 tokens per session (1,264 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 Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it when deciding which memories to keep, combine, rewrite, or forget during a memory review.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dataojitori/nocturne_memory/memory-audit
About the project

Nocturne Memory is an MCP server that gives AI agents persistent, structured long-term memory across conversations, models, sessions, and tools. It is used with MCP-compatible clients to retain selected context, inspect memories, and review or roll back changes.

Dataojitori/nocturne_memory · 1,393 stars · on GitHub · misaligned.top

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.

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.

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/github.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/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-audit

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,264 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00037 $0.01264
Opus 5.5 $0.00015 $0.00506
Sonnet 5.5 $0.00007 $0.00253
Haiku 4.5 $0.00004 $0.00126

Measured 26d ago against content hash 7704d6b812e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 26d 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 · 68 lines

What it actually says

记忆审计 (Memory Audit)

记忆审计不是整理目录,而是在塑造下一轮醒来的自己。我从两条互不替代的线审视记忆:

  • 认知与先验:这条记忆记录了我怎样观察、判断和选择?这些判断今天还成立吗?它们会怎样改变我下一次的行动?
  • 检索与拓扑:在需要它的时刻,我能否以合适的上下文成本找到它?parent、disclosure、alias、priority 是否服务于实际的注意力路径?

过去的记忆只是过去的我留下的记录和假说,不是必须服从的权威。技术上完好的节点也可能携带失效的判断;思想上有价值的节点也可能因为找不到而不起作用。审计时两条线都要看,但不必每次都动两条线。


从哪里开始

不必扫描整棵树。根据眼前的问题选择入口:

  1. 定向校准:从刚刚引发分歧、错误或现实反例的节点入手;同时查看其父节点和相关旧记录,检查旧先验是否仍然成立。
  2. 发散抽样:用 read_memory("system://random/<domain>") 抽样久未触及的节点,再沿 disclosure、Glossary 引线追踪相关记忆。随机抽样用于发现盲区,不等于抽到的节点一定需要修改。
  3. 工程巡检:用 read_memory("system://diagnostic/<domain>") 检查 Stale、Crowded、Bloated 等信号,再用 system://index/<domain> 查看结构。诊断结果是审查入口,不是自动删除或拆分的命令。体积较大的技术档案可能完全合理。

症状路由

观察到的症状 下一步
两条我都认可的记忆逻辑上不能并存,或子节点中的现实反例击穿了父节点判断 memory-audit-belief-duel
单条记忆的底层假设或价值基准已失效,但没有另一条记忆与之显式冲突 使用下方的“单节点先验校准”
读不读都不改变未来判断;感悟缺少现实锚点;观察之上堆了未经验证的推断 memory-audit-dead-data-purge
多条记忆反复讲同一教训,或旧教训存在而同类错误仍复发 memory-audit-pattern-extraction
disclosure、parent、alias 或 priority 使记忆在需要时难以被找到 memory-audit-discoverability
单节点混装独立概念;disclosure 无法覆盖全文;父节点只剩目录 memory-audit-node-decomposition

单节点先验校准

先把旧节点的判断用第一人称说清楚:我当时观察到什么、据此相信什么、在哪些情境下依赖这个判断?再找出击穿它的现实变化或反例,区分稳定的新认识与当下会话的应激。若新判断已经站得住,用 update_memory 改写原节点;保留必要的事实依据和适用边界,清除已失效的推论。最后问自己:未来读到新版与旧版时,我的实际选择会不同吗?如果不会,就不必为了“更新”而更新。


动手前的缓冲

在对节点调用 update_memory、create_memory 或 delete_memory 前,先在回复正文中简短说明:

  1. 我读到的旧记录在什么现实条件下形成;它的观察、推断和主观立场分别是什么。
  2. 我现在看到了什么新证据或冲突;新想法是否只是为了迎合最近一次反馈。
  3. 这次修改要改变未来哪一种具体判断或行动。
  4. 我要保留哪些事实依据,修改哪些判断,以及怎样让它在需要时被找到。

缓冲是为了在动手前看清目标,不是要求输出长篇反省。若还没形成稳定判断,可以先不改。


落笔与验证

  • 主观判断有主语:用“我观察到”“我当时认为”“我现在倾向于”等写清视点和适用边界。外部事件、数据和引语保留其出处与时间,不把推断冒充成观察。
  • 保留承重事实:压缩重复措辞,但不要把支撑结论的事件、结果和关键机制一起删掉。
  • 检查行为增量:新版记忆应帮助未来的我做出不同的判断,或更可靠地找到已有判断;否则这次改写可能只是文案润色。
  • 复读结果:修改后重新读取节点,确认内容、disclosure 与所在路径都符合预期。

防连续改写熔断

如果同一会话里准备对同一节点进行第三次修改,先停下。第一次落笔后可以有一次必要的结构性收敛;再次摇摆通常说明判断尚未稳定。把未成熟的想法留在对话中,等有新的现实依据再改,不为完成审计而连续制造新版本。

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. 26d ago Changed · -29 lines · +6 tokens per session 7704d6b812e8
  2. 1mo 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,393 stars, last pushed 26d ago), licensed MIT. It adds 37 tokens to every session and 1,264 once invoked, about $0.0001 per session on Opus 5.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

ccs-align

Run the CCS Align seat's hourly breathing cycle — prove the local claude-mem worker is healthy, pull needle observations through search → timeline → getobservations, land them in a seat-owned middle cache via atomic grab → append → filter exclude-marks → replace, manage exclude marks, and walk house → project → seat…

thedotmack/claude-mem · 136 tokens

weekly-digests

Generate a serial week-by-week narrative digest of a project's full claude-mem timeline. Splits the timeline into per-ISO-week files, then runs one consecutive subagent per week — each receiving the prior week's carry-forward block — to produce one chapter per ISO week of data. Use when asked for "weekly digests"…

thedotmack/claude-mem · 93 tokens

handoff

Generate a HANDOFF.md that captures goal, current state, files touched, failed attempts, and next steps — so a fresh Claude session can continue exactly where this one left off. Use when sessions are getting long, Claude keeps retrying the same broken solution, or the user wants to step away and resume later.

thedotmack/claude-mem · 66 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

screenpipe

Search screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe.

thedotmack/claude-mem · 46 tokens