experiment-preflight

experiment-preflight is a command for Claude Code from Zayne-sprague/Dr-Claude-Code. It costs 22 tokens per session (1,001 once invoked), scanned A, original, MIT.

A pre-run review for experiments that use computing resources such as GPUs. It checks the experiment files and prepares a risk review before a job is submitted.

In plain words
What is it for?
Use it to create or update a red-team brief, request an independent review of the experiment design, and propose a small canary job to validate the setup.
Why use it?
It helps catch bugs, incorrect settings, memory problems, and weak evaluation plans before they waste compute time.

Command for Claude Code

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 commands/zayne-sprague/dr-claude-code/experiment-preflight
Clone the repo
git clone --depth 1 https://github.com/Zayne-sprague/Dr-Claude-Code

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 experiment-preflight

README.md
[![agentmods](https://agentmods.dev/badge/commands/zayne-sprague/dr-claude-code/experiment-preflight.svg)](https://agentmods.dev/commands/zayne-sprague/dr-claude-code/experiment-preflight)
Your own site
<a href="https://agentmods.dev/commands/zayne-sprague/dr-claude-code/experiment-preflight"><img src="https://agentmods.dev/badge/commands/zayne-sprague/dr-claude-code/experiment-preflight.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,001 The whole file, excluding the scripts and references it only reads on demand.
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.00022 $0.01001
Opus 5 $0.00011 $0.00500
Sonnet 5 $0.00004 $0.00200
Haiku 4.5 $0.00002 $0.00100

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

Security

Grade A, and why

experiment-preflight 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 4d 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/commands/raca/experiment-preflight.md · 88 lines

How it starts

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

Experiment Pre-flight

Run this before submitting any job that uses compute. It ensures the experiment won't waste GPU hours on bugs, bad configs, or flawed designs.

The experiment name is provided as the argument. If not provided, ask for it.

Step 1: Locate experiment files

Read:

  • notes/experiments/$EXPERIMENT/experiment.yaml
  • notes/experiments/$EXPERIMENT/red_team_brief.md (may not exist yet)
  • The experiment code referenced in experiment.yaml

If experiment.yaml doesn't exist, create the experiment folder first (use the experiment-management skill).

Step 2: Red Team Brief

If red_team_brief.md doesn't exist, create it now by reviewing the experiment design. The brief should cover:

  • What could go wrong (truncation, wrong eval metric, bad prompt format, OOM, etc.)
  • How to validate that results are real
  • What a canary job should check

If it already exists and the experiment has changed since it was written, update it.

Step 3: Adversarial review

Dispatch a fresh red-team-reviewer subagent. It must NOT receive the design conversation — only the files. This prevents sunk-cost bias.

The reviewer checks:

  • Every concern in the Red Team Brief — does the code actually handle it?
  • max_tokens, temperature, n_samples — will they produce meaningful results?
  • Checkpointing enabled for long jobs?
  • Evaluator/reward function matches what the hypothesis needs?
  • Output format compatible with HF upload and the dashboard?
  • No python -c "import X" || pip install patterns in sbatch scripts — these hang on GPU nodes due to CUDA init. Use pip install --quiet directly.
  • vLLM jobs must set VLLM_WORKER_MULTIPROC_METHOD=spawn before any Python runs — prevents "Cannot re-initialize CUDA in forked subprocess" crash.
  • No HF uploads in the same process as vLLM — push_dataset_to_hub kills EngineCore. Must use subprocess isolation.
  • HF_ORG in sbatch must be the upload org, not the source org — if the experiment downloads models from org A but uploads results to org B, these must be separate variables.

Read the full file on GitHub · 88 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. 4d ago First seen · 88 lines · 22 tokens per session scan A 1897d52fb681

Subscribe to this mod's changes

experiment-preflight is a command published in the GitHub repository Zayne-sprague/Dr-Claude-Code (5 stars, last pushed 5mo ago), licensed MIT. It adds 22 tokens to every session and 1,001 once invoked, about $0.0001 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-31.