experiment

An experiment command for NanoResearch that prepares a Python environment, creates runnable code from an experiment plan, and runs it.

In plain words
What is it for?
Use it to turn an experiment blueprint into an executable research experiment, install its Python dependencies, prepare data, and run the experiment.
Why use it?
It combines setup, code generation, and execution in one workflow, so you do not have to perform those stages separately. It also checks for the required research files before starting.

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/openraiser/nanoresearch/experiment
Clone the repo
git clone --depth 1 https://github.com/OpenRaiser/NanoResearch

Made for: Claude Code.

Per session 0 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,023 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.00000 $0.01023
Opus 5 $0.00000 $0.00511
Sonnet 5 $0.00000 $0.00205
Haiku 4.5 $0.00000 $0.00102

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

Security

Grade A, and why

experiment 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 3d 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/experiment.md · 135 lines

How it starts

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

Experiment — Setup + Code Generation + Execution

You are the Experiment Agent for NanoResearch. This command combines the Setup, Coding, and Execution stages. You will generate runnable experiment code and execute it.

Input

$ARGUMENTS — workspace path (optional). If not provided, use the most recent workspace under ~/.nanoresearch/workspace/research/.

Prerequisites

Read:

  • {workspace}/papers/ideation_output.json
  • {workspace}/plans/experiment_blueprint.json

If the blueprint doesn't exist, tell the user to run /project:planning first.

Process

Phase 1: Setup (update manifest: setup → running)

  1. Environment setup: Create a Python environment for the experiment:

    cd {workspace}/experiment
    python -m venv .venv
    source .venv/bin/activate
    
  2. Dependency analysis: Based on the blueprint, determine required packages:

    • Deep learning framework (torch/tensorflow/jax)
    • Data processing (pandas, numpy, scikit-learn)
    • Domain-specific libraries
    • Evaluation libraries
  3. Write requirements.txt to {workspace}/experiment/requirements.txt

  4. Install dependencies:

    pip install -r requirements.txt
    
  5. Dataset preparation: Download or prepare datasets specified in the blueprint.

    • Use WebSearch to find download links if needed
    • Write download/preprocessing scripts

Update manifest: setup → completed. Write {workspace}/plans/setup_output.json with environment details.

Phase 2: Coding (update manifest: coding → running)

Generate the experiment code in {workspace}/experiment/:

  1. config.py — Experiment configuration (hyperparameters, paths, dataset config)

  2. data.py — Data loading and preprocessing:

    • Dataset class(es) for each dataset in the blueprint
    • Train/val/test split handling
    • Data augmentation if applicable
  3. model.py — Model implementations:

    • Proposed method
    • Each baseline method
    • Shared components (encoder, decoder, etc.)

Read the full file on GitHub · 135 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. 3d ago First seen · 135 lines · 0 tokens per session scan A 480eb20ac0c0

Subscribe to this mod's changes

experiment is a command published in the GitHub repository OpenRaiser/NanoResearch (1,361 stars, last pushed 8d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,023 tokens. 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.