swmm-runnerlisted
Install: claude install-skill Zhonghao1995/agentic-swmm-workflow
# SWMM Runner (CLI-first)
## What this skill provides
- Deterministic execution wrapper around the `swmm5` binary.
- A standard **run directory** layout: `inp/`, `rpt/`, `out/`, `stdout`, `stderr`, `manifest.json`.
- Metric extraction read directly from SWMM's own `.rpt`:
- peak flow + time-of-peak for any junction or outfall;
- Runoff Quantity and Flow Routing continuity tables + continuity error %;
- cross-run comparison (e.g. GUI vs CLI) on continuity error.
## When to use this skill
Use after a SWMM model is fully assembled (typically by `swmm-builder.build_inp`) and you need to actually execute it and read back the metrics. Also use to compare two .rpt files for regression / GUI parity.
Do **not** use this skill to assemble the .inp itself (that's `swmm-builder`) or to plot the results (that's `swmm-plot`).
## MCP tools
`mcp/swmm-runner/server.js` exposes four tools.
1. **`swmm_run`** — run `swmm5` against an .inp and write rpt + out + stdout + stderr + manifest.json into a run directory.
- Args: `inp` (path), `runDir` (path), `node` (optional), `rptName` (optional), `outName` (optional).
- When `node` is omitted, the server auto-detects the first entry from the .inp `[OUTFALLS]` section so the manifest's peak metric targets a real outfall name (no more silent "O1" default).
- Output: a manifest with inp_sha256, swmm5 version, file paths, `metrics.peak`, `metrics.continuity`.
2. **`swmm_peak`** — parse peak flow and time-of-peak for a specific nod