Swmm Canadaのロゴ

Swmm Canada

コミュニティ
Zhonghao1995
swmm-canada

SWMMCanadaの上流サービスから、カナダ国内の任意の地域で実行可能なSWMMモデルを取得します。対応都市が対象地域(AOI)をカバーしている場合は公開済みの実際の自治体管路データを使い、それ以外のカナダ国内の地域ではネットワークを生成します。入力はbboxまたはGeoJSONポリゴンと降雨期間です。カナダ国内の地域で使用してください。カナダ国外では代わりにswmm-anywhereを使用します。これはドキュメント上の仕様のみです。実行時のツールはプロセス内のfetch_swmm_from_canadaで、このスキルにスクリプトやMCPサーバーはありません。

概要

公開者Zhonghao1995
リポジトリagentic-swmm-workflow
スキル名swmm-canada
スター
33
フォーク
15
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    Zhonghao1995がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Swmm Canada」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Zhonghao1995/agentic-swmm-workflow/tree/main/skills/swmm-canada
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Zhonghao1995/agentic-swmm-workflow.git /tmp/agentic-swmm-workflow
mkdir -p .claude/skills
cp -r /tmp/agentic-swmm-workflow/skills/swmm-canada .claude/skills/swmm-canada
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでSwmm Canadaを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にSwmm Canadaを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Swmm Canadaは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

swmm-canada

Fetch a ready-to-run SWMM model for a Canadian area from the SWMMCanada upstream service, then run, audit, calibrate, and force it in one canonical run folder.

Use for any AOI inside Canada. The service auto-selects the build mode: real published municipal storm networks where a supported city covers the AOI (35 cities at the 2026-08 sync, e.g. Victoria, Ottawa, Toronto, Calgary, Vancouver, Regina), synthesized anywhere else in the country. Outside Canada, route to swmm-anywhere (global, synthesized).

This skill is a documentation contract: the implementation is the in-process typed tool fetch_swmm_from_canada (a pure-stdlib HTTP client, ADR-0001). There is no script directory and no MCP server here, and that is deliberate — the service boundary is HTTP, and the tool is already on the runtime's golden path.

What this skill does

Given an AOI (bbox [min_lon, min_lat, max_lon, max_lat] or a GeoJSON Polygon string) and a rainfall date window (start_date, end_date, ISO dates):

  1. Announces a preview (best effort): which mode and city the service will use.
  2. Submits the build to the SWMMCanada tasks API and polls with live progress (network fetch, subcatchments, DEM, landcover/soil, climate, build).
  3. Downloads the model bundle and lands it in the canonical layout (ADR-0004): model.inp in 05_builder/ (with a [REPORT] section injected when the upstream INP omits one, so the binary output carries per-element series), the full swmm_model.zip in 10_upstream/swmmcanada/ as the pristine provenance artifact, and the bundle's returned DATA unpacked into 00_raw/swmmcanada/ (datastore, DEM, land cover, soil rasters, exports) so the run's raw material is browsable beside the other inputs. A study-area map is rendered best-effort to 00_raw/study_area.png (needs the gis extra; the fetch never fails over the map) and is picked up by swmm-report's figures section.
  4. Returns the INP path, run directory, service URL, task id, build mode, and the upstream validation record.

Validated live end to end: a downtown Victoria AOI produced a real 423-subcatchment network in 173 s, ran under the local swmm5 unmodified, and audited cleanly; the whole fetch-run-audit chain took 178 s.

Required inputs

  • aoi_geojson (GeoJSON Polygon string) or bbox (four WGS84 floats).
  • start_date, end_date: the rainfall window (YYYY-MM-DD). This decides which observed rainfall the service attaches, so changing the window changes the storm.

Demo AOI (verified live)

When the user names a listed place without coordinates, use the verified demo AOI DIRECTLY (do not stop to ask first; asking is reserved for the safe profile):

Place phrasebbox [min_lon, min_lat, max_lon, max_lat]Verified
downtown Victoria, BC[-123.370, 48.425, -123.360, 48.432]2026-08-08, 423-subcatchment real-pipe network, fetch-run-audit in 178 s

State in the result card that the demo AOI was used and that a project-specific study boundary should replace it for real work. For any other place name, ask for the bbox (interactive) or say exactly what to rerun with (single-shot); never guess a study boundary.

Optional inputs

  • run_dir: reuse an existing run directory (otherwise a timestamped runs/agent/swmm-canada-* is created).
  • infiltration: CURVE_NUMBER (service default), HORTON, or GREEN_AMPT; passed through verbatim.
  • base_url: override the service endpoint for one call.

Configuration

The service URL comes from the AISWMM_SWMMCANADA_URL environment variable (a local container at http://localhost:8000 or a hosted backend). aiswmm doctor probes GET /api/v1/healthz when the variable is set and reports reachability; unset is a quiet OK because the upstream is optional.

What to do next (the chain)

Pass the returned run_dir and inp_path forward so every stage lands in the same run folder:

  1. run_swmm_inp (agent) or aiswmm run --inp <inp> --run-dir <run_dir> (CLI) — simulate.
  2. audit_run / aiswmm audit --run-dir <run_dir> — provenance, QA verdict, diagnostics.
  3. aiswmm calibrate with observed flow data — the fetched model is an uncalibrated first-pass estimate; expect the audit gate to flag routing continuity on raw builds, which is the gate doing its job.
  4. review_run / aiswmm review --run-dir <run_dir> — reference-free design-review of the fetched network (soft rulebook verdicts).
  5. plot_run — hydrograph figures into the run's canonical plot stage (08_plot/), which is where report generation looks.
  6. generate_report / aiswmm report --run-dir <run_dir> — client Word deliverable; embeds the figures plotted in step 5.
  7. run_climate_scenarios / aiswmm climate --params-json best_params.json --patch-map <map> — precipitation-scaled what-ifs on the calibrated model.

Boundaries

  • Outside Canada: the tool fails soft with a hint before any HTTP round trip; use swmm-anywhere.
  • Real network vs synthesized: decided server-side per AOI; the result reports which mode ran. Treat both like the synth path for QA purposes (reference-free checks until calibration).
  • Provenance: aiswmm never re-derives what the service already recorded; the zip in 10_upstream/swmmcanada/ is the durable upstream artifact, with the service URL and task id as foreign keys.

よくある質問

AIスキル「Swmm Canada」では何ができますか?

SWMMCanadaの上流サービスから、カナダ国内の任意の地域で実行可能なSWMMモデルを取得します。対応都市が対象地域(AOI)をカバーしている場合は公開済みの実際の自治体管路データを使い、それ以外のカナダ国内の地域ではネットワークを生成します。入力はbboxまたはGeoJSONポリゴンと降雨期間です。カナダ国内の地域で使用してください。カナダ国外では代わりにswmm-anywhereを使用します。これはドキュメント上の仕様のみです。実行時のツールはプロセス内のfetch_swmm_from_canadaで、このスキルにスクリプトやMCPサーバーはありません。

TypingMindでSwmm Canadaを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Swmm Canadaはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにSwmm Canadaをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Zhonghao1995/agentic-swmm-workflow/tree/main/skills/swmm-canadaを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Swmm Canadaを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Swmm Canadaで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもSwmm Canadaを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Swmm Canada」は無料ですか?

はい。Zhonghao1995がMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇