swmm-reportlisted
Install: claude install-skill Zhonghao1995/agentic-swmm-workflow
# SWMM Report Export Skill
## Purpose
Assemble a reproducible, client-deliverable Word (.docx) report from the
artifacts produced by `swmm-experiment-audit` and `swmm-plot`. The script
reads only existing files; it never re-runs SWMM or modifies the run
directory.
**Prerequisite:** the run directory must contain a `09_audit/` subdirectory
with at least `experiment_provenance.json`. Run `aiswmm audit --run-dir
<path>` first if that directory is absent.
---
## CLI usage
```bash
# Standalone script
python3 skills/swmm-report/scripts/generate_report.py \
--run-dir <path> # required: audited run directory
[--out <path.docx>] # default: <run-dir>/report.docx
[--template <path>] # YAML or JSON template (default: built-in)
# CLI verb (registered in aiswmm CLI)
aiswmm report --run-dir <path> [--out <path.docx>] [--template <template.yaml>]
```
Exit codes: `0` = success; `1` = missing dependency, missing audit dir, or
template error; `2` = argument error.
**python-docx dependency:** install with `pip install 'aiswmm[report]'`.
The script exits immediately with a clear message if python-docx is absent.
---
## Agent tool: `generate_report`
Registered in `AgentToolRegistry`. Direct handler (not MCP-routed) —
shells out to `generate_report.py`, writes `<run-dir>/report.docx` (or
the path supplied via `out`).
```
generate_report(run_dir="runs/my_run/")
generate_report(run_dir="runs/my_run/", out="deliverables/run_report.docx")
generate_report(ru