skill-author
Draft a well-formed new skill (a SKILL.md scaffold, optionally with scripts/references) from a described recurring need, for human review and approval. Use…
Network QA of an existing INP (disconnected nodes, missing outfalls, adverse or zero slopes) is one call, network_qa, so call it first. Also builds, validates and routes SWMM pipe-network models from raw municipal shapefiles or structured GIS/CAD exports. Use when handling
$ npx -y skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-network --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/swmm-networkContext preview
The summary Claude sees to decide when to auto-load this skill.
Network QA of an existing INP (disconnected nodes, missing outfalls, adverse or zero slopes) is one call, network_qa, so call it first. Also builds, validates and routes SWMM pipe-network models from raw municipal shapefiles or structured GIS/CAD exports. Use when handling
name: swmm-network description: Network QA of an existing INP (disconnected nodes, missing outfalls, adverse or zero slopes) is one call, network_qa, so call it first. Also builds, validates and routes SWMM pipe-network models from raw municipal shapefiles or structured GIS/CAD exports. Use when handling junctions, conduits, outfalls, xsections, network field-mapping configs, or wiring subcatchments to upstream nodes. Requires real pipe data as SHP / GeoJSON / CSV — native CAD (DXF/DWG) is not parsed and must first be exported to one of these. For data-scarce areas where only a bbox is available and no pipe inventory exists, use `swmm-anywhere` instead.
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).
Use when a SWMM model needs a real pipe network. Specifically:
Do **not** use this skill when the user only wants subcatchment delineation (use `swmm-gis`) or only wants to run a finished INP (use `swmm-runner`).
`mcp/swmm-network/server.js` exposes nine tools. Pick by what stage of the pipeline you're at.
1. **`prepare_storm_inputs`** — clip raw `<municipal>StormGravityMain.shp` (+ optional `<municipal>StormManhole.shp`) to a basin polygon and emit pipes.geojson, manholes.geojson, and a filled mapping.json from a template.
2. **`snap_pipe_endpoints`** — cluster nearby pipe endpoints (sub-millimetre to centimetre vertex drift) and snap each cluster to its centroid so adjacent pipes share identical endpoint coordinates. Without this, `import_city_network` infers separate junctions for drifting endpoints and the network ends up as disconnected fragments. Also drops pipes whose two endpoints collapse into the same cluster (self-loop conduits that SWMM rejects).
3. **`infer_outfall`** — pick a single outfall point from pipe endpoints. Two modes:
4. **`reorient_pipes`** — BFS from outfall vertices to flip LineString direction so it matches flow direction. Real municipal pipes are usually digitised arbitrarily and would otherwise produce bogus `from_node`/`to_node` assignments.
4. **`import_city_network`** — main adapter. Takes the prepared pipes+outfalls geojsons (or any structured pipe table) plus a mapping.json and emits `network.json` with inferred junctions if needed.
5. **`import_network`** — older field-mapped import for GeoJSON/CSV when topology and inverts are explicit per row. Prefer `import_city_network` for new work.
6. **`assign_subcatchment_outlets`** — rewrite the `outlet` column of a subcatchments CSV so each subcatchment drains into a real upstream node (not the literal outfall). Without this step the pipe network sits idle in the SWMM model.
Pre-1.0 · stable v0.9.4 · pip install aiswmm==0.9.4 · CHANGELOG Headaches from tedious model setup? Try our another project SWMMCanada, our automated model-building project: draw an area anywhere in Canada and get a ready-to-run SWMM model. Up and running now.
Repo: Zhonghao1995/agentic-swmm-workflow
Draft a well-formed new skill (a SKILL.md scaffold, optionally with scripts/references) from a described recurring need, for human review and approval. Use…
Synthesize a plausible SWMM drainage network from public data (OSM streets + DEM) when NO real pipe-network data exists — input is just a bbox. Use ONLY when…
Assemble a runnable SWMM INP deterministically from subcatchment geometry/attributes, merged parameter JSON, network JSON, and climate references. Use when…
Calibration and validation scaffold for EPA SWMM. Use when an agent needs to (1) compare simulated vs observed flow, (2) evaluate candidate parameter sets, (3)…
Fetch a ready-to-run SWMM model for any Canadian area from the SWMMCanada upstream service — real published municipal storm pipes where a supported city covers…
Deterministic rainfall/climate formatting for SWMM. Use when converting timestamped rainfall CSV files into SWMM-ready [TIMESERIES] lines and [RAINGAGES]…