saelens

saelens is a skill for Claude Code, Codex from zjunlp/Mechanist. It costs 63 tokens per session (773 once invoked), scanned A, original, MIT.

A toolkit and workflow for using sparse autoencoders to study the internal features of language models. Sparse autoencoders represent complex model activations as a smaller set of more interpretable signals.

In plain words
What is it for?
Training or loading sparse autoencoders, analyzing model features, connecting them to TransformerLens or Hugging Face models, and measuring reconstruction and sparsity.
Why use it?
It helps researchers inspect what model features may represent instead of treating the model’s internal calculations as an opaque whole.

Skill for Claude CodeCodex

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

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.

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

Made for: Claude Code, Codex.

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 saelens

README.md
[![agentmods](https://agentmods.dev/badge/skills/zjunlp/mechanist/sae.svg)](https://agentmods.dev/skills/zjunlp/mechanist/sae)
Your own site
<a href="https://agentmods.dev/skills/zjunlp/mechanist/sae"><img src="https://agentmods.dev/badge/skills/zjunlp/mechanist/sae.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 773 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00063 $0.00773
Opus 5 $0.00032 $0.00387
Sonnet 5 $0.00013 $0.00155
Haiku 4.5 $0.00006 $0.00077

Measured 5d ago against content hash 49ae167519c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

saelens 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 5d 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.

skills/mechanism-skills/feature-dictionary-learning/SAE/SKILL.md · 62 lines

How it starts

The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SAELens — Sparse Autoencoders for Language Models

When to Use

Activate this skill when:

  • Training sparse autoencoders (SAEs) on language model activations
  • Loading and analyzing pre-trained SAEs from Neuronpedia or HuggingFace
  • Performing mechanistic interpretability research on transformer models
  • Investigating neural network features using SAE decompositions
  • Generating SAE feature dashboards with SAE-Vis
  • Hooking SAEs into transformer forward passes (HookedSAETransformer)
  • Evaluating SAE quality (variance explained, L0 sparsity, reconstruction loss)
  • Running cache activation pipelines for large-scale SAE training
  • Analyzing logit lens features through SAE decomposition
  • Working with TopK, Gated, or Standard SAE architectures

Keywords: sparse autoencoder, SAE, mechanistic interpretability, TransformerLens, feature analysis, neural network features, activation patching, SAE training, HookedSAETransformer, Neuronpedia, dictionary learning, GPT-2, language model interpretability


Installation / Setup

Prerequisites

  • Python 3.10+
  • PyTorch (CUDA recommended for training)

Install from PyPI (recommended)

pip install sae-lens

Install from source (development)

git clone https://github.com/decoderesearch/SAELens.git
cd SAELens
pip install -e ".[dev]"

Quick Reference

Read the full file on GitHub · 62 lines

Files

What ships with it

1 file 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.

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. 5d ago First seen · 62 lines · 63 tokens per session scan A 49ae167519c4

Subscribe to this mod's changes

saelens is a skill published in the GitHub repository zjunlp/Mechanist (55 stars, last pushed 9d ago), licensed MIT. It adds 63 tokens to every session and 773 once invoked, about $0.0003 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.