memories-sanitize

memories-sanitize is a skill for Claude Code from mahmoudimus/simba. It costs 19 tokens per session (717 once invoked), scanned A, original, MIT.

A cleanup procedure for a coding agent’s stored project memories. It reviews saved notes and removes ones that are wrong, outdated, or no longer relevant.

In plain words
What is it for?
Reviewing memories from debugging, feature work, refactoring, or exploration, and marking invalid notes for removal.
Why use it?
Old or misleading notes can cause an agent to repeat bad advice or misunderstand the codebase. This helps keep its stored context accurate.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the simba plugin — 10 skills shipped together

Good fit Reviewing memories from debugging, feature work, refactoring, or exploration, and marking invalid notes for removal.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mahmoudimus/simba/memories-sanitize
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 mahmoudimus/simba --skill memories-sanitize
Clone the repo
git clone --depth 1 https://github.com/mahmoudimus/simba

Made for: Claude Code.

Or install simba, the plugin that ships this one along with the rest of its 10 skills.

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 memories-sanitize

README.md
[![agentmods](https://agentmods.dev/badge/skills/mahmoudimus/simba/memories-sanitize/github.svg)](https://agentmods.dev/skills/mahmoudimus/simba/memories-sanitize)
Your own site
<a href="https://agentmods.dev/skills/mahmoudimus/simba/memories-sanitize"><img src="https://agentmods.dev/badge/skills/mahmoudimus/simba/memories-sanitize/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 memories-sanitize

Your own site · 80×15
<a href="https://agentmods.dev/skills/mahmoudimus/simba/memories-sanitize"><img src="https://agentmods.dev/badge/skills/mahmoudimus/simba/memories-sanitize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 717 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.00019 $0.00717
Opus 5 $0.00010 $0.00358
Sonnet 5 $0.00004 $0.00143
Haiku 4.5 $0.00002 $0.00072

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

Security

Grade A, and why

memories-sanitize 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 9d 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.

src/simba/skills/memories-sanitize/SKILL.md · 95 lines

How it starts

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

Memory Sanitization Procedure

Review memories and identify those that are invalid, misleading, or outdated. This applies to any work session - debugging, feature development, refactoring, exploration, etc.

Step 1: List Memories

List all memories:

simba memory list

Or filter by type:

simba memory list --type GOTCHA

Each memory shows: id, type, confidence, and content.

Step 2: Identify Invalid Memories

Review each memory and mark as INVALID if it:

From Any Session Type

  1. Outdated information - Was true but no longer applies after changes
  2. Superseded by better approach - A newer, better solution exists
  3. Too specific/narrow - Only applied to a removed/changed feature
  4. Incorrect generalization - Specific case wrongly stated as general rule

From Debugging Sessions

  1. Red herring - An initial hypothesis that turned out to be wrong
  2. Wrong blame - Points to code that was actually working correctly
  3. Non-issue - Something suspected as a bug but wasn't

From Feature Development

  1. Abandoned approach - Design decision that was later reversed
  2. Prototype artifact - Workaround that was replaced by proper implementation
  3. Incomplete understanding - Early assumption corrected by later work

Step 3: Delete Invalid Memories

For each invalid memory, delete it:

simba memory delete <MEMORY_ID>

Step 4: Add Corrected Memories (Optional)

If an invalid memory should be replaced with a correct version:

simba memory store --type WORKING_SOLUTION --content "<CORRECT_LEARNING>" --context "<CONTEXT>" --confidence 0.95

Memory Types Reference

Type Use For
GOTCHA Counterintuitive behaviors, traps, "watch out for this"
WORKING_SOLUTION Commands, code, or approaches that worked
PATTERN Recurring architectural decisions or workflows
DECISION Explicit design choices with reasoning
FAILURE What didn't work and why (useful to avoid repeating)
PREFERENCE User's stated preferences

Read the full file on GitHub · 95 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. 9d ago First seen · 95 lines · 19 tokens per session scan A ea152245deca

Subscribe to this mod's changes

memories-sanitize is a skill published in the GitHub repository mahmoudimus/simba (6 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 717 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-08-31.

Related

Other skills, from other repositories

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

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

hivemind-memory

Global team and org memory powered by Activeloop. ALWAYS check BOTH built-in memory AND Hivemind memory when recalling information.

activeloopai/hivemind · 33 tokens

memory-audit-pattern-extraction

A method for investigating repeated mistakes by comparing related memories and checking whether an earlier reminder failed. It looks at where the reminder was stored, when it was created, and whether it was strong enough to prevent the mistake.

Dataojitori/nocturne_memory · 48 tokens

init

Install or update OwnMem in the current repository. Use when the user asks to set up OwnMem, add local project memory for coding agents, or refresh an existing OwnMem installation after a version bump.

grpcer/ownmem · 43 tokens

mnemo-cortex

Installs and wires Mnemo Cortex (local-first persistent memory) into OpenClaw and other MCP-capable agents. Use for cross-session recall, decision history, or multi-agent shared memory.

GuyMannDude/mnemo-cortex · 44 tokens