memesh: Instructions file for Claude Code

AGENTS.md

memesh AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from PCIRCLE-AI/memesh. It costs 4,383 tokens per session, scanned A, original, MIT.

Persistent shared memory instructions for AI coding agents, stored in one local database that all connected hosts can use.

In plain words
What is it for?
Use it to load project context at session start, record user-stated goals and blockers, and maintain clean shared memory.
Why use it?
It reduces repeated repository exploration between sessions. It also prevents future sessions from treating guessed goals, next steps, or blockers as facts.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: SessionStart hook event, but also the file is AGENTS.md. Also seen: reads .claude/ paths; names the ExitPlanMode tool; mentions Claude Code.

This is PCIRCLE-AI/memesh's own configuration. It tells Claude Code, Codex and OpenCode how to work on memesh itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything memesh configures →

Reuse

Borrowing it

Nothing to install: this file belongs to PCIRCLE-AI/memesh. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/PCIRCLE-AI/memesh/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/PCIRCLE-AI/memesh

Made for: Claude Code, Codex, OpenCode.

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 memesh AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/pcircle-ai/memesh/agents-md/github.svg)](https://agentmods.dev/instructions/pcircle-ai/memesh/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/pcircle-ai/memesh/agents-md"><img src="https://agentmods.dev/badge/instructions/pcircle-ai/memesh/agents-md/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 memesh AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/pcircle-ai/memesh/agents-md"><img src="https://agentmods.dev/badge/instructions/pcircle-ai/memesh/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,383 This file is loaded in full into every session.
When invoked 4,383 The same file — it is already loaded in full.
Security scan A 0 findings. 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.04383 $0.04383
Opus 5.5 $0.01753 $0.01753
Sonnet 5.5 $0.00877 $0.00877
Haiku 4.5 $0.00438 $0.00438

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

Security

Grade A, and why

memesh 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 8d 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.

AGENTS.md · 261 lines

How it starts

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

Using MeMesh — for AI agents

MeMesh gives local AI agents shared persistent memory. Hosts running as the same user share ~/.memesh/knowledge-graph.db by default. MEMESH_DIR or MEMESH_DB_PATH can select a different database; use matching settings when hosts should share memories. Not installed yet? Follow llms-install.md.

The loop that pays for itself

  1. Session start — load, don't re-explore. Call the briefing tool once (CLI: memesh briefing) unless your host already injected the MeMesh memory block (Claude Code does, and so does the Codex plugin once Codex runs its hooks; see below). It returns the current project's work topology; read it instead of re-reading the repository to reconstruct context. The project's latest eligible handoff comes first, after optional repository facts: check its age and verify its claims against the files before acting on it. The rest depends on the briefing setting (memesh config set briefing <level>):
    • minimal (default): this project — its decisions, lessons, knowledge and recent activity, with the repository state in front whenever anything else is shown — plus up to five of your memories that belong to no project (every level, under their own heading). No task state, no index, nothing from other projects. A project with nothing to show injects only the session's project line, and that line appears only when the host reports a usable working directory; without one there is no project line and nothing is guessed.
    • standard: adds the stated goal / next / blocked / done when fresh, and a capped index of durable memories with [mem:id] handles (memesh briefing --index prints just the index).
    • full: adds other projects' recent activity and global memory. The SessionStart hook also appends a work-package notice at full; that notice is an instruction to the host agent, not memory, and briefing never includes it.

Read the full file on GitHub · 261 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. 8d ago Changed · -17 tokens per session 7425de257d33
  2. 9d ago Changed · +1 tokens per session 0a13a2e34854
  3. 11d ago Changed · +1 lines · +16 tokens per session 55a8900965fe
  4. 21d ago Changed · +1 lines · +29 tokens per session 3c3c966ace1d
  5. 22d ago Changed · +13 lines · +261 tokens per session 91978cecd5b7
  6. 23d ago Changed · +4 lines · +62 tokens per session dcd6d2ee21d8
  7. 24d ago Changed · +6 lines · +142 tokens per session d392f31318cf
  8. 28d ago Changed · +4 lines · +78 tokens per session 488da4811123
  9. 29d ago Changed · +1 lines · +23 tokens per session dad547feb563
  10. 1mo ago First seen · 231 lines · 3,788 tokens per session scan A 18fadc019db2

Subscribe to this mod's changes

memesh AGENTS.md is an instructions file published in the GitHub repository PCIRCLE-AI/memesh (16 stars, last pushed yesterday), licensed MIT. It adds 4,383 tokens to every session, about $0.0175 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-08-30.

Related

Other instructions, from other repositories