datahub-sql-workflow

datahub-sql-workflow is a skill for Claude Code from datahub-project/datahub-skills. It costs 81 tokens per session (3,966 once invoked), scanned A, original, Apache-2.0.

A workflow for writing and investigating SQL using evidence from the DataHub catalog. SQL is the language used to query structured data, while DataHub provides information about datasets, their meaning, and their structure.

In plain words
What is it for?
Use it when drafting, debugging, executing, or explaining SQL, calculating a metric, querying named tables, or investigating query results. It starts with a SQL-context search, then uses available DataHub metadata and historical query evidence.
Why use it?
It reduces incorrect queries caused by guessing table names, columns, or business definitions. It requires finding SQL context first and treats catalog metadata and business context as authoritative.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the datahub-skills plugin — 13 skills, 9 commands, 4 agents shipped together

Good fit Use it when drafting, debugging, executing, or explaining SQL, calculating a metric…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/datahub-project/datahub-skills/datahub-sql-workflow
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 datahub-project/datahub-skills --skill datahub-sql-workflow
Clone the repo
git clone --depth 1 https://github.com/datahub-project/datahub-skills

Made for: Claude Code.

Or install datahub-skills, the plugin that ships this one along with the rest of its 13 skills, 9 commands, 4 agents.

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 datahub-sql-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/datahub-project/datahub-skills/datahub-sql-workflow.svg)](https://agentmods.dev/skills/datahub-project/datahub-skills/datahub-sql-workflow)
Your own site
<a href="https://agentmods.dev/skills/datahub-project/datahub-skills/datahub-sql-workflow"><img src="https://agentmods.dev/badge/skills/datahub-project/datahub-skills/datahub-sql-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,966 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.00081 $0.03966
Opus 5 $0.00041 $0.01983
Sonnet 5 $0.00016 $0.00793
Haiku 4.5 $0.00008 $0.00397

Measured 7d ago against content hash 1f185e6dc977, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

datahub-sql-workflow 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 7d 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/datahub-sql-workflow/SKILL.md · 379 lines

How it starts

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

DataHub SQL Workflow

Ground every query in DataHub evidence. Treat business context as the authority for meaning, catalog metadata as the authority for physical shape, and historical SQL context as evidence of analyst practice.

Require find_sql_context and DataHub metadata tools. If it is still unavailable, stop and ask the user to enable the DataHub MCP tools — do not fall back to any other evidence source (other discovery tools, local files, memory, web).

Treat every other tool as capability-dependent: if one is unavailable, disclose the limitation and continue with the supported steps; never replace missing evidence with guesses.

1. Find SQL context first

Call find_sql_context(question=<user's complete question>) before any other catalog, drafting, probing, or execution tool. Do this even when the user names tables or supplies Dataset URNs.

Read the response by shape and follow its message:

  • Treat user_edited matches and their instructions as authoritative. They may intentionally contain no datasets, patterns, or snippets.
  • Prefer curated external:* matches over generated history when they conflict.
  • With usable matches, use their patterns and datasets as primary candidates. Cross-check suggested_tables; suggestions can appear even for a strong match.
  • With no usable match but suggested tables, inspect those Dataset URNs and follow the message's drafting recommendation.
  • With neither usable matches nor suggestions, continue business-context and catalog discovery. Call the drafting tool only with concrete Dataset URNs.
  • If the message reports a persisted-anchor metadata retrieval error, retry find_sql_context. Do not reinterpret that failure as an anchor miss.

If two or more usable matches name disjoint datasets for the same metric or question, resolve the tie through business meaning (step 2). Prefer a dedicated metric or fact table over a same-named attribute column on an entity table, and present both candidates if the tie survives.

Read the full file on GitHub · 379 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. 7d ago First seen · 379 lines · 81 tokens per session scan A 1f185e6dc977

Subscribe to this mod's changes

datahub-sql-workflow is a skill published in the GitHub repository datahub-project/datahub-skills (38 stars, last pushed 9d ago), licensed Apache-2.0. It adds 81 tokens to every session and 3,966 once invoked, about $0.0004 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

pinecone

Managed vector DB for production RAG and search.

NousResearch/hermes-agent · 13 tokens

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 tokens

data-engineer

Build scalable data pipelines, modern data warehouses, and real-time streaming architectures. Implements Apache Spark, dbt, Airflow, and cloud-native data platforms.

davila7/claude-code-templates · 35 tokens

similarity-search-patterns

Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.

foryourhealth111-pixel/Vibe-Skills · 30 tokens

ingesting-into-data-lake

Import data into the AWS data lake from S3 files, local uploads, JDBC databases (Oracle, SQL Server, PostgreSQL, MySQL, RDS, Aurora), Amazon Redshift, Snowflake, BigQuery, DynamoDB, or existing Glue catalog tables (migration). Default target is S3 Tables; standard Iceberg on a general purpose bucket is supported where…

aws/agent-toolkit-for-aws · 228 tokens

nornicdb-qdrant-migration

Migrate from Qdrant to NornicDB end-to-end through NornicDB's Qdrant-compatible gRPC surface. Covers connection setup, collection→database mapping, point→node mapping, the vector-config and named-vector replication, point upsert in batches, count verification, and what (deliberately) does not transfer (snapshots, HNSW…

orneryd/NornicDB · 101 tokens