T1Prep: Instructions file for Claude Code

CLAUDE.md

T1Prep CLAUDE.md is an instructions file for Claude Code from ChristianGaser/T1Prep. It costs 2,743 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for T1Prep, a Python pipeline that prepares and segments T1-weighted MRI scans, including correction, lesion detection, and surface reconstruction.

In plain words
What is it for?
Use it when developing, reviewing, testing, or routing work in the T1Prep codebase.
Why use it?
It defines the required order for security, performance, and style work, along with project commands and background-execution rules.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/christiangaser/t1prep/claude-md"><img src="https://agentmods.dev/badge/instructions/christiangaser/t1prep/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,743 This file is loaded in full into every session.
When invoked 2,743 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.02743 $0.02743
Opus 5.5 $0.01097 $0.01097
Sonnet 5.5 $0.00549 $0.00549
Haiku 4.5 $0.00274 $0.00274

Measured 9d ago against content hash 0c371c3f5931, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

T1Prep 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 9d 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 · 195 lines

How it starts

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

CLAUDE.md – T1Prep Project

For full contributor documentation see Agents.md.

Sub-Agent Routing Rules

  • Use sub-agents freely: delegate self-contained work (exploration, research, porting or reviewing separate modules, long validation runs) to sub-agents, and run independent ones in parallel.
  • Dependencies: a task that needs another task's output waits for it.
  • Reviews: security, performance and style checks are independent and may run in parallel; merge their findings before changing code.
  • No shared state: parallel agents never edit the same files or share a build directory -- give each its own files (or a git worktree) and its own build/scratch directory.

Background Execution Rules

Run in background automatically:

  • Web research and documentation lookups
  • Codebase exploration and analysis
  • Security audits and performance profiling
  • Any task where results aren't immediately needed
  • Research or analysis tasks (not file modifications)
  • Results aren't blocking your current work

Overview

T1Prep is a Python-based pipeline for preprocessing and segmenting T1-weighted MRI data (bias-field correction, segmentation, lesion detection, cortical surface reconstruction, CAT12 integration). Code lives in src/, helper/dev scripts in scripts/, Flask web UI in src/t1prep/webui/.

Entry points are installed into the environment's bin/ (the canonical way to run T1Prep): T1Prep (bash orchestrator), PyCAT (symlink to T1Prep; same CLI, PyCAT startup banner), t1prep-ui, t1prep-run (Python single-subject), CAT_SurfView, CAT_VolView, CAT_PlotHistogram, t1prep-make-apps, t1prep-download-models, t1prep-bbreg. The scripts/ folder is a source-tree/dev fallback and should not be put on PATH.

Key Commands

# CLI (from <venv>/bin on PATH; or ./scripts/T1Prep in a source checkout)
T1Prep --help
T1Prep --out-dir /tmp/out file.nii.gz

# Python API
from t1prep import run_t1prep

# Web UI
t1prep-ui --port 5050

# Sanity check
python -m compileall src

# Tests
pytest

# Voxel-wise volume differences to the first image (cat_stat_diff via CAT_VolCalc)
CAT_VolDiff [--rel] [--glob] tp1.nii.gz tp2.nii.gz

# Recalibrate the QA rating bounds from a processed BrainWeb Phantom set
python scripts/qa_calibrate.py /path/to/BWP/report

# Networks (src/t1prep/nn): backend per run, export (re)trained weights as safetensors
T1Prep --nn-backend tinygrad ...          # default torch (nn_backend in the defaults file, T1PREP_NN_BACKEND); tinygrad: pip install 'T1Prep[tinygrad]'
python -m t1prep.nn.convert model.pth --out-dir DIR

# Histogram of volumes, surfaces or text data (CAT12's cat_plot_histogram.m)
CAT_PlotHistogram [--dist kernel|gaussian_kde|none|normal|...] [--mean] [--ridgeline] [--save PREFIX] file...

# Longitudinal: rigid realignment, then the low-dimensional ageing deformation
./scripts/process_longitudinal.sh --long-model ageing tp1.nii.gz tp2.nii.gz
./scripts/warp_longitudinal.sh --inputs tp1.nii.gz tp2.nii.gz --out-dir DIR
./scripts/modulate_longitudinal.sh --mri-dirs D1 D2 --names tp1 tp2 --out-dir DIR

# Score the spherical registration against the Mindboggle-101 manual labels
python evaluation/tools/eval_mindboggle.py project --mindboggle DIR... --t1prep DIR --work DIR
python evaluation/tools/eval_mindboggle.py dice --work DIR --protocol both

# Accuracy against the simulated phantom (manual, ~15 min): run, then check the pins
make phantom                     # = eval_phantom.py run + check in /tmp/T1Prep_phantom
make phantom-check PHANTOM_DIR=DIR
make phantom-pin                 # re-pin after an intended change (two devices, ~30 min)
make phantom-wmh                 # WMH over the 14 simulations in evaluation/data/phantom (~1 h)
python evaluation/tools/fit_wmh_calibration.py fit --work DIR  # refit WMH_CALIBRATION (after dump)

Read the full file on GitHub · 195 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. 9d ago Changed · +11 tokens per session 0c371c3f5931
  2. 10d ago Changed · -6 lines · +79 tokens per session 22ab90f079f9
  3. 15d ago Changed · +5 lines · +51 tokens per session d793f26cc5e9
  4. 17d ago Changed · +35 tokens per session f3ffd025ef79
  5. 24d ago Changed · +1 lines · +74 tokens per session fca2b20fcdf9
  6. 25d ago Changed · +2 lines · +40 tokens per session 51f6f53ef316
  7. 28d ago Changed · +11 tokens per session 30ad266c7ba4
  8. 1mo ago Changed · +5 lines · +130 tokens per session 0eac972f4f2a
  9. 1mo ago Changed · +7 lines · +120 tokens per session 981d164b2d6e
  10. 1mo ago First seen · 181 lines · 2,192 tokens per session scan A 5019a8936675

Subscribe to this mod's changes

T1Prep CLAUDE.md is an instructions file published in the GitHub repository ChristianGaser/T1Prep (10 stars, last pushed 7d ago), licensed Apache-2.0. It adds 2,743 tokens to every session, about $0.0110 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-31.

Related

T1Prep CLAUDE.md compared with instructions from other repositories

T1Prep CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
T1Prep CLAUDE.mdChristianGaser/T1PrepInstructions file107d agoApache-2.0A2,743Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,086GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot