heshamfs/materials-simulation-skills/simulation-orchestrator
Claude Code and agent skill by heshamfs/materials-simulation-skills
- community
Checking that the SKILL.md file is still in the repository.
Orchestrate multi-simulation campaigns — generate parameter sweep configurations (grid, linspace, or Latin Hypercube sampling), initialize and track batch job campaigns, monitor job completion status, and aggregate results with summary statistics across all runs. Use when running a parameter study across dt, kappa, or other simulation inputs, managing dozens or hundreds of simulation configurations, combining outputs from completed batch runs to find the best result, or automating the generate-run-collect workflow for systematic studies, even if the user only says "I need to try many parameter combinations" or "how do I organize a sweep."
Install
npx vskill@latest install heshamfs/materials-simulation-skills/simulation-orchestratorSKILL.md
Simulation Orchestrator
Goal
Provide tools to manage multi-simulation campaigns: generate parameter sweeps, track job execution status, and aggregate results from completed runs.
Requirements
- Python 3.10+
- No external dependencies (uses Python standard library only)
- Works on Linux, macOS, and Windows
Inputs to Gather
Before running orchestration scripts, collect from the user:
| Input | Description | Example | |
|---|---|---|---|
| Base config | Template simulation configuration | base_config.json | |
| Parameter ranges | Parameters to sweep with bounds | dt:[1e-4,1e-2],kappa:[0.1,1.0] | |
| Sweep method | How to sample parameter space | grid, lhs, linspace | |
| Output directory | Where to store campaign files | ./campaign_001 | |
| Simulation command | Command to run each simulation | python sim.py --config {config} |
Decision Guidance
Choosing a Sweep Method
| Method | Best For | Sample Count | |
|---|---|---|---|
grid | Low dimensions (1-3), need exact corners | n^d (exponential) | |
linspace | 1D sweeps, uniform spacing | n per parameter | |
lhs | High dimensions, space-filling | user-specified budget |
Campaign Size Guidelines
| Parameters | Grid Points Each | Total Runs | Recommendation | |
|---|---|---|---|---|
| 1 | 10 | 10 | Grid is fine | |
| 2 | 10 | 100 | Grid acceptable | |
| 3 | 10 | 1,000 | Consider LHS | |
| 4+ | 10 | 10,000+ | Use LHS or DOE |
Script Outputs (JSON Fields)
| Script | Output Fields | |
|---|---|---|
scripts/sweep_generator.py | configs, parameter_space, sweep_method, total_runs | |
scripts/campaign_manager.py --action init | campaign_id, total_jobs, config_dir, command_template | |
scripts/campaign_manager.py --action status | campaign_id, status, jobs, progress, total_jobs, created_at | |
scripts/campaign_manager.py --action list | jobs (array of job records) | |
scripts/job_tracker.py | job_id, status, start_time, end_time, exit_code | |
scripts/result_aggregator.py | summary (incl. minimize), statistics, best_run, failed_runs |
Note on swept parameter names:sweep_generator.pywrites each swept value into the base config by key path. A bare name (e.g.kappa) overwrites a top-level key; a dot-notation name (e.g.parameters.kappa) targets a nested key. The swept key path must match where the solver reads the value — sweepingkappaagainst a config that nestsparameters.kappawould add an unused top-level key and silently leave the base value in place. Seereferences/sweep_strategies.md.
Workflow
Step 1: Generate Parameter Sweep
Create configurations for all parameter combinations:
Step 2: Initialize Campaign
Create campaign tracking structure:
Step 3: Track Job Status
Monitor running jobs:
Step 4: Aggregate Results
Combine results from completed runs:
result_aggregator.py minimizes by default: best_run is the run with the lowest metric value (and summary.minimize is true). If higher is better (e.g. yield, accuracy, throughput), pass --maximize so best_run becomes the highest value:
Decision guidance: If higher is better (yield, accuracy, throughput), pass--maximize; otherwise the reportedbest_runis the minimum.
CLI Examples
Conversational Workflow Example
User: I want to run a parameter sweep on dt and kappa for my phase-field simulation. I want to try 5 values of dt between 1e-4 and 1e-2, and 4 values of kappa between 0.1 and 1.0.
Agent workflow:
- Calculate total runs: 5 x 4 = 20 runs
- Generate sweep configurations:
``bash python3 scripts/sweep_generator.py \ --base-config simulation.json \ --params "dt:1e-4:1e-2:5,kappa:0.1:1.0:4" \ --method linspace \ --output-dir ./dt_kappa_sweep \ --json ``
- Initialize campaign:
``bash python3 scripts/campaign_manager.py \ --action init \ --config-dir ./dt_kappa_sweep \ --command "python phase_field.py --config {config}" \ --json ``
- After user runs simulations, aggregate results:
``bash python3 scripts/result_aggregator.py \ --campaign-dir ./dt_kappa_sweep \ --metric interface_width \ --json ``
Error Handling
| Error | Cause | Resolution | |
|---|---|---|---|
Base config not found | Invalid file path | Verify base config file exists | |
Invalid parameter format | Malformed param string | Use format name:min:max:count or name:min:max | |
Output directory exists | Would overwrite | Use --force or choose new directory | |
No completed jobs | No results to aggregate | Wait for jobs to complete or check for failures | |
Metric not found | Result files missing field | Verify metric name in result JSON |
Integration with Other Skills
The simulation-orchestrator works with other simulation-workflow skills:
Typical Combined Workflow
- Use
parameter-optimization/doe_generator.pyto get sample points - Use
simulation-orchestrator/sweep_generator.pyto create configs - Run simulations (user's responsibility)
- Use
simulation-orchestrator/result_aggregator.pyto collect results - Use
parameter-optimization/sensitivity_summary.pyto analyze
Verification checklist
Before trusting a campaign's best_run or summary statistics, record concrete evidence for each item:
- [ ] Confirmed the swept key path actually changed the value the solver reads: opened at least one generated
config_NNNN.jsonand verified the swept parameter (e.g.parameters.kappa) holds the expected value at the expected nesting level, not a duplicate unused top-level key (sweep_generator.pywrites by key path). - [ ] Reconciled job accounting from
result_aggregator.py --json: recordedsummary.total_jobs,summary.completed, andsummary.failed, and confirmedcompleted + failed == total_jobs. Any shortfall means runs were silently skipped (missing result file orextract_metricreturnedNone) and must be investigated, not ignored. - [ ] Confirmed
completed > 0and that the recordedsummary.metricmatches the field the solver actually writes. A typo'd or absent metric makesextract_metricreturnNone, yielding zero completed runs with no error. - [ ] Recorded
summary.minimizeand confirmed it matches the intended direction (default minimize;--maximizefor yield/accuracy/throughput) before quotingbest_run. - [ ] Did NOT treat
job_tracker.py"completed" as physical success: it flags a job completed purely from a result-file's existence and stampsexit_code0 — independently checked the run's real exit status / solver logs for non-zero codes or NaN/Inf output. - [ ] Applied an outlier/sanity check to the metric values (e.g. Tukey 1.5x IQR from
references/aggregation_methods.md) and confirmedbest_run.valueis physically plausible, not a crashed run that emitted a spurious extremum. - [ ] For LHS sweeps, recorded the
--seedused and savedmanifest.json(parameter bounds,total_runs,parameter_space) so the sample set is reproducible.
Common pitfalls & rationalizations
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/simulation-workflow/simulation-orchestrator/SKILL.md
Popularity
- Repository stars
- 40
- Repository forks
- 3
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/heshamfs/materials-simulation-skills/simulation-orchestrator)