skill-author
Draft a well-formed new skill (a SKILL.md scaffold, optionally with scripts/references) from a described recurring need, for…
Assemble a runnable SWMM INP deterministically from subcatchment geometry/attributes, merged parameter JSON, network JSON, and climate references. Use when creating auditable INP + manifest artifacts for downstream swmm-runner/calibration.
Claude Code
$ npx -y skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-builder --agent claude-code
Codex
$ npx skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-builder -a codex -y
Cursor
$ npx skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-builder -a cursor -y
Gemini CLI
$ npx skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-builder -a gemini-cli -y
GitHub Copilot
$ npx skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-builder -a github-copilot -y
OpenCode
$ npx skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-builder -a opencode -y
Windsurf
$ npx skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-builder -a windsurf -y
name: swmm-builder description: Assemble a runnable SWMM INP deterministically from subcatchment geometry/attributes, merged parameter JSON, network JSON, and climate references. Use when creating auditable INP + manifest artifacts for downstream swmm-runner/calibration.
Part of [Agentic SWMM](https://github.com/Zhonghao1995/agentic-swmm-workflow) — install the project first for the executable toolchain (aiswmm CLI, SWMM solver, MCP servers).
Build a runnable SWMM `.inp` using explicit file inputs:
The builder writes:
Required columns:
Optional columns:
Expected to match `skills/swmm-params/scripts/merge_swmm_params.py` output:
Expected to match `skills/swmm-network` schema (`junctions`, `outfalls`, `conduits`, etc.). Builder now validates required network fields used to emit `[JUNCTIONS]`, `[OUTFALLS]`, `[CONDUITS]`, `[XSECTIONS]`, `[COORDINATES]`, and `[VERTICES]`.
Provide either:
For `[RAINGAGES]`, provide either:
`--raingage-json` supports both the original single-gage form and a multi-gage form:
{
"gages": [
{
"id": "RG1",
"rain_format": "VOLUME",
"interval_min": 5,
"scf": 1.0,
"source": {"kind": "TIMESERIES", "series_name": "TS_RG1"}
},
{
"id": "RG2",
"rain_format": "VOLUME",
"interval_min": 5,
"scf": 1.0,
"source": {"kind": "TIMESERIES", "series_name": "TS_RG2"}
}
]
}The timeseries text must include rows for every referenced `series_name`, and each subcatchment `rain_gage` must reference one of the emitted gage IDs.
Validation behavior:
MCP wrapper location:
Exposed tools:
subcatchments CSV, area-weighted params JSON, network JSON, rainfall JSON + timeseries text, and an options-config JSON. Required args: `subcatchmentsCsvPath`, `paramsJsonPath`, `networkJsonPath`, `outInpPath`, `outManifestPath`. Optional: `rainfallJsonPath`, `raingageJsonPath`, `timeseriesTextPath`, `configJsonPath`, `defaultGageId`, `waterQualityJsonPath` (path to a WQ config JSON — enables [POLLUTANTS]/[LANDUSES]/[BUILDUP]/[WASHOFF]/[COVERAGES]/ [LOADINGS] sections for pollutant buildup/washoff simulation). The subcatchments CSV must carry `outlet` values that point to real upstream junctions (use `swmm-network-mcp.assign_subcatchment_outlets` first if it currently points to the literal outfall).
The builder requires upstream outputs from `swmm-params` and `swmm-climate`. Generate them first, then call `build_swmm_inp.py`:
# 1. Generate merged params from the bundled examples mkdir -p /tmp/builder-smoke python3 skills/swmm-params/scripts/landuse_to_swmm_params.py \ --input skills/swmm-params/examples/landuse_input.csv \ --output /tmp/builder-smoke/landuse.json python3 skills/swmm-params/scripts/soil_to_greenampt.py \ --input skills/swmm-params/examples/soil_input.csv \ --output /tmp/builder-smoke/soil.json python3 skills/swmm-params/scripts/merge_swmm_params.py \ --landuse-json /tmp/builder-smoke/landuse.json \ --soil-json /tmp/builder-smoke/soil.json \ --output /tmp/builder-smoke/merged_params.json # 2. Format rainfall from the bundled climate example python3 skills/swmm-climate/scripts/format_rainfall.py \ --input skills/swmm-climate/examples/rainfall_event.csv \ --out-json /tmp/builder-smoke/rainfall.json \ --out-timeseries /tmp/builder-smoke/rainfall_timeseries.txt # 3. Build the INP python3 skills/swmm-builder/scripts/build_swmm_inp.py \ --subcatchments-csv skills/swmm-builder/examples/subcatchments_input.csv \ --params-json /tmp/builder-smoke/merged_params.json \ --network-json skills/swmm-network/examples/basic-network.json \ --rainfall-json /tmp/builder-smoke/rainfall.json \ --config-json skills/swmm-builder/examples/options_config.json \ --out-inp /tmp/builder-smoke/example_model.inp \ --out-manifest /tmp/builder-smoke/example_manifest.json
Pass `--water-quality-json <path>` to enab
Draft a well-formed new skill (a SKILL.md scaffold, optionally with scripts/references) from a described recurring need, for…
Synthesize a plausible SWMM drainage network from public data (OSM streets + DEM) when NO real pipe-network data exists — input…
Calibration and validation scaffold for EPA SWMM. Use when an agent needs to (1) compare simulated vs observed flow, (2) evaluate…
Fetch a ready-to-run SWMM model for any Canadian area from the SWMMCanada upstream service — real published municipal storm pipes…
Deterministic rainfall/climate formatting for SWMM. Use when converting timestamped rainfall CSV files into SWMM-ready…
Score a completed SWMM run against a configurable YAML rulebook of design checks — GB50014-style standards for real catchments,…
Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…