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.
npx skills add saajunaid/caddis-plugin --skill db-diagramgit clone --depth 1 https://github.com/saajunaid/caddis-pluginWrote 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.
[](https://agentmods.dev/skills/saajunaid/caddis-plugin/db-diagram)<a href="https://agentmods.dev/skills/saajunaid/caddis-plugin/db-diagram"><img src="https://agentmods.dev/badge/skills/saajunaid/caddis-plugin/db-diagram/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.
<a href="https://agentmods.dev/skills/saajunaid/caddis-plugin/db-diagram"><img src="https://agentmods.dev/badge/skills/saajunaid/caddis-plugin/db-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00084 | $0.02452 |
| Opus 5.5 | $0.00034 | $0.00981 |
| Sonnet 5.5 | $0.00017 | $0.00490 |
| Haiku 4.5 | $0.00008 | $0.00245 |
Grade A, and why
db-diagram 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 17d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.
db-diagram — explain SQL as a diagram
Take a SQL artifact and produce a diagram that explains it to a human. Two output formats, one shared extraction: Mermaid (default — plain text, diffs cleanly, renders in VS Code/Gitea, regenerable) and Excalidraw (for a design review / ARB pack / slide — someone drags boxes around).
The structure is extracted deterministically by scripts/sql_to_graph.py (a real sqlglot-based
parser); you (the model) add the business narration on top. Never hand-derive the node graph when the
script can run — its whole value is reproducibility.
Two non-negotiable safety rules
- Never write to the database. Read-only by definition — no DDL, no DML, not even in a rolled-back transaction. The extractor only ever parses SQL text.
- Never guess schema. Inspect the actual tables/columns before diagramming. If you can't reach the database, diagram only what's provable from the SQL text and mark inferred elements clearly.
Step 1 — get the SQL
Resolve the argument:
- A file path → read that file.
- A database object name (proc/view/table) → look it up. Prefer a registered DB MCP tool if one
is available in the session; else
sqlcmd/psqlread-only; else ask the user to paste it. Never guess an object's body. - No argument → operate on the SQL in the current file/context, or ask.
- Multiple objects → diagram the relationships between them, in ONE diagram — not one diagram each.
Step 2 — run the deterministic extractor
python <skill-dir>/scripts/sql_to_graph.py --file <path> # Mermaid block (default)
python <skill-dir>/scripts/sql_to_graph.py --file <path> --format excalidraw # native .excalidraw JSON
python <skill-dir>/scripts/sql_to_graph.py --file <path> --format html --title "..." # self-contained page
python <skill-dir>/scripts/sql_to_graph.py --file <path> --format svg # self-contained .svg
python <skill-dir>/scripts/sql_to_graph.py --sql "<SELECT ...>" --json # full graph JSON
All five formats (mermaid | excalidraw | svg | html | json) come from one deterministic layout
— same SQL always produces byte-identical output, boxes are grid-aligned, and every label is wrapped to fit
inside its box.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 17d ago Changed · -31 tokens per session 85e0f696a49a
- 1mo ago First seen · 149 lines · 115 tokens per session scan A acf0ca468b14
db-diagram is a skill published in the GitHub repository saajunaid/caddis-plugin (0 stars, last pushed today), licensed MIT. It adds 84 tokens to every session and 2,452 once invoked, about $0.0003 per session on Opus 5.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-09-03.
Other skills, from other repositories
goga-discover
Interview the user relentlessly about a decision until every branch of the design tree is resolved, then record the result as a short ADR.
qdrant-integration
Qdrant vector database with filtering, payloads, and quantization support.
goga-review-plan
Verify execution plan completeness and correctness.
goga-define-challenge
Challenge the complete product definition before the PRD is generated.
goga-prototype-contracts
Designing usages and annotations per cell for the prototype pipeline.
goga-prototype-plan-verification
Verification of the assembled architecture plan against the DSL.