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 magnitude-analysisgit 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/magnitude-analysis)<a href="https://agentmods.dev/skills/zjunlp/mechanist/magnitude-analysis"><img src="https://agentmods.dev/badge/skills/zjunlp/mechanist/magnitude-analysis/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/skills/zjunlp/mechanist/magnitude-analysis"><img src="https://agentmods.dev/badge/skills/zjunlp/mechanist/magnitude-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00048 | $0.00546 |
| Opus 5 | $0.00024 | $0.00273 |
| Sonnet 5 | $0.00010 | $0.00109 |
| Haiku 4.5 | $0.00005 | $0.00055 |
Grade A, and why
Magnitude Analysis 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 10d 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 — 29 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Advantage
It does not require training auxiliary classifiers or performing computationally expensive backward passes. This makes it highly scalable and suitable for analyzing large models in real-time.
Limitation
It serves primarily as a lightweight heuristic. High activation magnitude implies high presence but does not guarantee causal necessity (e.g., a high-magnitude feature might be cancelled out by a subsequent layer). Furthermore, its success relies heavily on the quality of the input data; if the dataset fails to elicit the specific behavior, the relevant components will remain dormant. Therefore, Magnitude Analysis is typically used as a “first-pass" screening tool to filter candidate objects for more rigorous verification methods.
Submethods
Given object categories, the method typically takes three forms:
-
Static Parameters: In the context of model weights, Magnitude Analysis is often used to identify outliers or “heavy hitters” without running inference. Researchers typically compute perweight or per-row norms of weight matrices to highlight parameters that dominate the inner product computations. These high-magnitude weights are often associated with critical knowledge storage or outlier features. You can find a demo for this method in ./static-parameters. This demo shows rope-with-llm: Analyze and manipulate massive values in Large Language Models (LLM) attention mechanisms, particularly for understanding contextual knowledge processing in transformer models with Rotary Position Embedding (RoPE)
-
Dynamic Components: For functional units whose activity varies with input, ranking them by their activation statistics helps localize specialized capabilities. You can find a demo for this method in ./dynamic-components. This demo shows language-specific-neurons: Identify and manipulate language-specific neurons in multilingual LLMs to understand and control language-specific behaviors in models like LLaMA-2, BLOOM, OPT, Mistral, and Phi-2
What ships with it
15 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.
- article_references.md 594 B
- dynamic-components/references/api_reference.md 6.8 KB
- dynamic-components/scripts/compute_perplexity.py 15 KB runs code
- dynamic-components/scripts/deactivate_neurons.py 13 KB runs code
- dynamic-components/scripts/load_neurons.py 8.2 KB runs code
- dynamic-components/SKILL.md 37 KB
- layer-wise-representation/references/api_reference.md 8.2 KB
- layer-wise-representation/scripts/basic_inference.py 5.9 KB runs code
- layer-wise-representation/scripts/truthfulqa_evaluation.py 13 KB runs code
- layer-wise-representation/scripts/truthx_editing.py 10 KB runs code
- layer-wise-representation/SKILL.md 30 KB
- static-parameters/references/api_reference.md 9.3 KB
- static-parameters/scripts/attention_analysis.py 11 KB runs code
- static-parameters/scripts/disruption_experiment.py 15 KB runs code
- static-parameters/SKILL.md 28 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.
- 10d ago First seen · 29 lines · 48 tokens per session scan A ca2e06928850
Magnitude Analysis is a skill published in the GitHub repository zjunlp/Mechanist (74 stars, last pushed 14d ago), licensed MIT. It adds 48 tokens to every session and 546 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.