m3-memory CLAUDE.md

m3-memory CLAUDE.md is an instructions file for coding agents from skynetcmd/m3-memory. It costs 1,300 tokens per session, scanned B, original, Apache-2.0.

A project guide for m3-memory that describes Git rules, release versioning, pre-push checks, and how its separated project roots work.

In plain words
What is it for?
Use it before changing repository roots, tool catalogs, release versions, manifests, hooks, or code that must pass the project’s pre-push checks.
Why use it?
It helps agents avoid split-brain problems, stale generated version files, catalog drift, leaked benchmark data, and invalid pushes.

Instructions file

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.

agentmods
npx agentmods add instructions/skynetcmd/m3-memory/claude-md
Clone the repo
git clone --depth 1 https://github.com/skynetcmd/m3-memory

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 m3-memory CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/skynetcmd/m3-memory/claude-md.svg)](https://agentmods.dev/instructions/skynetcmd/m3-memory/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/skynetcmd/m3-memory/claude-md"><img src="https://agentmods.dev/badge/instructions/skynetcmd/m3-memory/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,300 This file is loaded in full into every session.
When invoked 1,300 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
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 $0.01300 $0.01300
Opus 5 $0.00650 $0.00650
Sonnet 5 $0.00260 $0.00260
Haiku 4.5 $0.00130 $0.00130

Measured 4d ago against content hash 27cc57e4d8a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

m3-memory CLAUDE.md 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 4d 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` (only `~/.claude.json`, `.mcp.json`, and plugins are
CLAUDE.md · 62 lines

How it starts

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

docs/AGENT_INSTRUCTIONS.md

Git Standards

  • Commit Messages: Do NOT include "Co-Authored-By" lines in commit messages. Focus on clear, concise descriptions of "why" and "what".
  • Pre-push process (MANDATORY, all agents): After cloning, run python bin/setup_hooks.py once to enable the shared pre-push gate. Before any push, the tool-catalog drift check (python bin/check_tool_catalog_drift.py) and bench-data leakage scan must pass. If you change bin/mcp_tool_catalog.py, regenerate the catalog/inventory and update the "N tools" counts in the same change. Full rationale: the "Pre-push process — ALL agents" section in docs/AGENT_INSTRUCTIONS.md. This is enforced by the local hook AND CI, not just convention.
  • Cutting a release (version bump): The version has ONE source of truth — pyproject.toml [project].version. Do NOT hand-edit version strings in the derived manifests. Instead: (1) bump pyproject.toml, (2) run python bin/sync_manifest_versions.py — it writes the new version into every derived manifest (server.json, mcp-server.json, .claude-plugin/plugin.json, .antigravity-plugin/plugin.json; the plugin manifests are served straight from main to every user's /plugin install), (3) commit all together. tests/test_tool_count_drift.py::test_all_manifests_synced_to_pyproject_version (runs --check) fails the build if you skip step 2, so a stale manifest can't ship. Plugin manifest descriptions say "100+ MCP tools", never an exact count (also test-guarded).

Homecoming Architecture (decoupled roots)

Persistent state is split across three roots so the engine (databases) and the configuration can live and be secured independently:

  • M3_CONFIG_ROOT — configuration. Default ~/.m3/config. Resolution: M3_CONFIG_ROOT env > M3_MEMORY_ROOT/config > ~/.m3/config. Holds .chatlog_config.json, .migrate_config.json, .agent_os_salt.
  • M3_ENGINE_ROOT — databases + runtime state. Default ~/.m3/engine. Resolution: M3_ENGINE_ROOT env > M3_MEMORY_ROOT/engine > ~/.m3/engine. Holds agent_memory.db, agent_chatlog.db, chatlog state/cursor, spill dir.
  • M3_MEMORY_ROOT — the repo/payload (code), and a master override: if set, config and engine derive from it (/config, /engine) unless their own env vars are set.

Read the full file on GitHub · 62 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. 4d ago First seen · 62 lines · 1,300 tokens per session scan B 27cc57e4d8a5

Subscribe to this mod's changes

m3-memory CLAUDE.md is an instructions file published in the GitHub repository skynetcmd/m3-memory (23 stars, last pushed 4d ago), licensed Apache-2.0. It adds 1,300 tokens to every session, about $0.0065 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-30.