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/doppiag93/ctxmem/agents-mdgit clone --depth 1 https://github.com/DoppiaG93/ctxmemWhat 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.00566 | $0.00566 |
| Opus 5 | $0.00283 | $0.00283 |
| Sonnet 5 | $0.00113 | $0.00113 |
| Haiku 4.5 | $0.00057 | $0.00057 |
Grade A, and why
ctxmem 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 2d 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.
What it actually says
Project memory
This repo has a ctxmem memory: a shared, git-committed record of
decisions and code context. Treat it as your first source of truth and keep it
correct. Follow this loop on EVERY request, without being asked.
1. Recall first — before answering. Before you respond to a question or start a task, query the memory to check whether the answer is already known:
ctxmem ask "<the user's question or task, in a few words>"
ask prints a verdict: HIT (memory has an answer — base your reply on the
listed records), WEAK (only related code/superseded notes — verify), or
MISS (nothing — answer fresh, then remember it). Do this even for questions
you think you can answer from your own context.
2. Reconcile — decide who is right. If what the memory says conflicts with your own context or with the current code, do not silently pick one. Verify against the actual code in the repo:
- If the code/reality proves the memory is outdated, correct the memory (step 3) and tell the user what changed.
- If the memory is right and your context was stale, trust the memory.
Records shown with ⚠ SUPERSEDED are already outdated — use the newer one.
Records shown with ⚠ STALE point at code that no longer exists — verify against
the repo and supersede them if they are wrong.
3. Remember — persist every decision and correction. When you make or confirm an important decision, save it:
ctxmem remember --type decision --title "Short title" "Detailed decision text"
When you find that an existing memory is wrong or obsolete, replace it instead of just adding a new one (this demotes and flags the old record in recall):
ctxmem remember --type decision --title "Corrected title" \
--supersedes <old-memory-id> "What is now true and why it changed"
Each remember prints the new record's id; use it as the --supersedes
target later. After changing code, run ctxmem sync to rebuild the index.
If your agent supports the MCP protocol instead of running shell commands, use
the MCP tools recall(...) and remember(..., supersedes="<id>") the same way.
Managed by ctxmem 1.4.1 — run ctxmem update-instructions after upgrading.
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.
- 2d ago First seen · 56 lines · 566 tokens per session scan A 3cfb6881dc3d
ctxmem AGENTS.md is an instructions file published in the GitHub repository DoppiaG93/ctxmem (3 stars, last pushed 26d ago), licensed MIT. It adds 566 tokens to every session, about $0.0028 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-08-31.
Other instructions, from other repositories
cli AGENTS.md
Instructions for konteks/cli, covering agent instructions, project overview, tech stack, repository layout and common commands.
agentlens CLAUDE.md
Instructions for RogerReed/agentlens, covering agentlens mcp and recurring maintenance tasks.
brainstack copilot-instructions.md
Instructions for Hrithik-Gavankar/brainstack, covering brainstack context, career context, full skills inventory, workspace layout and engineering profile.
cli copilot-instructions.md
Instructions for semanticash/cli: Review pull requests for correctness, regressions, and missing tests before style concerns.
repomemory CLAUDE.md
Instructions for DanielGuru/repomemory, covering repomemory — agent instructions, repository memory (repomemory), what this is, architecture and key technical decisions.
repomemory AGENTS.md
Instructions for DanielGuru/repomemory, covering repomemory — instructions for ai coding agents, project overview, repository structure, how to build and test and key architecture decisions.