Borrowing it
Nothing to install: this file belongs to JingxuanC/causal-memory. 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/JingxuanC/causal-memory/main/CLAUDE.mdgit clone --depth 1 https://github.com/JingxuanC/causal-memoryWrote 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/jingxuanc/causal-memory/claude-md)<a href="https://agentmods.dev/instructions/jingxuanc/causal-memory/claude-md"><img src="https://agentmods.dev/badge/instructions/jingxuanc/causal-memory/claude-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/jingxuanc/causal-memory/claude-md"><img src="https://agentmods.dev/badge/instructions/jingxuanc/causal-memory/claude-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.01063 | $0.01063 |
| Opus 5.5 | $0.00425 | $0.00425 |
| Sonnet 5.5 | $0.00213 | $0.00213 |
| Haiku 4.5 | $0.00106 | $0.00106 |
Grade A, and why
causal-memory CLAUDE.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.
How it starts
The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Causal Memory MCP Integration
Paste this into your
CLAUDE.md/AGENTS.md/ system prompt to activate causal memory.Per insights/13 §1.3: agents don't proactively call memory tools without instruction. This prompt forces proactive use.
Causal Memory Integration
You have access to a causal memory layer via MCP tools. This records your past decisions and their outcomes, so you can learn from experience across sessions.
Before any non-trivial decision (architecture choice, debugging approach,
library selection, deployment strategy):
- Call
search_memorywith your query — it searches facts AND causal lessons at once (RRF-fused). If you know you need causal lessons specifically, callsearch_causalwith the relevanttask_tag - For risky or irreversible actions, also call
intervention_queryto see what outcomes similar past actions caused (safe / warning / danger) - When choosing between two concrete options, call
counterfactual_querywith both option texts — it compares recorded outcomes and shows same-context branches (natural experiments) when they exist. It logs a falsifiable prediction that resolves later when a newrecord_decisionunder the sametask_tagcarries matching option text — comparing two options that are already recorded leaves the prediction pending by design. A pending (or empty) ledger is not a broken one. - If past experience is relevant, incorporate it into your approach
After acting on a decision and observing the result:
- Call
record_decisionwith:decision: what you decidedoutcome: what actually happenedrelation: caused / enabled / prevented / no_effecttask_tag: the task categoryconfidence_source: temporal / rule / llm_inferred / user_feedbackcontext(important): a short description of the situation the decision was made in (environment, constraints, key parameters). Decisions with the same task_tag + context become comparable branches — this is what powers same-context counterfactual evidence. If you weighed multiple options at this decision point, ALWAYS record the context.
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 Changed · +28 lines · +383 tokens per session 5b9c94165d05
- 2mo ago Changed · +14 lines · +169 tokens per session 35c266b58309
- 2mo ago First seen · 53 lines · 511 tokens per session scan A 2f7e24fe192e
causal-memory CLAUDE.md is an instructions file published in the GitHub repository JingxuanC/causal-memory (104 stars, last pushed 2d ago), licensed Apache-2.0. It adds 1,063 tokens to every session, about $0.0043 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.
causal-memory CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| causal-memory CLAUDE.mdJingxuanC/causal-memory | Instructions file | 104 | 2d ago | Apache-2.0 | A | 1,063 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | 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 |