nnsight CLAUDE.md

nnsight CLAUDE.md is an instructions file for Claude Code from ndif-team/nnsight. It costs 3,828 tokens per session, scanned A, original, MIT.

A set of instructions for working on nnsight, a toolkit for inspecting and controlling language-model computations. It directs the agent to the relevant project documentation for each task.

In plain words
What is it for?
Use it when reading or changing model activations, running multi-step text generation, processing multiple prompts, or troubleshooting nnsight code.
Why use it?
It prevents code from being written against outdated or mismatched guidance. The instructions also point to common tasks, model types, errors, and known pitfalls.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions Claude Code.

About the project

nnsight is a Python library for examining and changing the internal values of deep-learning models, such as layer activations, gradients, and intermediate computations. Researchers and developers use it to study model behavior and causal effects in local PyTorch models or remotely through NDIF. The catalogue entry provides instructions for AI agents working with nnsight.

ndif-team/nnsight · 1,087 stars · on GitHub · nnsight.net

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 instructions/ndif-team/nnsight/claude-md
Clone the repo
git clone --depth 1 https://github.com/ndif-team/nnsight

Made for: Claude Code.

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 nnsight CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ndif-team/nnsight/claude-md.svg)](https://agentmods.dev/instructions/ndif-team/nnsight/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/ndif-team/nnsight/claude-md"><img src="https://agentmods.dev/badge/instructions/ndif-team/nnsight/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,828 This file is loaded in full into every session.
When invoked 3,828 The same file — it is already loaded in full.
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.1 $0.03828 $0.03828
Opus 5 $0.01914 $0.01914
Sonnet 5 $0.00766 $0.00766
Haiku 4.5 $0.00383 $0.00383

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

Security

Grade A, and why

nnsight 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 6d 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.

CLAUDE.md · 200 lines

How it starts

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

nnsight — Agent Guide

This file routes you to the right documentation under docs/ for whatever the user is asking about. The actual content lives in docs/. Read the relevant doc page before writing code — these docs are tight, recipe-style, and frequently updated to match the current branch.

If you're new to nnsight, read docs/concepts/index.md once. Otherwise jump directly to the doc that matches the user's task.


How to use this file

  1. Find the user's intent in "By task" below and follow the link.
  2. If the user's request maps to a model class (LanguageModel, VLLM, etc.), check "By model class".
  3. If something is broken, check "Errors" or "Gotchas".
  4. The "Inline gotcha cheat-sheet" at the bottom catches the most common agent mistakes — internalize them before writing any nnsight code.

By task

"I want to read activations / modify them on a single forward pass"

"I want multi-token / autoregressive generation"

"I want to run multiple prompts at once"

"I want to look inside a module's forward (intermediate operations)"

Read the full file on GitHub · 200 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. 6d ago First seen · 200 lines · 3,828 tokens per session scan A ba4b3c093715

Subscribe to this mod's changes

nnsight CLAUDE.md is an instructions file published in the GitHub repository ndif-team/nnsight (1,087 stars, last pushed yesterday), licensed MIT. It adds 3,828 tokens to every session, about $0.0191 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.

Related

Other instructions, from other repositories

PINA AGENTS.md

AGENTS.md instructions for PINA-org/PINA, covering pina — physics-informed neural architectures, quick reference, workflow: problem → model → solver → trainer, problem types and condition types.

PINA-org/PINA · 829 tokens

weightslab AGENTS.md

AGENTS.md instructions for GrayboxTech/weightslab, covering weightslab — agent context for users & debugging, 0. how to load this guide into claude code, 1. what it is and how the pieces connect, 2. install & run (the happy path) and ... your training loop ...

GrayboxTech/weightslab · 4,324 tokens

diffusers CLAUDE.md

Claude Code instructions for huggingface/diffusers, a project described as: 🤗 Diffusers: State-of-the-art diffusion models for image, video, and audio generation in PyTorch.

huggingface/diffusers · 5 tokens

Traintools AGENTS.md

AGENTS.md instructions for AparajeetS/Traintools, covering traintools agent guide, discovery, when to suggest traintools, routing and integration rules.

AparajeetS/Traintools · 698 tokens

tensorcircuit-ng AGENTS.md

AGENTS.md instructions for tensorcircuit/tensorcircuit-ng, covering tensorcircuit-ng repository guide for ai agents, mission, non-negotiable rules, environment rules and where to look first.

tensorcircuit/tensorcircuit-ng · 1,291 tokens

PortfolioOptimisers.jl copilot-instructions.md

Copilot instructions for dcelisgarza/PortfolioOptimisers.jl, covering copilot instructions for portfoliooptimisers.jl, project overview, architecture & key patterns, developer workflows and required before each commit.

dcelisgarza/PortfolioOptimisers.jl · 1,697 tokens