mex is a repository-local knowledge system for AI coding agents that turns codebase discoveries into connected Markdown documentation and a code graph. It helps agents and developers retain architectural decisions, conventions, edge cases, and project context across coding sessions while detecting documentation affected by code changes. The catalogue skills and instructions are add-ons for using mex with coding agents.
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.
npx agentmods add instructions/mex-memory/mex/agents-mdgit clone --depth 1 https://github.com/mex-memory/mexWrote 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.
[](https://agentmods.dev/instructions/mex-memory/mex/agents-md)<a href="https://agentmods.dev/instructions/mex-memory/mex/agents-md"><img src="https://agentmods.dev/badge/instructions/mex-memory/mex/agents-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00205 | $0.00205 |
| Opus 5 | $0.00102 | $0.00102 |
| Sonnet 5 | $0.00041 | $0.00041 |
| Haiku 4.5 | $0.00020 | $0.00020 |
Grade A, and why
mex AGENTS.md 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 yesterday.
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.
What it actually says
MEX agent skills
- At the start of every session, read
.mex/AGENTS.mdand.mex/ROUTER.mdbefore project work; followROUTER.mdto load only the relevant context. - Use
$mex-inboxfor durable governed Spec proposals and$mex-relayfor durable team handoffs. Invoke them automatically when intent clearly matches; explicit invocation remains available. - When MEX context materially influences an answer or implementation, include one concise acknowledgement:
MEX context used: <specific records/files/entities consulted>. - Do not claim an author, date, or historical event unless the retrieved data actually provides it.
- After a MEX write, say exactly what changed and its sharing boundary: a local draft is checkout-only and nothing is shared; a canonical artifact is written to the working tree and requires commit/push to share.
- Skill activation is not approval for canonical actions.
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.
- yesterday First seen · 10 lines · 205 tokens per session scan A 4ddfb6a2a54c
mex AGENTS.md is an instructions file published in the GitHub repository mex-memory/mex (1,542 stars, last pushed today), licensed MIT. It adds 205 tokens to every session, about $0.0010 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-09-03.
Other instructions, from other repositories
ccRecall CLAUDE.md
Claude Code instructions for tznthou/ccRecall, covering ccrecall — ai memory service for claude code, 定位, 指令, 技術約束 and 架構.
Iron-mem CLAUDE.md
Instructions for BMC-INC/Iron-mem, a project described as: Agent-native memory infrastructure for AI coding assistants. Governed session capture, LLM compression, hybrid retrieval (FTS + vector + RRF), temporal knowledge graph, content-addressed storage, compliance-grade classification. Single Rust binary, MCP server.…
ai-mind-map copilot-instructions.md
Copilot instructions for shdra06/ai-mind-map, covering ai mind map mcp — code memory engine (v1.4.0), 🚀 first thing to do in every conversation, quick lookup: "i need to..." → use this tool, ⚡ session lifecycle (always use these) and 🔍 find code (instead of grep/reading files).
contextmax CLAUDE.md
Instructions for galliani/contextmax, covering claude.md - ai assistant guidelines, project overview, core principles, development commands and start development server.
ai-mind-map CLAUDE.md
Claude Code instructions for shdra06/ai-mind-map, covering ai mind map mcp — code memory engine (v1.4.0), 🚀 first thing to do in every conversation, quick lookup: "i need to..." → use this tool, ⚡ session lifecycle (always use these) and 🔍 find code (instead of grep/reading files).
repo-context-mcp AGENTS.md
Instructions for nduc99911/repo-context-mcp, covering agents.md — repo-context-mcp, project, layout, commands and conventions.