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.
Borrowing it
Nothing to install: this file belongs to mex-memory/mex. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/mex-memory/mex/main/.agents/skills/mex-relay/SKILL.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/skills/mex-memory/mex/mex-relay)<a href="https://agentmods.dev/skills/mex-memory/mex/mex-relay"><img src="https://agentmods.dev/badge/skills/mex-memory/mex/mex-relay/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.
<a href="https://agentmods.dev/skills/mex-memory/mex/mex-relay"><img src="https://agentmods.dev/badge/skills/mex-memory/mex/mex-relay.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.1 | $0.00107 | $0.00867 |
| Opus 5.5 | $0.00043 | $0.00347 |
| Sonnet 5.5 | $0.00021 | $0.00173 |
| Haiku 4.5 | $0.00011 | $0.00087 |
Grade A, and why
mex-relay 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 40 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MEX Relay
Prepare durable team handoffs that another engineer can continue from. Never represent a Relay as a sent message or notification.
Prepare a Relay draft
- Infer the useful session state: a concise summary, current position, completed work, in-progress work, blockers, unresolved questions, next actions, and relevant decisions, files, code, commits, or external links.
- For “whoever picks this up,” choose open-to-team. It includes future active project Members; no Member lookup is needed to save this local draft. If the user names people, retain named-recipient intent and resolve exact IDs only when needed. An unresolved named draft may stay recipient-free locally; do not silently publish it to everyone.
- Default to a standalone Relay. Use the local-save shortcut for a new draft; keep the structured preview/apply path for exact updates and canonical actions.
- Include an existing relevant Workstream only as typed evidence. Never invent one or turn saving a handoff into Workstream creation.
- Add optional typed context references only when the referenced IDs, paths, commits, or URLs are known. Never invent provenance.
- Resolve the action-scoped runtime contract. For a new draft,
mex relay draft save --from <draft.json> --jsonperforms the exact local preview/apply internally. For an update, build and preview the structured request. - An explicit create/save/draft request authorizes that local write without another confirmation. Publication remains separate.
- Return
/relays?view=drafts&draft=<id>and state that the draft is checkout-local and nothing has been delivered or shared.
Read references/cli-workflows.md before executing any Relay mutation. Load only the operation being performed.
Apply the approval policy
- Proceed with read-only member, Workstream, draft, and Relay resolution.
- Treat an explicit create/save/draft request as authorization only for the local draft preview and exact apply.
- Preview a local draft deletion, explain its consequence, and obtain fresh confirmation before applying.
- For publish, take, or close: generate a semantic preview, explain the local-versus-Git-tracked effect, and wait for fresh explicit confirmation. Apply the exact preview unchanged only after confirmation.
- Keep Git commit, push, pull, and staging separate from every MEX authorization.
- Never publish, take, or close merely because this skill activated.
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago Changed · +1 lines 186d1d19c4b5
- 1mo ago First seen · 39 lines · 107 tokens per session scan A 70fa6eb78222
mex-relay is a skill published in the GitHub repository mex-memory/mex (1,779 stars, last pushed yesterday), licensed MIT. It adds 107 tokens to every session and 867 once invoked, about $0.0004 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-09-03.
Other skills, from other repositories
project_state_management
Maintain clear project context and avoid hallucinations using GSD State Files.
project
Initialize or inspect a project, maintain sourced current facts and record durable decisions. Use for project context or remember-this requests; other record types retain their owners.
alive-bundle
Create, manage, and graduate bundles -- the unit of focused work within a walnut.
layered-context
L0/L1/L2 three-layer context loading protocol — reduces token consumption during /resume boot.
semantic-search
Zero-dependency TF-IDF search across MUSE memory, roles, and skills. Use when user wants to find information across their project context.
workspace
Scaffold and manage the stateless AI workspace — context, packs, repos, and knowledge for multi-repo orchestration.