skill-author
Draft a well-formed new skill (a SKILL.md scaffold, optionally with scripts/references) from a described recurring need, for…
Score a completed SWMM run against a configurable YAML rulebook of design checks — GB50014-style standards for real catchments, or the reference-free physical-plausibility rulebook for synthesized networks. Reads the run's existing manifest.json / model.rpt / model.inp and never
Claude Code
$ npx -y skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-design-review --agent claude-code
Codex
$ npx skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-design-review -a codex -y
Cursor
$ npx skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-design-review -a cursor -y
Gemini CLI
$ npx skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-design-review -a gemini-cli -y
GitHub Copilot
$ npx skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-design-review -a github-copilot -y
OpenCode
$ npx skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-design-review -a opencode -y
Windsurf
$ npx skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-design-review -a windsurf -y
name: swmm-design-review description: > Score a completed SWMM run against a configurable YAML rulebook of design checks — GB50014-style standards for real catchments, or the reference-free physical-plausibility rulebook for synthesized networks. Reads the run's existing manifest.json / model.rpt / model.inp and never re-runs SWMM. Use it post-run for compliance or plausibility review; continuity gating stays with postflight.
Evaluates a completed SWMM run against a configurable rulebook of design checks. Reads the run's existing artifacts (manifest.json + model.rpt + model.inp) — SWMM is never re-run. Classifies each rule as `pass`, `fail`, `warn`, or `needs-data` and writes `11_review/design_review.json` + `11_review/design_review.md` into the run directory (canonical per ADR-0004; the underlying script's own bare default is the legacy `09_review/` — see *CLI usage* below).
This skill is **decision-support only**. It never certifies regulatory compliance.
---
# Standalone script
python3 skills/swmm-design-review/scripts/design_review.py \
--run-dir <path> # required: directory with model.rpt, manifest.json, model.inp
[--rpt <path>] # override: explicit model.rpt path
[--inp <path>] # override: explicit model.inp path
[--manifest <path>] # override: explicit manifest.json path
[--rules <rulebook>] # override rulebook YAML/JSON (repeatable for multiple books)
[--out-dir <dir>] # bare-script default: <run-dir>/09_review/ (legacy)
[--no-inp] # skip INP-derived metrics (slope, diameter)
# CLI verb (registered in aiswmm CLI) — always passes --out-dir explicitly,
# defaulting to the canonical <run-dir>/11_review/ (ADR-0004)
aiswmm review --run-dir <path> [--rules <rulebook.yaml>] [--out-dir <dir>]Exit codes: `0` = pass/warn/needs-data only; `1` = any FAIL; `2` = script/input error.
Registered in `AgentToolRegistry`. Direct handler (not MCP-routed) — writes `11_review/design_review.json` + `11_review/design_review.md` into the run dir (canonical per ADR-0004).
review_run(run_dir="runs/my_run/") review_run(run_dir="runs/my_run/", rules="skills/swmm-design-review/rulebooks/gb50014_template.yaml")
`is_read_only=False` — QUICK profile prompts the user (tool writes files).
python3 skills/swmm-design-review/scripts/design_review.py \
--run-dir tests/fixtures/design_review \
--manifest tests/fixtures/design_review/sample_manifest.json \
--rpt tests/fixtures/design_review/sample_mini.rpt \
--inp tests/fixtures/design_review/sample_mini.inp \
--rules tests/fixtures/design_review/sample_rules.yaml \
--out-dir /tmp/design_review_out
# Exit 1 = FAIL (1 pass, 1 fail, 0 warn, 1 needs-data)
# Report: /tmp/design_review_out/design_review.md---
To check return-period adequacy (RETURN_PERIOD_ADEQUACY rule):
1. `generate_design_storm` with the target return period P. 2. `build_inp` to integrate the design storm into the model. 3. `run_swmm_inp --storm-return-period-yr P` to propagate provenance to manifest. 4. `design_review.py --run-dir <path>` — extractor reads `manifest.metadata.storm_return_period_yr`.
Until step 3 is wired (separate PR), RETURN_PERIOD_ADEQUACY returns `needs-data`.
---
| Metric | Source | |---|---| | `run.peak_flow` | manifest.json | | `run.continuity_error_pct` | manifest.json | | `link.max_velocity` | rpt Link Flow Summary | | `link.max_full_flow_ratio` | rpt Link Flow Summary | | `link.max_full_depth_ratio` | rpt Link Flow Summary | | `link.peak_flow` | rpt Link Flow Summary | | `outfall.max_flow` | rpt Outfall Loading Summary | | `node.flow_balance_error_pct` | rpt Node Inflow Summary | | `conduit.slope_pct` | INP [CONDUITS] + [JUNCTIONS]/[OUTFALLS] join | | `conduit.diameter_m` | INP [XSECTIONS] GEOM1 (CIRCULAR only) | | `conduit.roughness` | INP [CONDUITS] |
Metrics returning `needs-data` until PR2: `node.surcharge_hours`, `node.max_depth_m`, `node.flooding_hours`, `node.flooding_volume_m3`, `junction.freeboard_m`, `run.return_period_yr`.
---
(Canonical location per ADR-0004. Runs from before that migration, or the bare script invoked without `--out-dir`, carry these under the legacy `09_review/`.)
---
When presenting review results, the agent must:
1. Lead with the overall status (PASS / FAIL / WARN / NEEDS-DATA). 2. State the disclaimer: _"Findings are decision-support only and do NOT constitute compliance with any drainage standard."_ 3. Invite the engineer to inspect any FAIL or NEEDS-DATA finding before proceeding. 4. List NEEDS-DATA rules prominently with the reason they cannot produce a result.
`verify: true` precisely because they must be confirmed by the user.
---
Write a YAML file following the schema in `rulebooks/gb50014_template.yaml`. Every rule must have:
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…
Assemble a runnable SWMM INP deterministically from subcatchment geometry/attributes, merged parameter JSON, network JSON, and…
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…
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…