scaffold-experiment
БесплатноБез исполняемых скриптовНе проверенSet up complete experimental infrastructure for all runs in a designed experiment. Orchestrates parallel generation of fine-tuning configs (via…
Об этом скилле
Scaffold Experiment
You help users automatically set up the complete experimental infrastructure - both fine-tuning and evaluation configurations - for all runs in a designed experiment.
Your Task
Orchestrate the scaffolding process by reading tool specifications from experiment_summary.yaml and launching the appropriate subagents:
- Read experiment_summary.yaml to identify which tools are being used
- Launch the preparation subagent (
scaffold-torchtune) only if at least one run hastype: "fine-tuned"(see "Deciding Which Subagents to Launch" below) - Launch the evaluation subagent (
scaffold-inspect) - Wait for the launched subagent(s) to complete and report their results
This ensures the entire experiment is ready to execute from training through evaluation. When both subagents are launched they run in parallel in separate context windows since their outputs do not depend on one another.
Deciding Which Subagents to Launch
Preparation (training) is only needed for runs that train in this experiment. Eval-only experiments — where every run is a base model (type: "control") or a pre-existing checkpoint (type: "eval-only") — have nothing to fine-tune, so launching scaffold-torchtune would do nothing.
Rule: Launch scaffold-torchtune if and only if at least one run has type: "fine-tuned". Always launch scaffold-inspect.
import yaml
with open(f"{experiment_dir}/experiment_summary.yaml") as f:
config = yaml.safe_load(f)
runs = config.get("runs", []) or []
finetuned_runs = [r for r in runs if isinstance(r, dict) and r.get("type") == "fine-tuned"]
needs_torchtune = len(finetuned_runs) > 0
needs_torchtunetrue: launch both subagents in parallel (one message, two Task calls).needs_torchtunefalse: launchscaffold-inspectalone. Note in the summary and log that torchtune was skipped because the experiment has no fine-tuned runs (it is eval-only).
Post-decision assert (cheap insurance against a silent miss): after deciding, confirm the partition is correct — if needs_torchtune is false, assert that finetuned_runs is genuinely empty before skipping. A wrongly-skipped fine-tuned run would silently lose its training configs and only surface as a failure at run-experiment. If the assert ever trips, do not skip — launch scaffold-torchtune.
Current tool support:
- Preparation: torchtune only (via
scaffold-torchtunesubagent) - Evaluation: inspect-ai only (via
scaffold-inspectsubagent)
Future tool support: This orchestrator is designed to route to different worker subagents based on tool choices documented in experiment_summary.yaml. Future iterations may support additional frameworks.
Dependency version check
Run before proceeding to catch stale envs (user pulled new pins but didn't re-run pip install -e .):
python scripts/check_env.py
- Exit 0: proceed.
- Exit 1: show the printed
STALE ENVtable to the user, ask whether topip install -e .first or continue anyway.
Workflow
- Locate experiment - Find the experiment directory (usually current directory or ask user)
- Verify experiment_summary.yaml exists - Ensure design phase is complete
- Read tool specifications - Parse experiment_summary.yaml to identify preparation and evaluation tools
- Validate tool support - Ensure the specified tools have corresponding worker subagents
- Prepare data (if applicable) - If
data.data_generationblock is present, runsrc/tools/experiment/prepare_data.pyto materialize the declared dataset before subagents launch - Launch preparation and evaluation subagents in parallel - Use Task tool to launch both simultaneously
- Wait for both subagents to complete - Each will report back when done
- Create orchestration log - Document the scaffolding process in
logs/scaffold-experiment.log - Report combined summary - Show user complete status of both scaffolding phases
Finding the Experiment
If user runs skill without arguments:
- Check if current directory contains
experiment_summary.yaml - If not, ask user for the experiment directory path
If user provides a path:
- Use that path as the experiment directory
Verification Before Starting
Before beginning scaffolding, perform minimal structural validation:
experiment_summary.yaml exists:
ls {experiment_dir}/experiment_summary.yamlIf missing, report error and suggest running
design-experimentskill first. DO NOT launch subagents.experiment_summary.yaml is readable:
import yaml with open(f"{experiment_dir}/experiment_summary.yaml") as f: config = yaml.safe_load(f)If unreadable or invalid YAML, report error. DO NOT launch subagents.
Note on validation division:
- Skill validates: Structure only (file existence, readability, tool recognition)
- Agents validate: Domain-sp
Установить scaffold-experiment в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл scaffold-experiment?
Set up complete experimental infrastructure for all runs in a designed experiment. Orchestrates parallel generation of fine-tuning configs (via scaffold-torchtune) and evaluation configs (via scaffold-inspect). Use after design-experiment to prepare configs before running experiments.
Как установить скилл scaffold-experiment?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл scaffold-experiment запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic