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/jingxuanc/causal-memory/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.svg" alt="Measured on agentmods" 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.00680 | $0.00680 |
| Opus 5 | $0.00340 | $0.00340 |
| Sonnet 5 | $0.00136 | $0.00136 |
| Haiku 4.5 | $0.00068 | $0.00068 |
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 yesterday.
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 — 67 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, shows same-context branches (natural experiments) when they exist, and logs a falsifiable prediction that resolves automatically when either option is later recorded - 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.
When you learn a stable fact (preference, tech stack, config):
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.
- yesterday Changed · +14 lines · +169 tokens per session 35c266b58309
- 6d 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 (67 stars, last pushed 3d ago), licensed Apache-2.0. It adds 680 tokens to every session, about $0.0034 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-30.
Other instructions, from other repositories
task-passport AGENTS.md
Instructions for dongsheng123132/task-passport, covering task-passport / taskpack — 开机文档, 这是什么, 最原创的那一条(别改掉它), 常用命令 and 当前状态摘要(详细版在护照里,以护照为准).
dsh-plugin-coaligne AGENTS.md
AGENTS.md instructions for dataelement/dsh-plugin-coaligne: This repository is a standalone DeepSeek Harness plugin that connects DSH to CoAligne shared project context. It follows the omdsh-dev/plugin-template contract.
dsh-config-manager AGENTS.md
AGENTS.md instructions for xiajiajun516/dsh-config-manager, covering agents.md — dsh config manager 仓库协作指南, 🌐 语言, 📦 概览, 🗂️ 结构与分层 and ui 分层铁律.
dsh-industry-research AGENTS.md
AGENTS.md instructions for PerryLink/dsh-industry-research, covering agents.md, layout, hard rules applied here, checks and release.
dsh-checkpoint-rewind AGENTS.md
AGENTS.md instructions for PerryLink/dsh-checkpoint-rewind, covering agents.md, 仓库布局:发布面 / 本地工程面, 命令, 提交纪律 and dsh 插件约束(红线).
star-dsh-desktop AGENTS.md
AGENTS.md instructions for dabaicai001/star-dsh-desktop, covering agents.md — starhub 协作指引, 项目是什么, 架构一句话, 目录结构 and 技术栈速查.