ndif CLAUDE.md

ndif CLAUDE.md is an instructions file for coding agents from ndif-team/ndif. It costs 4,885 tokens per session, scanned A, original, MIT.

A set of instructions for working on the NDIF project, a server that runs remote neural-network analysis jobs on shared GPU clusters.

In plain words
What is it for?
Use it when modifying NDIF's API, dashboard, Ray services, monitoring tools, command-line interface, or related documentation.
Why use it?
It explains the project's services, layout, technology choices, and security sandbox so an agent can work within the intended architecture and safety boundaries.

Instructions file

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ndif-team/ndif/claude-md.svg)](https://agentmods.dev/instructions/ndif-team/ndif/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/ndif-team/ndif/claude-md"><img src="https://agentmods.dev/badge/instructions/ndif-team/ndif/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,885 This file is loaded in full into every session.
When invoked 4,885 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 $0.04885 $0.04885
Opus 5 $0.02442 $0.02442
Sonnet 5 $0.00977 $0.00977
Haiku 4.5 $0.00488 $0.00488

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

Security

Grade A, and why

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

CLAUDE.md · 280 lines

How it starts

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

CLAUDE.md — NDIF agent guide

This file orients agents working in the NDIF repo. It is standalone: you should not need to load anything else to start. When you need more depth on design decisions, read NDIF.md (the human-facing source of truth, ~2700 lines).


What NDIF is

NDIF (National Deep Inference Fabric) is the server that executes NNsight remote traces on shared GPU clusters. A client pickles intervention code + a model key, POSTs it to the API, NDIF routes it to a Ray actor holding that model, runs the user code inside a security sandbox, uploads results to MinIO, and streams status over Socket.IO.

Python 3.12+ (see pyproject.toml). Packaged with uv as a single src-layout package (ndif). The repo contains four first-party services (API, Ray, Dashboard, and the legacy standalone Monitor that the Dashboard is replacing) plus the ndif CLI. The README still mentions Python 3.10/conda — that is stale; trust pyproject.toml.


Top-level layout

ndif/
├── CLAUDE.md                 ← this file (for agents)
├── NDIF.md                   ← long-form design doc (for humans)
├── README.md                 ← user-facing install / quick start
├── Makefile                  ← build + run shortcuts
├── pyproject.toml            ← uv-based Python project (3.12+)
├── .env.example              ← all config via env vars; defaults live here
│
├── docker/                   ← Dockerfile + docker-compose.yml (primary dev mode)
├── scripts/                  ← one-shot smoke scripts (`test.py`, `redeploy.py`)
├── telemetry/                ← grafana dashboards + prometheus config
├── tests/                    ← pytest suite (most tests need --run-remote)
│
└── src/ndif/                 ← the `ndif` package (src-layout; installed as `ndif`)
    ├── cli/                  ← `ndif` Click CLI (native dev mode)
    │   ├── cli.py            entry point (`ndif` console script)
    │   ├── commands/         deploy, evict, start, stop, status, logs, …
    │   ├── lib/              checks, deps, session, model_config, util
    │   └── config/models.yaml
    │
    ├── common/               ← shared code between services
    │   ├── schema/           ← Backend{Request,Response,Result}Model, mixins, DeploymentConfig
    │   │                       (no package-level re-exports — import from submodules)
    │   ├── providers/        ← redis, objectstore (MinIO/S3), socketio, mailgun, postgres,
    │   │                       ray (RayProvider + NDIFActorHandle — lean ClientActorHandle)
    │   ├── metrics/          ← InfluxDB metric classes
    │   ├── logging/          ← centralized logger setup
    │   ├── tracing/          ← OpenTelemetry / Tempo
    │   └── types.py          ← MODEL_KEY, API_KEY, etc.
    │
    └── services/
        ├── api/              ← FastAPI + Gunicorn (Dispatcher lives here)
        │   ├── app.py            FastAPI app + endpoints
        │   ├── dependencies.py   request validation
        │   ├── db.py             PostgreSQL API-key store
        │   ├── config.py, gunicorn.conf.py
        │   └── queue/            Dispatcher + per-model Processor
        │
        ├── ray/              ← Ray cluster (Controller + ModelActors)
        │   ├── start.py          controller startup
        │   ├── resources.py      resource detection
        │   ├── deployments/
        │   │   ├── controller/
        │   │   │   ├── controller.py
        │   │   │   └── cluster/  cluster.py / node.py / deployment.py / evaluator.py
        │   │   └── modeling/
        │   │       └── base.py   ModelActor (execution + sandbox invocation)
        │   └── nn/
        │       ├── backend.py    RemoteExecutionBackend (bridges NNsight)
        │       ├── ops.py        StdoutRedirect
        │       └── security/     sandbox — read this before touching it
        │           ├── protector.py
        │           ├── importer.py
        │           ├── guards.py
        │           ├── protected_objects.py
        │           ├── whitelist.py / whitelist.yaml
        │           └── README.md
        │
        ├── dashboard/        ← admin web app (Vue 3 + FastAPI), runs as a docker-compose service
        │   ├── backend/      ← FastAPI app (auth, schedule CRUD, monitor read, ad-hoc deploy/evict)
        │   ├── jobs/         ← cron entrypoints — monitor.py + reconcile.py
        │   ├── frontend/     ← Vue 3 + Vite + TS SPA
        │   └── start.sh      ← canonical entrypoint (used by both Docker and standalone)

Read the full file on GitHub · 280 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. 5d ago First seen · 280 lines · 4,885 tokens per session scan A ea1917d212c0

Subscribe to this mod's changes

ndif CLAUDE.md is an instructions file published in the GitHub repository ndif-team/ndif (51 stars, last pushed 2d ago), licensed MIT. It adds 4,885 tokens to every session, about $0.0244 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

nnsight CLAUDE.md

Instructions for ndif-team/nnsight, covering nnsight — agent guide, how to use this file, by task, "i want multi-token / autoregressive generation" and "i want to run multiple prompts at once".

ndif-team/nnsight · 3,828 tokens

DeepSpeed AGENTS.md

AGENTS.md instructions for deepspeedai/DeepSpeed, covering deepspeed project rules, commit & ci requirements, code change discipline, test discipline and tool caveats.

deepspeedai/DeepSpeed · 657 tokens

spiceai copilot-instructions.md

Copilot instructions for spiceai/spiceai, covering spice.ai agent instructions, data correctness — absolute top priority, evidence — no claim without a reproduction, build, test, lint (expensive — read first) and git & prs.

spiceai/spiceai · 7,971 tokens

meme-search CLAUDE.md

Instructions for neonwatty/meme-search, covering claude.md, 📁 file organization guidelines, 🤖 task agent usage guidelines, when to use task agents and documentation lookup pattern.

neonwatty/meme-search · 2,697 tokens

cookiecutter-mlops-package AGENTS.md

Instructions for fmind/cookiecutter-mlops-package, covering agents.md, project overview, setup & core commands, definition of done and conventions & idioms.

fmind/cookiecutter-mlops-package · 1,296 tokens

worldforge CLAUDE.md

Claude Code instructions for AbdelStark/worldforge: WorldForge is a harness framework for building world-model-based workflows for physical AI. It is the application builder's counterpart to model-training stacks like Stable World Model: it helps roboticists and physical-AI builders compose, evaluate, and benchmark…

AbdelStark/worldforge · 4,109 tokens