Magnitude Analysis

Magnitude Analysis is a skill for Claude Code from zjunlp/Mechanist. It costs 48 tokens per session (546 once invoked), scanned A, original, MIT.

A first-pass method for finding important-looking internal parts of a neural network by measuring the size of their numeric values. It can examine model weights or activations without training another classifier or running backward calculations.

In plain words
What is it for?
Use it to find unusually large weights, rank activation-based candidates, and screen model components before more rigorous causal analysis.
Why use it?
It quickly narrows a large model to candidate components, while making clear that a large value does not prove that the component causes the result.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mechanist plugin — 54 skills, 4 agents shipped together

Good fit Use it to find unusually large weights, rank activation-based candidates, and screen model components before more rigorous causal analysis.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zjunlp/mechanist/magnitude-analysis
Install

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.

Any agent
npx skills add zjunlp/Mechanist --skill magnitude-analysis
Clone the repo
git clone --depth 1 https://github.com/zjunlp/Mechanist

Made for: Claude Code.

Or install mechanist, the plugin that ships this one along with the rest of its 54 skills, 4 agents.

Wrote 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.

agentmods badge for Magnitude Analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/zjunlp/mechanist/magnitude-analysis/github.svg)](https://agentmods.dev/skills/zjunlp/mechanist/magnitude-analysis)
Your own site
<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.

agentmods 80×15 button for Magnitude Analysis

Your own site · 80×15
<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>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 546 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 10d ago against content hash ca2e06928850, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 8 executable files (dynamic-components/scripts/compute_perplexity.py, dynamic-components/scripts/deactivate_neurons.py, dynamic-components/scripts/load_neurons.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/mechanism-skills/magnitude-analysis/SKILL.md · 29 lines

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

Read the full file on GitHub · 29 lines

Changes

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.

  1. 10d ago First seen · 29 lines · 48 tokens per session scan A ca2e06928850

Subscribe to this mod's changes

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.