clax CLAUDE.md

clax CLAUDE.md is an instructions file for coding agents 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

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

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.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.svg" alt="Measured on agentmods" 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. 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.05537 $0.05537
Opus 5 $0.02769 $0.02769
Sonnet 5 $0.01107 $0.01107
Haiku 4.5 $0.00554 $0.00554

Measured yesterday against content hash 8097be7bde5e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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. yesterday Changed · +28 lines · +427 tokens per session 8097be7bde5e
  2. 5d 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 today), licensed MIT. It adds 5,537 tokens to every session, about $0.0277 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

bio-gene-to-reference-tree copilot-instructions.md

Copilot instructions for Hongda-Zhao/bio-gene-to-reference-tree, a project described as: Auditable agent skill for resolving protein queries, selecting references, and planning reproducible phylogenetic trees.

Hongda-Zhao/bio-gene-to-reference-tree · 105 tokens

braina GEMINI.md

Instructions for brainets/braina, covering project: braina (brain interaction analysis), 1. project context & purpose, 2. commands, verify environment (all core dependencies) and run the verification test suite for frites + hoi.

brainets/braina · 1,269 tokens

research-automation CLAUDE.md

Instructions for lucafusarbassini/research-automation, covering ricet - research automation framework, project overview, claude-flow mcp, workflow habits and file organization.

lucafusarbassini/research-automation · 904 tokens

shannon-prover CLAUDE.md

Claude Code instructions for SkyShannonProver/shannon-prover, covering shannon prover: claude entry point, current boundary, easycrypt environment, eval safety and current documentation.

SkyShannonProver/shannon-prover · 586 tokens

SciCrucible CLAUDE.md

Claude Code instructions for Xinyang-Li666/SciCrucible, covering 科学知识库, 知识库结构, 可用命令, 项目目录 and 工作原则.

Xinyang-Li666/SciCrucible · 1,107 tokens

torchcell CLAUDE.md

Claude Code instructions for Mjvolk3/torchcell, covering vision -- the virtual cell (north star), for local configs, git worktrees, programming guide and provenance & reproducibility.

Mjvolk3/torchcell · 12,957 tokens