Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
lingzhi227 avatar

Experiment Code

  • 1.2k installs
  • 255 repo stars
  • Updated February 27, 2026
  • lingzhi227/agent-research-skills

experiment-code is a research skill for runnable experiments tied to atomic claims.

About

The experiment-code skill implements runnable experiments mapped to atomic claims produced by the decomposition stage of agent-research-skills. It specifies directory layout, configuration files, logging of metrics, and reproducibility seeds so results can be cited in paper-assembly drafts. Agents scaffold training or evaluation scripts, benchmark harnesses, and ablation toggles aligned with each hypothesis rather than monolithic notebooks. Failed runs document error context for iteration while preserving traceability from code paths back to the originating atomic claim identifiers.

  • Implements experiments mapped to atomic research claims.
  • Reproducibility via configs, seeds, and structured metric logging.
  • Scaffolds benchmarks and ablation toggles per hypothesis.
  • Traceability from code paths to atomic claim identifiers.
  • Feeds results into paper-assembly manuscript workflows.

Experiment Code by the numbers

  • 1,210 all-time installs (skills.sh)
  • +33 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #278 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
From the docs

What experiment-code says it does

experiment code
SKILL.md
npx skills add https://github.com/lingzhi227/agent-research-skills --skill experiment-code

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.2k
repo stars255
Security audit2 / 3 scanners passed
Last updatedFebruary 27, 2026
Repositorylingzhi227/agent-research-skills

How do I implement code for this decomposed research experiment?

Implement experiment code tied to atomic research claims and evaluation metrics.

Who is it for?

Researchers executing benchmarks and ablations after atomic decomposition.

Skip if: Skip when no evaluation code is needed for the research task.

When should I use this skill?

User implements experiments, benchmarks, or ablations from research plans.

What you get

Reproducible experiment scripts with logged metrics linked to atomic claims.

  • perform_experiments loop implementation
  • Retry prompts from truncated stderr
  • Completed experiment run artifacts

By the numbers

  • Default loop uses MAX_ITERS=4 fix attempts per run and MAX_RUNS=5 experiment runs
  • Truncates stderr output to 1500 characters before retry prompts

Files

SKILL.mdMarkdownGitHub ↗

Experiment Code

Generate and iteratively improve ML experiment code for research papers.

Input

  • $0 — Task: generate, improve, debug, plot
  • $1 — Research plan, idea description, or error message

References

  • Experiment prompts and patterns: ~/.claude/skills/experiment-code/references/experiment-prompts.md
  • Code patterns (error handling, repair, hill-climbing): ~/.claude/skills/experiment-code/references/code-patterns.md

Action: generate

Generate initial experiment code following this structure:

1. Plan experiments first — List all runs needed (hyperparameter sweeps, ablations, baselines) 2. Write self-contained code — All code in project directory, no external imports from reference repos 3. Include proper logging — Save results to JSON, print intermediate metrics 4. Generate figures — At minimum Figure_1.png and Figure_2.png

Mandatory Structure

project/
├── experiment.py      # Main experiment script
├── plot.py            # Visualization script
├── notes.txt          # Experiment descriptions and results
├── run_1/             # Results from run 1
│   └── final_info.json
├── run_2/
└── ...

Constraints

  • No placeholder code (pass, ..., raise NotImplementedError)
  • Must use actual datasets (not toy data unless explicitly requested)
  • PyTorch or scikit-learn preferred (no TensorFlow/Keras)
  • Each run uses: python experiment.py --out_dir=run_i

Action: improve

Improve existing experiment code: 1. Read current code and results 2. Reflect on what worked and what didn't 3. Apply targeted edits (prefer small edits over full rewrites) 4. Re-run and compare scores 5. Keep the best-performing code variant

Action: debug

Fix experiment code errors: 1. Read the error message (truncate to last 1500 chars if very long) 2. Identify the root cause 3. Apply minimal fix 4. Up to 4 retry attempts before changing approach

Action: plot

Generate publication-quality plots from experiment results: 1. Read all run_*/final_info.json files 2. Generate comparison plots with proper labels 3. Use the figure-generation skill for styling

Rules

  • Always plan experiments before writing code
  • After each run, document results in notes.txt
  • Include print statements explaining what results show
  • Method MUST not get 0% accuracy — verify accuracy calculations
  • Use seeds for reproducibility
  • Before each experiment include a print statement explaining exactly what the results are meant to show

Related Skills

  • Upstream: experiment-design, algorithm-design
  • Downstream: data-analysis, backward-traceability
  • See also: code-debugging, paper-to-code

Related skills

Forks & variants (2)

Experiment Code has 2 known copies in the catalog totaling 12 installs. They canonicalize to this original listing.

How it compares

Use experiment-code for multi-run scientific retry orchestration; use simpler debug skills for single-shot compile or test failures.

FAQ

What inputs does it expect?

Atomic claims and metrics from the atomic-decomposition skill.

How is reproducibility handled?

Configuration files, seeds, and structured metric logging per experiment.

Where do results go?

Logged metrics feed paper-assembly manuscript sections.

Is Experiment Code safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.