swmm-rag-memory

swmm-rag-memory is a skill for Claude Code, Codex from Zhonghao1995/agentic-swmm-workflow. It costs 62 tokens per session (1,209 once invoked), scanned A, original, MIT.

A search layer for past audited Agentic SWMM modelling runs. It retrieves relevant summaries, failure records, diagnostics, and notes; RAG means supplying an AI with selected supporting material when it answers.

In plain words
What is it for?
Use it to search historical quality issues and failures, build context packs for an AI, produce cited failure advice, save reviewed repairs, or write Obsidian-compatible notes.
Why use it?
It helps find similar past runs and evidence-linked lessons without needing a vector database. Retrieved information is guidance, not proof of a modelling conclusion.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: mentions Codex; built for openclaw.

Good fit Use it to search historical quality issues and failures, build context packs for an AI, produce cited failure advice, save reviewed repairs, or write Obsidian-compatible notes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhonghao1995/agentic-swmm-workflow/swmm-rag-memory
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-rag-memory
Clone the repo
git clone --depth 1 https://github.com/Zhonghao1995/agentic-swmm-workflow

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for swmm-rag-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhonghao1995/agentic-swmm-workflow/swmm-rag-memory/github.svg)](https://agentmods.dev/skills/zhonghao1995/agentic-swmm-workflow/swmm-rag-memory)
Your own site
<a href="https://agentmods.dev/skills/zhonghao1995/agentic-swmm-workflow/swmm-rag-memory"><img src="https://agentmods.dev/badge/skills/zhonghao1995/agentic-swmm-workflow/swmm-rag-memory/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for swmm-rag-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhonghao1995/agentic-swmm-workflow/swmm-rag-memory"><img src="https://agentmods.dev/badge/skills/zhonghao1995/agentic-swmm-workflow/swmm-rag-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,209 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 19
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00062 $0.01209
Opus 5 $0.00031 $0.00605
Sonnet 5 $0.00012 $0.00242
Haiku 4.5 $0.00006 $0.00121

Measured 10d ago against content hash 68962c70736a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

swmm-rag-memory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 7 executable files (scripts/answer_with_memory.py, scripts/build_memory_corpus.py, scripts/generate_failure_advice.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/swmm-rag-memory/SKILL.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SWMM RAG Memory

What this skill provides

  • Query-time retrieval over Agentic SWMM audited run memory.
  • A lightweight keyword/tag retriever that works without embeddings or a vector database.
  • A local hybrid retriever that combines keyword matches, deterministic SWMM tags, metadata weighting, and hashed token/character n-gram embeddings.
  • RAG context packs that can be passed to Codex, OpenClaw, Hermes, or another LLM.
  • Source citations for each retrieved memory item, including run id, project key, source file, failure patterns, diagnostics, and matched terms.
  • Retrieval-grounded failure_advice.{json,md} for failed or warning runs, without modifying model files.
  • Explicit resolution_memory.json for human-reviewed and benchmark-verified repairs.
  • Obsidian-compatible Markdown output for saved retrieval notes.

This skill reads existing audit and modeling-memory artifacts. It does not run SWMM, modify model inputs, rewrite skills, or claim that retrieved memory proves a modeling conclusion.

Relationship to swmm-modeling-memory

swmm-modeling-memory summarizes audited runs after experiments have been recorded.

swmm-rag-memory retrieves the most relevant historical memory for a current question.

The intended loop is:

  1. Run SWMM or attempt a workflow.
  2. Audit the run.
  3. Refresh swmm-modeling-memory.
  4. Ask a current modeling question.
  5. Retrieve relevant historical memory with swmm-rag-memory.
  6. Answer with explicit source boundaries and citations.

Output contract

The corpus builder writes these files to the selected RAG-memory output directory:

  • corpus.jsonl
  • keyword_index.json
  • embedding_index.json

The retriever writes JSON results by default and can also write a Markdown context pack. Failure advice writes failure_advice.json and failure_advice.md into the run directory. Verified repairs can be recorded as resolution_memory.json.

CLI

Build a corpus from existing memory and audited runs:

python3 skills/swmm-rag-memory/scripts/build_memory_corpus.py \
  --memory-dir memory/modeling-memory \
  --runs-dir runs \
  --out-dir memory/rag-memory

Read the full file on GitHub · 142 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 142 lines · 62 tokens per session scan A 68962c70736a

Subscribe to this mod's changes

swmm-rag-memory is a skill published in the GitHub repository Zhonghao1995/agentic-swmm-workflow (27 stars, last pushed 3d ago), licensed MIT. It adds 62 tokens to every session and 1,209 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

LangChain RAG Pipeline

INVOKE THIS SKILL when building ANY retrieval-augmented generation (RAG) system. Covers document loaders, RecursiveCharacterTextSplitter, embeddings (OpenAI), and vector stores (Chroma, FAISS, Pinecone).

jackjin1997/ClawForge · 53 tokens

graphify

Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community…

Graphify-Labs/graphify · 76 tokens

digital-health-clinical-asr-finetune

Stage 4 of the Clinical ASR Flywheel. Use when priority KER is above 0.3 to run stock NeMo SFT on Parakeet TDT v2 and offline cycle N+1 re-eval. NOT for generic word boosting (use /finetune-asr).

NVIDIA/skills · 72 tokens

digital-health-clinical-asr-eval

Stage 3 of Clinical ASR Flywheel. Score a NeMo manifest, produce the five-section KER leaderboard (by-ipasource diagnostic). Not for ASR auth (/riva-asr).

NVIDIA/skills · 51 tokens

nemo-mbridge-perf-expert-parallel-overlap

Validate and use MoE expert-parallel communication overlap in Megatron-Bridge, including overlapmoeexpertparallelcomm, delaywgradcompute, and flex dispatcher backends such as DeepEP and HybridEP.

NVIDIA/skills · 56 tokens

jetson-inference-mem-tune

Pick the serving stack and per-runtime memory flags (vLLM, SGLang, llama.cpp, TensorRT Edge-LLM) for an LLM/VLM workload on any NVIDIA Jetson.

NVIDIA/skills · 50 tokens