← 返回 Skills 市场
zhonghao1995

Swmm Runner

作者 Zhonghao Zhang · GitHub ↗ · v0.7.3 · MIT-0
cross-platform ✓ 安全检测通过
47
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install swmm-runner
功能描述
Run EPA SWMM (swmm5) simulations reproducibly and extract key metrics from the report file. Use when an agent needs to (1) run a .inp via swmm5 CLI, (2) gene...
使用说明 (SKILL.md)

SWMM Runner (CLI-first)

Part of Agentic SWMM — install the project first for the executable toolchain (aiswmm CLI, SWMM solver, MCP servers).

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 node from a SWMM .rpt. The node argument is required (no default; the previous misleading "O1" default has been removed).

    • Args: rpt (path), node (required).
    • Falls back from "Node Inflow Summary" to "Outfall Loading Summary" when no timed inflow entry exists for the node.
  3. swmm_continuity — parse the Runoff Quantity and Flow Routing continuity tables from a SWMM .rpt.

    • Args: rpt (path).
    • Returns a structured dict with Continuity Error (%) for both blocks plus all the volume rows (precipitation, evaporation, infiltration, runoff, etc.).
  4. swmm_compare — compare continuity-error percentages between two .rpt files (e.g. GUI vs CLI parity check).

    • Args: rpt, rpt2.

Recommended orchestration

swmm-builder.build_inp      → model.inp
swmm-runner.swmm_run        → model.rpt + manifest.json (with peak + continuity)
swmm-runner.swmm_continuity → structured continuity tables
swmm-runner.swmm_peak       → peak at a specific node (e.g. for downstream plotting)
   ↓
hand off to swmm-plot or swmm-experiment-audit

Conventions

  • Read SWMM's own .rpt for continuity and peak metrics; do not re-implement physics.
  • Keep units explicit in the .inp; SI preferred (FLOW_UNITS CMS).
  • The .rpt's "Node Inflow Summary" is the authoritative peak source for both junctions and outfalls. If a node has only outfall flow (rare), the parser falls back to "Outfall Loading Summary".

Known limitations

  • swmm_peak rounds to .rpt's 3-decimal display precision. Tiny basins (\x3C ~3 ha) routinely produce peaks of order 1e-4 m³/s that show up as 0.000 in the .rpt summary; the .out time-series file has the real precision but is not yet consulted (BACKLOG.md M3).
  • swmm_continuity and swmm_peak return structured dicts but do not yet support an outputPath to write them as standalone JSON artifacts; the orchestrator currently captures them via the raw MCP response (BACKLOG.md F10).
安全使用建议
Use this only for SWMM work. Provide a dedicated run directory and avoid sensitive, shared, or project-root paths because the tool writes standard output artifacts there and may overwrite same-named files. Verify the swmm5 binary/version you intend to run, especially when using PATH, AISWMM_SWMM5, or AISWMM_CONFIG_DIR.
能力评估
Purpose & Capability
The stated purpose is to run EPA SWMM, generate report/output artifacts, and parse metrics; the bundled Python script matches that purpose by invoking swmm5, reading .inp/.rpt files, and producing JSON metrics.
Instruction Scope
Instructions are scoped to SWMM execution and report parsing, with no prompt override, role manipulation, unrelated data access, or automatic background behavior.
Install Mechanism
The artifact contains a SKILL.md and a Python script but no install hook; it points users to an external Agentic SWMM project for the broader executable toolchain, which should be evaluated separately.
Credentials
Local subprocess execution of swmm5 and local file reads/writes are proportionate for a simulation runner. Output paths are user supplied through CLI/tool arguments.
Persistence & Privilege
No privilege escalation, credential/session access, network calls, deletion, background worker, or unbounded persistence was identified. The run command creates or overwrites expected files in the chosen run directory.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install swmm-runner
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /swmm-runner 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.7.3
Add project link back to the Agentic SWMM repository (install the project for the executable toolchain).
v0.7.2
Initial ClawHub release, aligned with agentic-swmm-workflow v0.7.2.
元数据
Slug swmm-runner
版本 0.7.3
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Swmm Runner 是什么?

Run EPA SWMM (swmm5) simulations reproducibly and extract key metrics from the report file. Use when an agent needs to (1) run a .inp via swmm5 CLI, (2) gene... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 47 次。

如何安装 Swmm Runner?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install swmm-runner」即可一键安装,无需额外配置。

Swmm Runner 是免费的吗?

是的,Swmm Runner 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Swmm Runner 支持哪些平台?

Swmm Runner 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Swmm Runner?

由 Zhonghao Zhang(@zhonghao1995)开发并维护,当前版本 v0.7.3。

💬 留言讨论