Install
openclaw skills install science-sim-authorGenerate self-contained interactive science simulations as a single index.html from a SimSpec YAML or JSON. Use when the user asks for physics, chemistry, bi...
openclaw skills install science-sim-authorGenerate one self-contained index.html that runs offline, renders a STEM simulation on a 2D canvas, exposes model parameters as sliders, plots a time series, and includes an inquiry worksheet.
Accept a SimSpec in YAML or JSON with:
id, title, domainstate, params, initial, equations, outputslevel, dt, worksheet, success_criteriaValidate against templates/sim_spec_schema.json before generating anything.
index.html.<style> and all JS in <script>.simCanvas, plotCanvas, runToggle, stepBtn, resetBtn, dtSlider, paramControls, readouts, statusBanner, worksheet, copyJsonBtn, downloadCsvBtn.dt is missing, use default=0.01, min=0.001, max=0.05.step, derive step=(max-min)/100 with sensible rounding.dx, dy, dvx, dvy, dq, dvc to canonical d<stateName> keys before generating JS.t plus every state variable in state order.mechanics + state includes x and y -> trajectory2dmechanics + state includes x and v -> oscillator1delectromagnetism + state includes q or vc -> circuit_rcindex.html.Populate these mustache variables:
sim_id, sim_title, domain, level, renderer_kindstate_json, params_json, initial_json, equations_json, outputs_jsonworksheet_json, success_criteria_json, readout_fields_jsondt_default, dt_min, dt_maxmodel_step_logic_js, scene_draw_js, readout_map_jsExpectations:
model_step_logic_js must return a derivative object without using eval or Function.scene_draw_js and readout_map_js may be no-ops; use return []; for an empty readout override.requestAnimationFrame.NaN or Infinity.outputs; if multiple plots are supplied, use the first one for the visible plot and keep the rest only as metadata.Apply rubrics/security_notes.md strictly.