clax: Instructions file for Claude Code

CLAUDE.md

clax CLAUDE.md is an instructions file for Claude Code from smsharma/clax. It costs 5,537 tokens per session, scanned A, original, MIT.

A project guide for developing Clax, a differentiable reimplementation of the CLASS scientific code, with rules for a high-performance computing environment and GPU-based work.

In plain words
What is it for?
It helps an agent find relevant source files, run diagnostics and tests on a V100 GPU, and follow the project's development rules.
Why use it?
It prevents unsafe filesystem searches, use of the wrong source paths, and incorrect GPU or test commands.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths.

This is smsharma/clax's own configuration. It tells Claude Code how to work on clax 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 clax configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is cd ../class_public-3.3.4 && pip install ..

Reuse

Borrowing it

Nothing to install: this file belongs to smsharma/clax. 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/smsharma/clax/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/smsharma/clax

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/smsharma/clax/claude-md/github.svg)](https://agentmods.dev/instructions/smsharma/clax/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/smsharma/clax/claude-md"><img src="https://agentmods.dev/badge/instructions/smsharma/clax/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 clax CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/smsharma/clax/claude-md"><img src="https://agentmods.dev/badge/instructions/smsharma/clax/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,537 This file is loaded in full into every session.
When invoked 5,537 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.05537 $0.05537
Opus 5.5 $0.02215 $0.02215
Sonnet 5.5 $0.01107 $0.01107
Haiku 4.5 $0.00554 $0.00554

Measured 2mo ago against content hash 8097be7bde5e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

clax 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 2mo 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 · 522 lines

How it starts

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

clax Development Guide

CRITICAL: HPC environment rules

Filesystem

  • NEVER use find /, find /ocean, or scan outside the project directory. The HPC filesystem has millions of files and these commands will hang forever.
  • Reference CLASS source: ../class_public-3.3.4/ — ALWAYS use this path. Key files: source/perturbations.c, source/transfer.c, source/harmonic.c, source/thermodynamics.c, source/background.c
  • GPU diagnostic scripts: diags/ — reusable standalone scripts for targeted accuracy investigation (C_l convergence, perturbation var comparison, x_e oracle injection, source decomposition, timing). See diags/README.md.
  • Project root: the current working directory (use . or relative paths)
  • Only search within . and ../class_public-3.3.4/
  • Use grep or Grep to search file contents — never find with broad paths.

GPU access

You are running directly on a GPU compute node (V100-32GB). Run python and pytest directly — no wrapper needed:

python scripts/gpu_planck_test.py
pytest tests/ --fast -x -q

Do NOT use gpu-run.sh — that was for login-node use only.

What is this?

A fully differentiable reimplementation of the CLASS Boltzmann solver in JAX. Full architecture and physics details are in DESIGN.md. This file covers development instructions and conventions.

Quick reference

  • Reference CLASS: ../class_public-3.3.4/
  • Design document: DESIGN.md (read this first)
  • Progress log: CHANGELOG.md

Current performance (Mar 14, 2026)

Two presets for different use cases:

Preset Total (cached) GPU Accuracy Use case
fit_cl 34s V100 TT/EE < 1.5% at l≤500 HMC / fitting
planck_cl ~487s H100 TT/EE < 0.2% at l≤2000 Science-grade

fit_cl uses 20 k/decade, l_max=17, table-based Bessel (harmonic in 2.4s), ncdm_q_size=0, rtol=1e-3, max_steps=1024. Perturbation ODE at ~30s is the floor.

Read the full file on GitHub · 522 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. 2mo ago Changed · +28 lines · +427 tokens per session 8097be7bde5e
  2. 2mo ago First seen · 494 lines · 5,110 tokens per session scan A 1d79be5c387d

Subscribe to this mod's changes

clax CLAUDE.md is an instructions file published in the GitHub repository smsharma/clax (60 stars, last pushed 16d ago), licensed MIT. It adds 5,537 tokens to every session, about $0.0221 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

clax CLAUDE.md compared with instructions from other repositories

clax CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
clax CLAUDE.mdsmsharma/claxInstructions file6016d agoMITA5,537Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot