Skip to main content
skill CX Codex

experiment-code — Claude Code skill: ML experiment code

Writes and iterates on ML experiment code for a research paper: training, evaluation, debugging, plots. Useful when you need a batch of runs and a comparison.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add lingzhi227/agent-research-skills --skill experiment-code -a claude-code
Open on GitHub

What experiment-code does

The skill has four actions. generate plans every run first — hyperparameter sweeps, ablations, baselines — then writes self-contained code inside the project directory, with no imports from reference repos. improve reads the current code and results, makes targeted edits, and keeps the best-scoring variant. debug reads the error message and applies a minimal fix, up to 4 retries before switching approach. plot pulls numbers from run_*/final_info.json and builds publication figures.

The project layout is fixed: experiment.py, plot.py, notes.txt, and run_1, run_2 folders holding final_info.json. Each run goes through python experiment.py --out_dir=run_i. Placeholder code such as pass or raise NotImplementedError is off the table, and the data has to be real rather than toy. PyTorch or scikit-learn are the preferred frameworks.

A few rules catch people out. The method must not land at 0% accuracy, so accuracy calculations get checked — a zero usually means a bug, not a failed idea. Seeds are required for reproducibility. Before each experiment the code needs a print statement saying what the results are supposed to show. One more thing for long logs: the error message is truncated to the last 1500 characters.

What it helps with

  • plan a run set: sweeps, ablations, baselines
  • generate a training and evaluation pipeline in one directory
  • fix a crashing experiment from the error text
  • raise the score of a working model with small edits
  • build comparison plots from run results

Example prompts for the agent

  • /experiment-code generate — build the training and evaluation pipeline for my experiment plan
  • /experiment-code debug — here is the error, find the cause and fix it minimally
  • /experiment-code improve — read the current code and results, propose edits and rerun

How to install experiment-code

1Skills CLI (Vercel)

npx skills add lingzhi227/agent-research-skills --skill experiment-code -a claude-code

2Manually: put the files in place

~/.claude/skills/experiment-code/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/experiment-code/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about experiment-code

How do I install experiment-code in Claude?

Run npx skills add lingzhi227/agent-research-skills --skill experiment-code -a claude-code. The skill file then lands at ~/.claude/skills/experiment-code/SKILL.md.

What does experiment-code do?

It generates ML experiment code, improves it across runs, debugs errors, and produces plots. It targets experiments for a research paper.

Which frameworks does it support?

PyTorch or scikit-learn are preferred. TensorFlow and Keras are not used.

Similar skills

Everything for AI and ML →

From the same set23

idea-generation A skill that generates research ideas, refines them over several rounds and checks novelty against the literature. Useful before you commit to a paper topic. CX Codex +1 1,800installs rebuttal-writing Turns reviewer comments on a paper into a structured, point-by-point rebuttal backed by evidence from the manuscript. CX Codex +1 1,700installs code-debugging Structured error analysis for ML experiments and research code. It categorizes tracebacks, limits retry cycles, and explains fixes line by line. CX Codex +1 1,700installs symbolic-equation Discovers scientific equations from numerical datasets using LLM-guided evolutionary search. Useful for symbolic regression and extracting interpretable physical laws. CX Codex +1 1,600installs paper-to-code Turns an ML research paper into a runnable code repository. Useful when reproducing published experiments and models without manual scaffolding. CX Codex +1 1,600installs atomic-decomposition Splits a research idea into atomic concepts, then finds the math formula in papers and the matching code for each one. CX Codex +1 1,600installs paper-compilation Compiles a LaTeX paper to PDF, catches build errors and checks citations and references. Useful when pdflatex throws errors and the log is a mess. CX Codex +1 1,600installs slide-generation Turns a completed LaTeX paper into Beamer presentation slides or a poster. It helps researchers prepare talks and poster sessions directly from paper source files. CX Codex +1 1,600installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor