memai-memory

memai-memory is a skill for Claude Code from Filipe-Soares-de-Almeida/MemAI. It costs 278 tokens per session (14,051 once invoked), scanned B, original, MIT.

A guide for using MemAI, a long-term memory store for coding agents. It explains the available commands for searching, reading, writing, and organizing saved information.

In plain words
What is it for?
Remembering decisions, identifiers, reasoning, handoffs, checkpoints, and diagrams across coding sessions.
Why use it?
It helps an agent keep useful project context between sessions and find it later by matching words and phrases.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths.

Good fit Remembering decisions, identifiers, reasoning, handoffs, checkpoints, and diagrams across coding sessions.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/filipe-soares-de-almeida/memai/memai-memory"><img src="https://agentmods.dev/badge/skills/filipe-soares-de-almeida/memai/memai-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 278 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 14,051 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00278 $0.14051
Opus 5.5 $0.00111 $0.05620
Sonnet 5.5 $0.00056 $0.02810
Haiku 4.5 $0.00028 $0.01405

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

Security

Grade B, and why

memai-memory scanned grade B with 1 finding 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 12d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

`~/.claude/settings.json` — the only scope memai maintains and reads back. The
src/memai/skills/memai-memory/SKILL.md · 789 lines

How it starts

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

memai-memory — using the MemAI MCP server

MemAI is a long-term memory store with BM25 keyword retrieval, exposed over MCP under the name the host registered the server with — mcp__memai__* for the documented one. It matches on the words that were written — an exact identifier (F100_TOTAL, USE_NEW_PARSER, proj-1042) as readily as a phrase — which is why tags carry the synonyms a body never happened to use.

The tool descriptions are the source of truth. Each tool's schema is read from its docstring, so it cannot drift from behaviour. When this file and a tool's description disagree, trust the description.

Not every tool is loaded. MEMAI_TOOLS names the tool groups a process publishes (core, diagrams, curation; full is the default), because every published schema is paid for on every request. A tool this file names may therefore be absent from the session — an unavailable tool is a setting to change in the MCP server's environment, not a missing feature.

Transport: a local stdio process (memai-mcp), no HTTP server. Only the agent talks to it over MCP. The memai-hook CLI opens the same SQLite file directly, without MCP, which is how the store reaches a session before any tool has loaded (see §6).

Architecture: one SQLite file (WAL, ACID) at $MEMAI_HOME/memai.db, or ~/.memai/memai.db when MEMAI_HOME is unset. Rows, FTS5 index (BM25), edit history, relations and the diagram graph (nodes, edges, step links, jumps) commit in the same transaction. There is no snapshot/reindex — a write is durable when it returns. Nothing here reaches the network.


1. What goes in the store, and as which type

Six types, one writer each. Choosing the type is choosing how the memory comes back later (§3.1). A seventh type, handoff, is carried by memories already in the store: they are read, searched and counted as pending like any other, and nothing writes a new one — a task carries unfinished work to the next session.

Read the full file on GitHub · 789 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. 12d ago Changed · +3 lines 0223f85e003d
  2. 14d ago Changed · +31 lines d170f9e284af
  3. 17d ago Changed · +39 lines 71aee4d878f1
  4. 18d ago Changed · +11 lines 54fb0e580ed5
  5. 21d ago Changed · +22 lines · +8 tokens per session 358ad608a814
  6. 23d ago Changed · +104 lines · +27 tokens per session 89f5997895f7
  7. 1mo ago Changed · +10 lines aa7f100a5629
  8. 1mo ago First seen · 569 lines · 243 tokens per session scan B 6943f867e8a3

Subscribe to this mod's changes

memai-memory is a skill published in the GitHub repository Filipe-Soares-de-Almeida/MemAI (1 stars, last pushed yesterday), licensed MIT. It adds 278 tokens to every session and 14,051 once invoked, about $0.0011 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). 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

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

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