memai-maintenance

memai-maintenance is a skill for Claude Code, Codex from Filipe-Soares-de-Almeida/MemAI. It costs 184 tokens per session (5,556 once invoked), scanned A, original, MIT.

A maintenance workflow for curating MemAI's long-term memory store. It coordinates checks for checkpoints, summaries, confidence, links, domains, diagrams, and aging information.

In plain words
What is it for?
Finding duplicate or stale memories, organizing domains, maintaining diagrams, adjusting confidence, and linking related entries.
Why use it?
It gathers suggested memory improvements in one review process, so a person can inspect and approve changes before they are applied.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Finding duplicate or stale memories, organizing domains, maintaining diagrams, adjusting confidence, and linking related entries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/filipe-soares-de-almeida/memai/memai-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 Filipe-Soares-de-Almeida/MemAI --skill memai-maintenance
Clone the repo
git clone --depth 1 https://github.com/Filipe-Soares-de-Almeida/MemAI

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/filipe-soares-de-almeida/memai/memai-maintenance"><img src="https://agentmods.dev/badge/skills/filipe-soares-de-almeida/memai/memai-maintenance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 184 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,556 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.00184 $0.05556
Opus 5 $0.00092 $0.02778
Sonnet 5 $0.00037 $0.01111
Haiku 4.5 $0.00018 $0.00556

Measured today against content hash 995fb5e53221, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

memai-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 today.

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/memai/skills/memai-maintenance/SKILL.md · 370 lines

How it starts

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

memai-maintenance — the MemAI curation pass

Entry point of the maintenance pass. It does not do the fine-grained work — it coordinates the four specialized skills, owns what none of them covers (domain tree, diagrams, decay), and folds every result into a single optimize_stage run.

Proposer → disposer. This pass applies nothing on its own: it collects the sub-skills' suggestions and hands them to the dashboard through optimize_stage. The human applies or rejects each one there (a backup is taken before the first apply; every apply can be undone). Apply directly (set_confidence/edit_memory/link_memories/forget/also_domain) only when the user asks for it without the dashboard.

help() is the source of truth for the tools — signatures read live from the code. When unsure of a name or an argument, call help before trusting this file.

Dashboard: http://127.0.0.1:8888 (default port). The MCP server can bring it up alongside itself when MEMAI_ADMIN_AUTOSTART is set; otherwise run-admin.bat.


0. Pre-flight (done ONCE; the sub-skills reuse it)

The orchestrator warms up once and keeps the result in context for every sub-skill. Read each source once; nothing below is read twice.

  1. pulse(domain) — the state a scope inherits, plus:
    • scope — what the scope HOLDS next to what came back: subdomains (own = filed exactly there, subtree = with descendants) and not_shown per list (a warm-up stops at a handful; this counts what it left behind). Read it as the drill-down plan: list_by_domain(domain, type=…) / search(query, domain=…) on the child that was only counted.
    • scope.paths — which path(s) the name given actually resolved to (§2).
    • scope.stale — how many memories in the scope carry a review_after date that has passed. Present only when non-zero, and the pass's own work list (§4, step 3).
    • diagrams — the documented flows by title only, never inlined. Open one with get_diagram(uid, format='json').
  2. list_domains() — the tree, not a list: per entry parent, depth, count (filed at exactly that path), subtree (that plus its descendants), children, implicit (a level that exists only because something deeper is filed below it), plus also/subtree_also for what is cross-listed there and not filed. count: 0 with also > 0 is a pure cross-cutting subject.
  3. get_domain_case() — the store's casing policy: preserve | lower | upper, preserve by default. It governs writes; reads fold case either way (§2).
  4. optimize_runs() — take the created_at of the latest run. The scan is incremental: optimize_scan(since="<that created_at>") reviews only the delta (a full scan on the first pass, or on request). The fields that drive the pass:
    • stats — over the whole filtered corpus, independent of limit, including due_for_review, never_recalled, untagged and untitled;
    • untagged — memories whose tags are empty, or are nothing but the type every read already filters on. Retrieval is BM25 over content, tags and domain, so those rows answer only queries that quote their own wording. They are the work list for retag: give each the identifier, the symbol and the plain-language phrasing someone will type;
    • untitled — memories with no title, listed everywhere by the opening line of their body. They are the work list for retitle: name each one by its subject, in the words someone would look for it by. The title outweighs every other field in BM25, so this is retrieval work, not cosmetics;
    • due: true per memory, with its review_after and source_ref — the store saying a writer dated this claim for a recheck and the date has passed. This is the decay work list; recalls is not (a low count means unproven, never useless — judge the store by the aggregate and never archive a row for being unread);
    • leaked_calls — rows whose text carries a tool call's own source, because a parameter tag was typed without the antml: prefix and the fields after it were written into the body instead of their columns. Per finding: which fields carry a mark, what a repair removes from each, clean: false when the marks sit inside the prose (a reword, not an unleak), and declares — the domain and tags the debris was trying to write, reported only where that column is still empty. So one finding is usually an unleak per dirty field plus the redomain / crosslist / retag that finishes it. stats.leaked_calls counts every one in the window; the list stops at db.LEAK_SCAN_CAP;
    • dedup_hints — pairs probed from the delta against the whole store;
    • domain_hints — spelling/separator/case variants of one domain, cross-window;
    • domain_nesting — flat domains that already spell a hierarchy (acme-x100-p200-cache-warmupacme/x100/p200/cache-warmup): the raw material for redomain (§2);
    • also per memory — the cross-listings that already hold, so a new one is distinguishable from one already in place;
    • anchors per memory — the verifiable references found in the full body (URLs, file paths, table/field-style identifiers, SNAKE_CASE constants): the list [[memai-confidence]] checks against live facts;
    • truncated: true → page on with offset = offset + count. full=True returns whole bodies (expensive); include_archived=True only when the question is about what was already archived.
  5. The state of the work a checkpoint anchors. [[memai-checkpoints]] decides keep/archive against whether that work is still live or already closed, and the store does not know which. That state comes from whatever the host project declares as its source of truth for it — read it once here, so no sub-skill goes looking again. When the project declares none, the pass does not guess: keep the most recent checkpoint per scope, report the rest for the user to rule on, and stage nothing destructive against them.

Read the full file on GitHub · 370 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. today Changed · +11 lines 995fb5e53221
  2. 11d ago First seen · 359 lines · 184 tokens per session scan A 1cbc2892c3a8

Subscribe to this mod's changes

memai-maintenance is a skill published in the GitHub repository Filipe-Soares-de-Almeida/MemAI (0 stars, last pushed yesterday), licensed MIT. It adds 184 tokens to every session and 5,556 once invoked, about $0.0009 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

browserwing-executor

Control browser automation through HTTP API. Supports page navigation, element interaction (click, type, select), data extraction, accessibility snapshot analysis, screenshot, JavaScript execution, and batch operations.

MemTensor/MemOS · 42 tokens

dev-browser

Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website"…

MemTensor/MemOS · 84 tokens

ask-user-question

Ask users questions via the UI. Use when you need clarification, user preferences, or confirmation before proceeding. The user CANNOT see CLI output - this tool is the ONLY way to communicate with them.

MemTensor/MemOS · 44 tokens

memos-memory-guide

Use the MemOS Local memory system to search and use the user's past conversations. Use this skill whenever the user refers to past chats, their own preferences or history, or when you need to answer from prior context. When auto-recall returns nothing (long or unclear user query), generate your own short search query…

MemTensor/MemOS · 131 tokens

memmachine-memory

Use when an agent or model needs durable project, user, or session context from MemMachine, needs to save information to MemMachine memory, has requests involving mem-cli, memmachine, or memmachineclient, has insufficient conversation context, or is tempted to search local files for prior context that should come from…

MemMachine/MemMachine · 96 tokens

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 tokens