optimizing-databricks-sql

optimizing-databricks-sql is a skill for Claude Code, Codex from AltimateAI/data-engineering-skills. It costs 98 tokens per session (6,255 once invoked), scanned A, original, MIT.

A Databricks SQL analysis skill for checking queries, including SQL in notebooks, against general SQL rules and Databricks-specific practices. Databricks SQL is the SQL system used to query data on the Databricks platform.

In plain words
What is it for?
It reviews and validates query rewrites, and checks for Databricks concerns such as Z-ordering, table statistics, and user-defined functions that prevent Photon use.
Why use it?
It helps find inefficient query patterns and platform-specific problems that ordinary SQL checks may miss, such as issues involving Delta tables, Photon, or table layout.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It reviews and validates query rewrites, and checks for Databricks concerns such as Z-ordering, table statistics, and user-defined functions that prevent Photon use.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/altimateai/data-engineering-skills/optimizing-databricks-sql
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 AltimateAI/data-engineering-skills --skill optimizing-databricks-sql
Clone the repo
git clone --depth 1 https://github.com/AltimateAI/data-engineering-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin databricks-skills — /plugin install databricks-skills after adding the marketplace above.

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 optimizing-databricks-sql

README.md
[![agentmods](https://agentmods.dev/badge/skills/altimateai/data-engineering-skills/optimizing-databricks-sql/github.svg)](https://agentmods.dev/skills/altimateai/data-engineering-skills/optimizing-databricks-sql)
Your own site
<a href="https://agentmods.dev/skills/altimateai/data-engineering-skills/optimizing-databricks-sql"><img src="https://agentmods.dev/badge/skills/altimateai/data-engineering-skills/optimizing-databricks-sql/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 optimizing-databricks-sql

Your own site · 80×15
<a href="https://agentmods.dev/skills/altimateai/data-engineering-skills/optimizing-databricks-sql"><img src="https://agentmods.dev/badge/skills/altimateai/data-engineering-skills/optimizing-databricks-sql.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,255 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.
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.00098 $0.06255
Opus 5.5 $0.00039 $0.02502
Sonnet 5.5 $0.00020 $0.01251
Haiku 4.5 $0.00010 $0.00626

Measured 2mo ago against content hash ddf5474c0a25, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

optimizing-databricks-sql 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 2mo 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.

skills/databricks/optimizing-databricks-sql/SKILL.md · 461 lines

How it starts

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

Databricks Optimize (DBSQL)

A Databricks/Delta-platform overlay, not a standalone optimizer. The generic rewrite/analyze/verify pipeline (Steps 1, 5, 6) is the same pipeline altimate-code's native query-optimize skill runs — same tool calls, same composition. This skill's only job is the part query-optimize structurally can't do: detecting Databricks/Delta platform-specific issues (Z-ordering, table statistics, Photon UDF blocking) that need table metadata and Databricks docs knowledge, not just query text, and folding those findings in alongside the generic ones.

If query-optimize is installed in the current environment, prefer invoking it for Steps 1/5/6 and layer Steps 2–4's Databricks-specific findings on top of its output, the same way sql-review defers to sibling skills instead of duplicating them. If it isn't available (e.g. this skill is running standalone, outside altimate-code), fall back to calling the same tools directly as described below — the tool calls are identical either way, so behavior doesn't change based on which path ran.

No rewrite is reported as "optimized" until it clears the validation gate in Step 7 — that gate is a hard requirement, not a suggestion.

When to use this skill

Use when:

  • The query is DBSQL (standalone or embedded in a notebook cell) and the question involves Databricks/Delta-specific behavior: Z-ordering, liquid clustering, table statistics, Photon, Unity Catalog, Predictive Optimization.

Do NOT use for:

  • Generic, dialect-agnostic SQL optimization with no Databricks-specific angle → use query-optimize directly.
  • SQL quality/safety linting unrelated to performance (injection, PII exposure, style) → use sql-review.
  • PySpark DataFrame-level code (.collect(), .join(), UDFs used as Python objects) → deferred to a later phase, out of scope for now.

Before anything else — confirm the file path resolved correctly

Confirm the resolved file path matches what was requested, before doing anything else. If the user gave an explicit path (a /Workspace/... path, a repo path, any specific path), the tool used to read or write it must resolve to that exact path — not a same-named file found some other way. If the proper access tool fails, or the only way to find something is a generic filename search, stop and disclose it explicitly before analyzing or writing anything: state what path was requested, what (if anything) was found instead and where, and ask how to proceed. Never silently substitute a different file and continue as if it's the same one.

Read the full file on GitHub · 461 lines

Files

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.

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. 2mo ago First seen · 461 lines · 98 tokens per session scan A ddf5474c0a25

Subscribe to this mod's changes

optimizing-databricks-sql is a skill published in the GitHub repository AltimateAI/data-engineering-skills (137 stars, last pushed 1mo ago), licensed MIT. It adds 98 tokens to every session and 6,255 once invoked, about $0.0004 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-26.

Related

optimizing-databricks-sql compared with skills from other repositories

optimizing-databricks-sql next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
optimizing-databricks-sqlAltimateAI/data-engineering-skillsSkill1371mo agoMITA98Claude Code, Codex
misatarasinmuhammed/misataSkill80yesterdayMITA101Claude Code, Codex
aegis-dqaegis-dq/aegis-dqSkill66mo agononeA42Claude Code, Codex
backend-patternsMethasit-Pun/data_engineer_claude_skillsSkill14mo agononeA31Claude Code
dbt-patternsMethasit-Pun/data_engineer_claude_skillsSkill14mo agononeA143Claude Code
data-migrationMethasit-Pun/data_engineer_claude_skillsSkill14mo agononeA160Claude Code
schema-designMethasit-Pun/data_engineer_claude_skillsSkill14mo agononeA143Claude Code