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 skills add zjunlp/Mechanist --skill causal-attributiongit clone --depth 1 https://github.com/zjunlp/MechanistWrote 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/skills/zjunlp/mechanist/causal-attribution)<a href="https://agentmods.dev/skills/zjunlp/mechanist/causal-attribution"><img src="https://agentmods.dev/badge/skills/zjunlp/mechanist/causal-attribution.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.00049 | $0.00646 |
| Opus 5 | $0.00024 | $0.00323 |
| Sonnet 5 | $0.00010 | $0.00129 |
| Haiku 4.5 | $0.00005 | $0.00065 |
Grade A, and why
causal-attribution 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 7d 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 — 30 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Advantage
Unlike Magnitude Analysis, which only establish correlation, Causal Attribution provides definitive evidence that a component is a functional driver of the model’s output. This allows researchers to distinguish essential mechanisms from features that are highly activated but causally irrelevant to the specific behavior.
Limitation
This rigor incurs a significant computational overhead. Verifying causality typically requires intervening on objects individually and performing a separate forward pass for each intervention. Consequently, the cost scales linearly with the number of objects analyzed, making it prohibitively expensive for dense, sweeping searches over large models. This inefficiency often necessitates the use of Gradient Detection, which utilizes gradients to rapidly approximate these causal effects, enabling efficient screening before performing expensive, fine-grained interventions.
Submethods
The intervention typically takes three forms: Patching, Ablation, or Attribution Patching.
-
Patching: This approach replaces an object computed from the original input with one computed from a counterfactual input to isolate specific information pathways. By systematically patching across layers and positions, one can localize exactly where task-specific information (e.g., factual knowledge) is introduced or transformed. You can find a demo for this method in ./patching. This demo illustrates the way to edit factual knowledge in large language models like GPT-2 or GPT-J, perform causal tracing to understand model behavior, or implement Rank-One Model Editing (ROME) to modify specific factual associations without retraining.
-
Ablation: Alternatively, ablation-based attribution explicitly “zeros out” or removes objects, and measures the resulting performance drop to determine their causal necessity. You can find a demo for this method in ./ablation. This demo shows dissecting-factual-predictions: Analyze and dissect factual recall in auto-regressive language models using attention knockout, hidden state analysis, and intervention techniques on GPT-2 and GPT-J models
What ships with it
13 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- ablation/references/api_reference.md 8.6 KB
- ablation/scripts/intervention_experiments.py 14 KB runs code
- ablation/scripts/model_analysis.py 12 KB runs code
- ablation/SKILL.md 26 KB
- article_references.md 430 B
- attribution-patching/references/api_reference.md 7.1 KB
- attribution-patching/scripts/ioi_dataset_usage.py 12 KB runs code
- attribution-patching/scripts/run_attribution_patching.py 11 KB runs code
- attribution-patching/SKILL.md 24 KB
- patching/references/rome_api_reference.md 9.0 KB
- patching/scripts/causal_tracing_demo.py 11 KB runs code
- patching/scripts/rome_editing_example.py 8.4 KB runs code
- patching/SKILL.md 20 KB
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.
- 7d ago First seen · 30 lines · 49 tokens per session scan A 91b7adb84106
causal-attribution is a skill published in the GitHub repository zjunlp/Mechanist (71 stars, last pushed 11d ago), licensed MIT. It adds 49 tokens to every session and 646 once invoked, about $0.0002 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 skills, from other repositories
nanoresearch-writing
Draft a LaTeX research paper from all previous stage outputs.
nanoresearch-experiment
Generate a Python code skeleton from an experiment blueprint.
nanoresearch-ideation
Search academic literature and generate research hypotheses.
nnsight-remote-interpretability
Provides guidance for interpreting and manipulating neural network internals using nnsight with optional NDIF remote execution. Use when needing to run interpretability experiments on massive models (70B+) without local GPU resources, or when working with any PyTorch architecture.
sparse-autoencoder-training
Provides guidance for training and analyzing Sparse Autoencoders (SAEs) using SAELens to decompose neural network activations into interpretable features. Use when discovering interpretable features, analyzing superposition, or studying monosemantic representations in language models.
transformer-lens-interpretability
Provides guidance for mechanistic interpretability research using TransformerLens to inspect and manipulate transformer internals via HookPoints and activation caching. Use when reverse-engineering model algorithms, studying attention patterns, or performing activation patching experiments.