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 andre-salvati/databricks-template --skill sql-diagramgit clone --depth 1 https://github.com/andre-salvati/databricks-templateWrote 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/andre-salvati/databricks-template/sql-diagram)<a href="https://agentmods.dev/skills/andre-salvati/databricks-template/sql-diagram"><img src="https://agentmods.dev/badge/skills/andre-salvati/databricks-template/sql-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/andre-salvati/databricks-template/sql-diagram"><img src="https://agentmods.dev/badge/skills/andre-salvati/databricks-template/sql-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00121 | $0.03247 |
| Opus 5.5 | $0.00048 | $0.01299 |
| Sonnet 5.5 | $0.00024 | $0.00649 |
| Haiku 4.5 | $0.00012 | $0.00325 |
Grade A, and why
sql-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 1mo 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 — 182 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Diagramming a SQL query
Diagram a SQL query and explain what it shows — either its execution steps or its column lineage.
Steps
- Get the SQL. If the user named a file, use it. If the query is embedded in Python (most of this
repo's SQL lives in f-strings under
scripts/), extract it to a scratch.sqlfile first and replace the interpolated placeholders with literals —sqlglotparses SQL, not f-strings. - Pick the mode.
mode=plan(the default) answers "what does this query do, step by step";mode=lineageanswers "where does this output column come from". When the user asks about joins, stages, filters or ordering, they wantplan. - Run
make sql-diagram sql=<path> name=<basename> comments=1via Bash. It writes three files toreports/sql-diagram/:<basename>.sql(the query as analysed),.mmdand.svg. All ofreports/is gitignored generated output — nevergit add -fout of it. To keep a diagram as a committed example, copy the trio into.claude/skills/sql-diagram/examples/and re-run against the copied.sql; because that file is the post-substitution query, the run reproduces the diagram exactly, which is why the.sqlis kept beside the picture. Pass--stdouttoscripts/sql_diagram.pyfor a throwaway look with no files written. - Read the
.mmd, show it in a ```mermaid fence, and explain it (see below). The.svgis the same graph for linking from prose where no Mermaid renderer is available. - Simulate the query on small data (see Simulation) and deliver the diagram and
the trace together as one HTML page in
reports/sql-diagram/<basename>.html.
Explaining a query and reviewing one are different jobs. For an explanation the diagram is
enough. For a review, read the .sql alongside it and treat the graph as an index into the text:
it is authoritative on scans, joins and join predicates, and silent on filters, windows and
projections (see the blind spots below). Defects severe enough to produce wrong numbers usually live
in exactly the parts the picture omits.
What ships with it
4 files 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.
- 1mo ago First seen · 182 lines · 121 tokens per session scan A 8766b60b237e
sql-diagram is a skill published in the GitHub repository andre-salvati/databricks-template (86 stars, last pushed 25d ago), licensed Apache-2.0. It adds 121 tokens to every session and 3,247 once invoked, about $0.0005 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-08-30.
Other skills, from other repositories
data-access
Governed data access patterns for Databricks workloads at Alpura. Load when writing or reviewing data.py, SQL, Unity Catalog references, table reads, filters, or query failures. Enforces three-part names, Gold-only reads for UI apps, WorkspaceClient Statement Execution in Databricks Apps, spark.table() in notebooks…
sl
Skill "sl" from Kaelio/ktx, covering semantic layer, part 1 - schema reference, overlay sources, standalone table sources and standalone sql sources.
historic_sql_patterns
Identify recurring cross-table historic-SQL analytical intents from a bounded pattern shard and emit typed pattern evidence for deterministic wiki projection.
historic_sql_table_digest
Convert one changed historic-SQL table usage bucket into typed table usage evidence for deterministic schema projection.
live_database_ingest
Capture semantic-layer and knowledge updates from a live database schema snapshot.
ktx
Installs and configures ktx, the open-source context layer for data agents — runs ktx setup non-interactively with hidden CLI flags, configures database connections and embeddings, installs agent integration, and verifies readiness. Use when the user asks an agent to add ktx to a project, connect data sources, install…