Skip to content
Back to skills

Swmm Params

ASecurity

Deterministic mapping from land use and soil texture to SWMM runoff/subarea and Green-Ampt infiltration parameters. Use when generating first-pass subcatchment parameter tables for swmm-builder.

  • 31 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 5, 2026
ai-agentspythonbash

Works with

  • cli
  • mcp

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned June 5, 2026

npx -y skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-params --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Swmm Params?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Swmm Params
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/zhonghao1995-swmm-params/badge)](https://www.skillsdirectory.com/skills/zhonghao1995-swmm-params)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: swmm-params
description: Deterministic mapping from land use and soil texture to SWMM runoff/subarea and Green-Ampt infiltration parameters. Use when generating first-pass subcatchment parameter tables for swmm-builder.
---

# SWMM Params (MVP mapping layer)

## What this skill provides
- Transparent CSV-to-JSON mapping for:
  - land use class -> SWMM `[SUBCATCHMENTS]` + `[SUBAREAS]` defaults
  - soil texture/type -> SWMM `[INFILTRATION]` (Green-Ampt) defaults
- Deterministic, auditable outputs with explicit fallback usage and unmatched-key reporting.
- Optional merge step that emits one builder-ready JSON artifact.

## Scripts
- `scripts/landuse_to_swmm_params.py`
  - maps `subcatchment_id + landuse_class` to runoff/subarea parameters
- `scripts/soil_to_greenampt.py`
  - maps `subcatchment_id + soil_texture` to Green-Ampt infiltration parameters
- `scripts/merge_swmm_params.py`
  - merges outputs from the two mapping scripts into one JSON package for future `swmm-builder`

## Default lookup tables
By default, scripts read bundled lookup CSVs:
- `skills/swmm-params/references/landuse_class_to_subcatch_params.csv`
- `skills/swmm-params/references/soil_texture_to_greenampt.csv`

You can override lookup paths with CLI flags.

## Minimal input format
Land use input CSV:
- required columns: `subcatchment_id`, `landuse_class`

Soil input CSV:
- required columns: `subcatchment_id`, `soil_texture`

Example files are provided under `examples/`.

## Outputs
Each mapper writes explicit JSON containing:
- `records` (row-level audit trail)
- `sections` (SWMM-oriented lists keyed by subcatchment)
- `unmatched_*` lists (rows that used fallback)
- `counts` summary

The merge script writes:
- `sections` (`subcatchments`, `subareas`, `infiltration`)
- `by_subcatchment` (combined record per subcatchment ID)
- `incomplete_ids` (IDs missing one or more sections)

## MCP
MCP wrapper location:
- `scripts/mcp/server.js`

Exposed tools:
- `map_landuse` (`inputCsvPath`, optional `lookupCsvPath`, `outputPath`)
- `map_soil` (`inputCsvPath`, optional `lookupCsvPath`, `outputPath`)
- `merge_params` (`landuseJsonPath`, `soilJsonPath`, `outputPath`)

Quick start:
```bash
npm --prefix skills/swmm-params/scripts/mcp install
npm --prefix skills/swmm-params/scripts/mcp run start
```

## MVP limitations
- Lookup mapping is key-based only (no spatial interpolation or fuzzy matching).
- A fallback row is expected in lookup tables (`DEFAULT` for land use, `-` or `DEFAULT` for soil).
- No unit conversion or calibration logic is included here.
- This skill only maps parameters; it does not write a full SWMM `.inp`.

## Example commands
```bash
python3 skills/swmm-params/scripts/landuse_to_swmm_params.py \
  --input skills/swmm-params/examples/landuse_input.csv \
  --output runs/swmm-params/example_landuse.json
```

```bash
python3 skills/swmm-params/scripts/soil_to_greenampt.py \
  --input skills/swmm-params/examples/soil_input.csv \
  --output runs/swmm-params/example_soil.json
```

```bash
python3 skills/swmm-params/scripts/merge_swmm_params.py \
  --landuse-json runs/swmm-params/example_landuse.json \
  --soil-json runs/swmm-params/example_soil.json \
  --output runs/swmm-params/example_builder_params.json
```

Files in this skill

  • SKILL.md3.2 KB
  • examples/landuse_input.csv96 B
  • examples/soil_input.csv74 B
  • references/landuse_class_to_subcatch_params.csv1.3 KB
  • references/soil_texture_to_greenampt.csv363 B
  • scripts/landuse_to_swmm_params.py7.4 KB
  • scripts/merge_swmm_params.py5.2 KB
  • scripts/soil_to_greenampt.py6.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.