Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

scaffold-experiment

БесплатноБез исполняемых скриптовНе проверен

Set up complete experimental infrastructure for all runs in a designed experiment. Orchestrates parallel generation of fine-tuning configs (via…

niznik-devот niznik-dev★ 15 звёзд на GitHub6 установок в других каталогах

Об этом скилле

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:

  1. Read experiment_summary.yaml to identify which tools are being used
  2. Launch the preparation subagent (scaffold-torchtune) only if at least one run has type: "fine-tuned" (see "Deciding Which Subagents to Launch" below)
  3. Launch the evaluation subagent (scaffold-inspect)
  4. 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_torchtune true: launch both subagents in parallel (one message, two Task calls).
  • needs_torchtune false: launch scaffold-inspect alone. 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-torchtune subagent)
  • Evaluation: inspect-ai only (via scaffold-inspect subagent)

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 ENV table to the user, ask whether to pip install -e . first or continue anyway.

Workflow

  1. Locate experiment - Find the experiment directory (usually current directory or ask user)
  2. Verify experiment_summary.yaml exists - Ensure design phase is complete
  3. Read tool specifications - Parse experiment_summary.yaml to identify preparation and evaluation tools
  4. Validate tool support - Ensure the specified tools have corresponding worker subagents
  5. Prepare data (if applicable) - If data.data_generation block is present, run src/tools/experiment/prepare_data.py to materialize the declared dataset before subagents launch
  6. Launch preparation and evaluation subagents in parallel - Use Task tool to launch both simultaneously
  7. Wait for both subagents to complete - Each will report back when done
  8. Create orchestration log - Document the scaffolding process in logs/scaffold-experiment.log
  9. 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:

  1. experiment_summary.yaml exists:

    ls {experiment_dir}/experiment_summary.yaml
    

    If missing, report error and suggest running design-experiment skill first. DO NOT launch subagents.

  2. 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
Полный SKILL.md на GitHub

Установить scaffold-experiment в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

evaluators/inspect_agent.mdlogging.mdoptimizers/torchtune_agent.mdparsing.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить scaffold-experiment с