memai-memory

memai-memory is a skill for Claude Code from Filipe-Soares-de-Almeida/MemAI. It costs 243 tokens per session (9,597 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 243 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,597 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.00243 $0.09597
Opus 5 $0.00121 $0.04798
Sonnet 5 $0.00049 $0.01919
Haiku 4.5 $0.00024 $0.00960

Measured today against content hash aa7f100a5629, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 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.

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 · 579 lines

How it starts

The opening of the file, as written. The whole thing — 579 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.

help() is the source of truth for the tools. help() lists every tool with a one-line summary; help(command='<name>') returns that tool's signature and full documentation, read live from the code, so it cannot drift from behaviour. When unsure of a name or an argument, call help instead of trusting this file.

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. help() documents all of them regardless and reports the ones this process did not load, under not_loaded — so an unavailable tool is a setting to change, 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).

Read the full file on GitHub · 579 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 · +10 lines aa7f100a5629
  2. 11d 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 (0 stars, last pushed today), licensed MIT. It adds 243 tokens to every session and 9,597 once invoked, about $0.0012 per session on Opus 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

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