memos-maintenance

memos-maintenance is a skill for Claude Code from Markgatcha/memos. It costs 73 tokens per session (1,149 once invoked), scanned A, original, MIT.

A maintenance tool for a MemOS memory store, the local database used to save information for an AI assistant. It can combine duplicates, replace outdated facts while keeping history, diagnose recall, reindex data, and delete memories.

In plain words
What is it for?
It is for cleaning up memories after busy sessions, correcting changed facts, checking search and embedding coverage, adjusting validity settings, reindexing, and forgetting data.
Why use it?
It keeps stored context accurate and easier to search as it grows, while requiring confirmation for destructive deletion.

Skill for Claude Code

Written for Claude Code: SessionEnd hook event. Also seen: mentions Claude Code.

Part of the memos plugin — 2 skills, 5 commands, 1 MCP server shipped together

Good fit It is for cleaning up memories after busy sessions, correcting changed facts, checking search and embedding coverage, adjusting validity settings, reindexing, and forgetting data.

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

Made for: Claude Code.

Or install memos, the plugin that ships this one along with the rest of its 2 skills, 5 commands, 1 MCP server.

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 memos-maintenance

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/markgatcha/memos/memos-maintenance"><img src="https://agentmods.dev/badge/skills/markgatcha/memos/memos-maintenance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,149 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.00073 $0.01149
Opus 5.5 $0.00029 $0.00460
Sonnet 5.5 $0.00015 $0.00230
Haiku 4.5 $0.00007 $0.00115

Measured 28d ago against content hash 03291a001b83, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memos-maintenance 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 28d 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.

plugin/skills/memos-maintenance/SKILL.md · 105 lines

How it starts

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

MemOS memory maintenance

Hygiene operations for a MemOS store. For storing and recalling facts, use the memos-memory skill instead.

Rule of thumb: consolidation and supersede are safe and reversible (superseded memories are kept as history, never deleted). memos_forget is the only destructive operation here — confirm before running it.

Consolidate

Consolidation merges near-duplicates, archives stale entries, supersedes decayed ones, and distills cluster notes.

  • Run it after a session that stored many facts, or when recall starts returning overlapping results.
  • Always preview first: memos_consolidate with dryRun: true. Apply only if the preview looks sane.
  • In Claude Code a SessionEnd hook does a fast pass automatically (MEMOS_SKIP_SESSION_CONSOLIDATE=1 opts out). In Hermes and other hook-less harnesses nothing runs automatically — you have to call it.

Supersede, don't overwrite

When a fact changes:

  1. memos_store the corrected version.
  2. memos_supersede the old one, optionally passing the new memory id as replacementId.

Historical versions stay queryable via memos_search_temporal, so superseding never destroys information. memos_history (memory id) returns the full version timeline: what it superseded, what superseded it, and derived notes.

Contradictions: if a new fact conflicts with existing search results, surface the conflict to the user rather than silently storing both. Storing both is how a memory store rots.

Diagnose poor recall

Work through these in order — they are the usual causes:

  1. memos_diagnostics. Low nodesWithEmbeddings coverage means the embedding provider is not configured, so search has fallen back to lexical matching. Set MEMOS_EMBEDDING_* env vars, or run memos reindex-embeddings --purge-stale.
  2. After switching embedding models, run memos_reindex - embeddings from a different model are not comparable and silently degrade ranking. The same applies after turning on contextual embeddings (MEMOS_CONTEXTUAL=1 / embeddings.contextual) or changing embeddings.embedText: old nodes carry vectors from the previous text recipe, so run memos reindex-embeddings --purge-stale once.
  3. If results are noisy rather than missing, narrow the pool (pool: ["note", "procedure"]) instead of lowering the bar.
  4. memos_graph on a memory id shows its edges (derived_from, supports, contradicts) — useful when recall misses something you know is linked.
  5. memos_explain with memoryId is the direct answer to "why was this not recalled?": it reports namespace, pool, lifecycle (historical/expired/ quarantined), embedding-model mismatch, and lexical-overlap checks. Without memoryId, it shows the per-leg score evidence and the relevance-gate verdict for a query.

Read the full file on GitHub · 105 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. 28d ago First seen · 105 lines · 73 tokens per session scan A 03291a001b83

Subscribe to this mod's changes

memos-maintenance is a skill published in the GitHub repository Markgatcha/memos (12 stars, last pushed today), licensed MIT. It adds 73 tokens to every session and 1,149 once invoked, about $0.0003 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-11-02.

Related

memos-maintenance compared with skills from other repositories

memos-maintenance next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
memos-maintenanceMarkgatcha/memosSkill12todayMITA73Claude Code
rememberlangchain-ai/deepagentsSkill32ktodayMITA71Claude Code, Codex
coding-prefslangchain-ai/deepagentsSkill32ktodayMITA36Claude Code, Codex
ax-agent-memory-skillsax-llm/axSkill3.0ktodayApache-2.0A128Claude Code, Codex
ax-cpp-agent-memory-skillsax-llm/axSkill3.0ktodayApache-2.0A42Claude Code, Codex
ax-go-agent-memory-skillsax-llm/axSkill3.0ktodayApache-2.0A48Claude Code, Codex
ax-python-agent-memory-skillsax-llm/axSkill3.0ktodayApache-2.0A40Claude Code, Codex