Borrowing it
Nothing to install: this file belongs to DoppiaG93/ctxmem. 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/DoppiaG93/ctxmem/develop/AGENTS.mdgit clone --depth 1 https://github.com/DoppiaG93/ctxmemWrote 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/doppiag93/ctxmem/agents-md)<a href="https://agentmods.dev/instructions/doppiag93/ctxmem/agents-md"><img src="https://agentmods.dev/badge/instructions/doppiag93/ctxmem/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.
<a href="https://agentmods.dev/instructions/doppiag93/ctxmem/agents-md"><img src="https://agentmods.dev/badge/instructions/doppiag93/ctxmem/agents-md.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00844 | $0.00844 |
| Opus 5.5 | $0.00338 | $0.00338 |
| Sonnet 5.5 | $0.00169 | $0.00169 |
| Haiku 4.5 | $0.00084 | $0.00084 |
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 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.
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.
When assembling context for implementation or a handoff, use a bounded payload:
ctxmem context "<task or question>" --budget 2000
Choose the budget to fit the task and available context; 2000 is an example,
not a mandatory limit. This complements the initial ask verdict. Avoid loading
both outputs again when the first already provides enough context.
context balances relevance, memory authority, freshness, and token cost;
superseded records are excluded and sources plus STALE warnings are retained.
Oversized blocks are skipped, not truncated; empty output does not prove the
memory has no answer. Refine the query, increase the budget, add --explain, or
use recall to inspect omitted context when needed.
Only stdout is the payload; stderr reports the count and method. The budget
covers payload text only (cl100k_base tokens when available, otherwise conservative
UTF-8 bytes), not surrounding prompts or arbitrary model tokenizers.
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 or WARNING: STALE reference files that changed,
are missing, or cannot be verified. Check the code and supersede the memory if
it is wrong; a changed file alone does not prove the decision is obsolete.
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 ask(...), recall(...), and remember(..., supersedes="<id>")
the same way. For budgeted context use context(query="<task>", budget=2000);
consume its text field as the payload and inspect the separate selection/count
metadata. The budget excludes the MCP envelope and metadata.
Managed by ctxmem 2.0.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.
- 1mo ago Changed · +1 lines · +14 tokens per session 4674507af3a5
- 1mo ago Changed · +21 lines · +264 tokens per session 69a8ca700641
- 2mo 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 yesterday), licensed MIT. It adds 844 tokens to every session, about $0.0034 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-31.
ctxmem AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ctxmem AGENTS.mdDoppiaG93/ctxmem | Instructions file | 3 | yesterday | MIT | A | 844 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |