ndif: Instructions file for Claude Code

CLAUDE.md

ndif CLAUDE.md is an instructions file for Claude Code from ndif-team/ndif. It costs 823 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 for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is ndif-team/ndif's own configuration. It tells Claude Code how to work on ndif itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ndif configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ndif-team/ndif. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ndif-team/ndif/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/ndif-team/ndif

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ndif-team/ndif/claude-md/github.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/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 ndif CLAUDE.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 823 This file is loaded in full into every session.
When invoked 823 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00823 $0.00823
Opus 5.5 $0.00329 $0.00329
Sonnet 5.5 $0.00165 $0.00165
Haiku 4.5 $0.00082 $0.00082

Measured 18d ago against content hash e6c7fe3e8305, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 18d 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 · 64 lines

How it starts

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

NDIF — Agent Guide

NDIF is the server behind nnsight: it runs user-submitted intervention code against large models on shared GPUs. This repo is the server; the client is nnsight, whose docs live in its own repo.

Rules

  • Branch off dev and open PRs into dev.
  • Docs change in the same PR as the code that invalidates them.
  • Cite code by path + symbol (src/ndif/services/api/auth.py verify_api_key), never by line number. pytest tests/test_docs.py checks paths, symbols and links.
  • The rest is in CONTRIBUTING.md.

Read this before anything else

Where user code runs depends on one boolean, request.trusted, read from the tags stamped at ingress from the API key. A trusted block runs inside the model actor process, next to the weights; an untrusted one runs in a separate runner process driven over a Unix socket. Whether a model runs its own repo code is the model key's trust_remote_code field, a different thing; who may deploy one is in docs/concepts/auth-and-limits.md. With auth off (no NDIF_POSTGRES_URL) client-supplied tags are honored and unspecified ones default to trusted — so a bare just up is unauthenticated and runs user code in-process. Send tags: [] to exercise the runner path without Postgres. The sandbox is process separation, not a security boundary. Read docs/concepts/sandbox-execution.md before changing or describing it.

Where to start

docs/index.md has the by-task table and the section map. If you are new here, read docs/concepts/request-lifecycle.md once; every other page zooms into one of its hops.

Cheat sheet

  • No Ray Serve. Deployments are detached Ray actors named {replica_id}:ModelActor:{model_key} in the NDIF namespace. Ignore Serve docs.
  • An actor's exception arrives as a RayTaskError; read .cause. Over Ray Client a bare isinstance against the original type silently matches nothing.
  • The API can't reach Ray; Redis is the only durable handoff. Only the dispatcher, a child of the gunicorn master, holds a Ray client. A popped request lives in its memory, so an API restart drops in-flight work, and ray:connected has no TTL — health endpoints pass after the dispatcher dies.
  • Source is baked into the image. Run just ta after a code change. just ta <svc> tears the whole stack down and brings back only that service and its dependencies; HOT deployments are lost.
  • The published image runs the core stack in one container. NDIF_SERVICE defaults to all: redis, rustfs, ray and the API. The dashboard is optional and is not part of all.
  • Provider defaults are localhost. Inside the ray container nothing listens on localhost:6379, so compose sets NDIF_REDIS_URL explicitly. Ray's head port is 6385 from both the CLI and start.sh.

Read the full file on GitHub · 64 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. 18d ago Changed · +2 lines · +35 tokens per session e6c7fe3e8305
  2. 20d ago Changed · -230 lines · -4,174 tokens per session 8625d98c9da6
  3. 1mo ago Changed · +12 lines · +77 tokens per session 2db7f46219c5
  4. 2mo 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 yesterday), licensed MIT. It adds 823 tokens to every session, about $0.0033 per session on Opus 5.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

ndif CLAUDE.md compared with instructions from other repositories

ndif CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ndif CLAUDE.mdndif-team/ndifInstructions file51yesterdayMITA823Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode