light-experiment-coding

light-experiment-coding is a skill for Claude Code, Codex from Light0305/Light-skills. It costs 170 tokens per session (3,305 once invoked), scanned A, original, MIT.

A workflow for turning a fixed research experiment plan into small, test-first, reproducible code. It covers training, preprocessing, evaluation, data lineage, randomness, and protection against information leaking from test data into training.

In plain words
What is it for?
Use it to implement or reproduce experiments, create unit and property-based tests, control seeds and environments, detect train/test leakage, and preserve inputs, outputs, logs, and hashes for later analysis.
Why use it?
It helps ensure that experiments answer the planned question fairly and can be rerun and audited. TDD means test-driven development: writing checks before or alongside the implementation.

Skill for Claude CodeCodex

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 skills/light0305/light-skills/light-experiment-coding
Any agent
npx skills add Light0305/Light-skills --skill light-experiment-coding
Clone the repo
git clone --depth 1 https://github.com/Light0305/Light-skills

Made for: Claude Code, Codex.

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 light-experiment-coding

README.md
[![agentmods](https://agentmods.dev/badge/skills/light0305/light-skills/light-experiment-coding.svg)](https://agentmods.dev/skills/light0305/light-skills/light-experiment-coding)
Your own site
<a href="https://agentmods.dev/skills/light0305/light-skills/light-experiment-coding"><img src="https://agentmods.dev/badge/skills/light0305/light-skills/light-experiment-coding.svg" alt="Measured on agentmods" height="20"></a>
Per session 170 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,305 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.00170 $0.03305
Opus 5 $0.00085 $0.01653
Sonnet 5 $0.00034 $0.00661
Haiku 4.5 $0.00017 $0.00331

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

Security

Grade A, and why

light-experiment-coding 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 5d ago.

The scan reads SKILL.md. This mod also ships 15 executable files (assets/project-scaffold/scripts/boundary_trace.py, assets/project-scaffold/scripts/debug_instrument.sh, assets/project-scaffold/src/example/__init__.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/light-experiment-coding/SKILL.md · 208 lines

How it starts

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

实验编码(stage 6)

任务不是“写出能跑的 notebook”,而是把上游冻结计划逐行实现成可证伪、可复跑、可审计的实验。优先级:

  1. 不改研究问题;
  2. 不让评估信息进入训练;
  3. 能用固定环境与 seed 真复跑;
  4. 保留足够 raw evidence,让 result-analysis 自己重算;
  5. 代码整洁和速度服从以上约束。

先完整阅读 references/experiment-coding-resource-map.md。工具机制见 references/tools.md,TDD/调试红旗见 references/tdd_redflags.mdreferences/debug_protocol.md

入口:冻结输入

开始写码前读取并 hash:

  • question / estimand;
  • experiment matrix 每一行和 fair-comparison 常量;
  • pre-registration 及 provenance;
  • failure-tree report:每条 hypothesis 的 success/failure/inconclusive 分支、guardrail/counter-metric、kill criterion 与 amendment policy;
  • data fixed revision、raw/curated SHA256、lineage、split ID、split_leakage evidence;
  • result-analysis 对 raw run、predictions、metrics、failures、provenance 的消费契约;
  • 当前 git commit 与 dirty state。

primary outcome、comparison family、exclusion、stopping 已冻结。若实现证明计划不可行,带最小复现和影响返回 research-plan,停下让人决策;不得改 config 默认值静默漂移。

实现顺序

1. 建立最小可运行项目

优先复制 assets/project-scaffold/

  • uv.lock + pyproject.tomluv sync --locked --extra dev
  • configs/experiment.schema.json:每个 matrix row 的机读配置;
  • experiment_contracts.py:data/model/metric/preprocessing 最小接口;
  • reproducibility.py:运行期 seed helper;
  • CI/pre-commit/debug 资产。

遵循现有仓库框架和配置格式;不要为一个实验引入付费 IDE、云追踪或私有 key。MLflow/DVC 可选,普通本地文件必须能完成 核心闭环。不可用资源明确写 UNAVAILABLE:原因,不假装通过。

2. 测试先行

在实现 preprocessing/train/eval 前:

  1. 写 gold test,验证人工可算的小答案;
  2. 写 property test(Hypothesis),验证范围、有限性、对称/单调等不变量;
  3. 写 metamorphic test,验证置换/等价变换后的输出关系;
  4. 写 train-only-fit 测试,记录 transformer 只收到训练折;
  5. 亲眼看新测试因缺实现或真实 bug 失败,再写最小实现使其通过。

浮点断言用 pytest.approx / assert_allclose(rtol, atol)。先声明 device、dtype、mixed precision 和容差;NaN/Inf 默认 fail。不要测“随机训练一定达到某个漂亮数”,测确定性边界和可重算事实。

3. 防泄漏实现

  • holdout:先 split,再仅用 train fit/fit_transform,test 只 transform
  • CV/调参:预处理器与模型放进 sklearn Pipeline,每折只 fit training fold;
  • 患者/用户/牧场等实体用 group-aware split,不得跨 train/test;
  • 目标编码、特征选择、PCA、imputation 同样只在训练折 fit;
  • 数据件复核直接复用 data-engineering split_leakage,不重造。

Read the full file on GitHub · 208 lines

Files

What ships with it

32 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 208 lines · 170 tokens per session scan A 2cdad9b18f3c

Subscribe to this mod's changes

light-experiment-coding is a skill published in the GitHub repository Light0305/Light-skills (587 stars, last pushed 2mo ago), licensed MIT. It adds 170 tokens to every session and 3,305 once invoked, about $0.0009 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-30.

Related

Other skills, from other repositories

research-writing

科研论文写作助手,提供 30 个 Prompt 模板覆盖论文写作全流程。 当用户提到:论文写作、润色、翻译、文献综述、摘要、引言、方法章节、回复审稿人、 基金申请、研究计划、学术演讲 PPT、LaTeX 编辑、学术图表、实验结果分析、模拟审稿、 去 AI 味、文献对比、找研究空白、论文大纲时使用。 不要用于:非学术写作、创意写作、博客、商业文案、求职信、小说等场景。.

alfonso0512/research-writing-skill · 136 tokens

anti-defensive-writing-en

Stops defensive writing across the entire paper lifecycle — writing, revising, cutting, and organizing experiments. Treats the paper as a press conference, not a project summary, lab log, or self-audit: identify the single most publishable strength of the work and build the most favorable, complete, and persuasive…

Adkid-Zephyr/anti-defensive-writing-Skill · 138 tokens

anti-defensive-writing

论文写作、修改、压缩和实验组织全流程中阻止【防御性写作】。把论文视为一场学术发布会, 而不是项目总结、实验日志或自我审查报告:识别这项工作最值得发表的价值,围绕它建立 最有利、最完整、最有说服力的叙事。不平均展示、不主动示弱、不写实验流水账、不替审稿人 攻击自己。 触发词:论文润色、论文修改、写摘要、写引言、写结论、压缩论文、rebuttal、回复审稿意见、 组织实验、论文AI味、防御性写作、心虚。.

Adkid-Zephyr/anti-defensive-writing-Skill · 160 tokens

ml-paper-writing

Write publication-ready ML/AI papers for NeurIPS, ICML, ICLR, ACL, AAAI, COLM. Use when drafting papers from research repos, structuring arguments, verifying citations, or preparing camera-ready submissions. Includes LaTeX templates, reviewer guidelines, and citation verification workflows.

OpenLAIR/dr-claw · 65 tokens

ml-paper-writing

Write publication-ready ML/AI papers for NeurIPS, ICML, ICLR, ACL, AAAI, COLM. Use when drafting papers from research repos, conducting literature reviews, finding related work, verifying citations, or preparing camera-ready submissions. Includes LaTeX templates, citation verification workflows, and paper…

Galaxy-Dawn/claude-scholar · 72 tokens

academic-citation

Search, verify, and map citations for CS/AI/ML papers. Produces VERIFIED/UNVERIFIED reference lists with Citation-to-Claim maps and Exemplar Sets. Use when: finding references for a paper section, verifying citation accuracy, building exemplar sets for introduction/related work learning, checking if existing citations…

joshua-zyy/academic-paper-writer · 146 tokens