hmt-monte-carlo
Skill132 starsChanged 8 months agoMITView on GitHub
Run Monte Carlo uncertainty analysis on a hydraulic model by sampling parameters from statistical distributions and computing exceedance probabilities. Use this when the user wants uncertainty analysis, Monte Carlo simulation, or probabilistic results.
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/calibration-parametric.mdcCursor rule
- .cursor/rules/cli-usage.mdcCursor rule
- .cursor/rules/hydraulic-models.mdcCursor rule
- .cursor/rules/project-overview.mdcCursor rule
- hmt-calibrateSkill
- hmt-convertSkill
- hmt-exportSkill
- hmt-modifySkill
- hmt-monte-carloSkill
- hmt-openSkill
- hmt-resultsSkill
- hmt-runSkill
- hmt-statusSkill
- hmt-calibrateSkill
- hmt-convertSkill
- hmt-exportSkill
- hmt-modifySkill
- hmt-openSkill
- hmt-resultsSkill
- hmt-runSkill
- hmt-statusSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 6
Run Monte Carlo uncertainty analysis on a hydraulic model.
- Very specific: line 16
If not, ask the user to run /hmt-open pointing to base_case/<project_file>.
- Distinctive: line 59
Compute statistics: Ask for observation point coordinates if the user wants point statistics.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Run Monte Carlo uncertainty analysis on a hydraulic model.
Prerequisites
- Project in a
base_case/subdirectory - Parameter uncertainty distributions defined by user
- Solver paths configured in
hmt_config.json
Steps
- Check that a project is open.
If not, ask the user to run
/hmt-openpointing tobase_case/<project_file>. - Show available materials.
hmt-cli get_materials - Ask the user for uncertain parameters. For each:
- Material name or BC ID
- Distribution:
"truncated_normal"(default) or"uniform" - For
truncated_normal: mean, std, min, max - For
uniform: min, max
- Build validated parameter specifications.
Confirm the distributions with the user.hmt-cli build_param_specs --args '{"specs": [ {"type": "manning_n", "material_name": "<name>", "distribution": "truncated_normal", "mean": <mean>, "std": <std>, "min": <min>, "max": <max>}, ... ]}' - Ask for MC settings: number of samples (50–200), random seed (default 42),
output directory (default
./mc_runs), parallel processes (default 1). - Generate samples.
Show a preview of the first 5 sample rows.hmt-cli generate_mc_samples --args '{"param_specs": <specs>, "n_samples": <N>, "random_seed": <seed>, "output_csv": "mc_samples.csv"}' - Run Monte Carlo simulations.
Periodically show progress while waiting:hmt-cli run_monte_carlo --args '{"base_case_dir": "./base_case", "param_specs": <specs>, "n_samples": <N>, "n_processes": <procs>, "random_seed": <seed>, "sample_csv": "mc_samples.csv", "delete_cases": true, "output_dir": "<output_dir>"}'tail -20 mc_progress.log - Report: successful/failed runs, results JSON path.
- Compute statistics. Ask for observation point coordinates if the user wants point statistics.
Present exceedance table: Point | P99 | P90 | P50 | P10 | P1hmt-cli get_mc_statistics --args '{"results_json": "<path>", "observation_points": [{"name": "<name>", "x": <x>, "y": <y>}], "exceedance_probabilities": [99, 90, 50, 10, 1]}' - Report the spatial exceedance VTK path for ParaView visualization.
Troubleshooting:
- Many failed cases → check
pyHMT2D.log - Variable detection fails → pass
"variable": "<name>"explicitly
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

