agentleFS
psu-efdpsu-efd/pyHMT2D/.agents/skills/hmt-monte-carlo/SKILL.md

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.

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
  1. Distinctive:

    Run Monte Carlo uncertainty analysis on a hydraulic model.

    line 6
  2. Very specific:

    If not, ask the user to run /hmt-open pointing to base_case/<project_file>.

    line 16
  3. Distinctive:

    Compute statistics: Ask for observation point coordinates if the user wants point statistics.

    line 59

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Check that a project is open. If not, ask the user to run /hmt-open pointing to base_case/<project_file>.
  2. Show available materials.
    hmt-cli get_materials
  3. 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
  4. Build validated parameter specifications.
    hmt-cli build_param_specs --args '{"specs": [
      {"type": "manning_n", "material_name": "<name>", "distribution": "truncated_normal",
       "mean": <mean>, "std": <std>, "min": <min>, "max": <max>},
      ...
    ]}'
    Confirm the distributions with the user.
  5. Ask for MC settings: number of samples (50–200), random seed (default 42), output directory (default ./mc_runs), parallel processes (default 1).
  6. Generate samples.
    hmt-cli generate_mc_samples --args '{"param_specs": <specs>, "n_samples": <N>, "random_seed": <seed>, "output_csv": "mc_samples.csv"}'
    Show a preview of the first 5 sample rows.
  7. Run Monte Carlo simulations.
    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>"}'
    Periodically show progress while waiting:
    tail -20 mc_progress.log
  8. Report: successful/failed runs, results JSON path.
  9. Compute statistics. Ask for observation point coordinates if the user wants point statistics.
    hmt-cli get_mc_statistics --args '{"results_json": "<path>", "observation_points": [{"name": "<name>", "x": <x>, "y": <y>}], "exceedance_probabilities": [99, 90, 50, 10, 1]}'
    Present exceedance table: Point | P99 | P90 | P50 | P10 | P1
  10. Report the spatial exceedance VTK path for ParaView visualization.

Troubleshooting:

  • Many failed cases → check pyHMT2D.log
  • Variable detection fails → pass "variable": "<name>" explicitly

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.