data-divergence

data-divergence is a skill for Claude Code from andre-salvati/databricks-template. It costs 123 tokens per session (2,841 once invoked), scanned A, original, Apache-2.0.

A method for investigating why two datasets that should match have different rows, totals, or date ranges. It checks the data at each processing stage to find where the disagreement first appears.

In plain words
What is it for?
Compare pipelines, summaries with their detailed source, dashboards with their underlying queries, or separate environments. It checks counts, dates, unique keys, row-level differences, change logs, and run status.
Why use it?
It separates a real data problem from a comparison of the wrong fields or levels of detail, then narrows the cause to a specific pipeline stage.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Compare pipelines, summaries with their detailed source, dashboards with their underlying queries, or separate environments. It checks counts, dates, unique keys, row-level differences, change logs, and run status.

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

Made for: Claude Code.

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 data-divergence

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/andre-salvati/databricks-template/data-divergence"><img src="https://agentmods.dev/badge/skills/andre-salvati/databricks-template/data-divergence.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 123 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,841 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 pass 7 Sept 2026
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.00123 $0.02841
Opus 5.5 $0.00049 $0.01136
Sonnet 5.5 $0.00025 $0.00568
Haiku 4.5 $0.00012 $0.00284

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

Security

Grade A, and why

data-divergence 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.

.claude/skills/data-divergence/SKILL.md · 197 lines

How it starts

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

Investigating a data divergence

Report what happened, not just what differs.

Verify the premise first. "There's a divergence between X and Y" is a hypothesis, not a finding. Reconcile before theorizing — a good share of reports turn out to be the wrong two columns compared, and saying so plainly with numbers is a complete and useful answer.

Steps

  1. Establish the two sides and the grain. Name the exact objects and the key that identifies one row on each side. If the two sides have different grain — one is a rollup of the other — jump to Across an aggregation boundary; a row-count comparison is meaningless there. If the complaint came from a chart, read its query first — see Dashboards.
  2. Count, at every layer. One UNION ALL down both paths — source → each intermediate → output — with COUNT(*), MIN/MAX of the partitioning/date column, and a distinct count of the key. Find the first layer where the two sides stop agreeing; that one query eliminates everything upstream of it.
  3. Diff by grain, then by key (below). Stop and read the pattern before forming a theory.
  4. Read the Delta log for the layer that first diverged (below).
  5. Check run state — a missing tail is a failed job, not a logic bug. Look at job/pipeline run history and events, and compare the deployed revision against the one in source control; a fix that exists in the repo but was never shipped presents exactly like a code bug that isn't there.
  6. Report what is proven, what is inferred, and what the retained logs can no longer answer.

On Databricks, drive all of this with execute_sql rather than shelling out. Confirm which identity the connection authenticates as before trusting environment isolation — an MCP server or shared service principal may reach further than your own account does.

Diff by grain, then by key

Group both sides by the dimension the report slices on and show only the buckets that differ:

Read the full file on GitHub · 197 lines

Files

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.

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. 1mo ago First seen · 197 lines · 123 tokens per session scan A 98154d7c7ecf

Subscribe to this mod's changes

data-divergence is a skill published in the GitHub repository andre-salvati/databricks-template (86 stars, last pushed 19d ago), licensed Apache-2.0. It adds 123 tokens to every session and 2,841 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.