Agent skill · Databases

dbt-model-spec

Spec a dbt model — its grain, sources, transformations, tests, and materialization. Use when asked to design a dbt model, plan a data transformation, write a staging/intermediate/mart model spec, or define dbt tests for a table. Produces a model spec — purpose & grain, lineage (sources → refs), the transformation logic, column definitions, dbt tests, materialization choice, and the skeleton SQL/YAML.

mohitagw15856github.com/mohitagw15856GitHub ↗
claude-codecursorMIT
Install
npx skills add mohitagw15856/pm-claude-skills --skill dbt-model-spec --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 4 KB
Bundled scripts: none
Path: skills/dbt-model-spec/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,255
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# dbt Model Spec Skill A dbt model is only trustworthy if its **grain** is unambiguous, its **sources** are declared, and it's **tested**. This skill specs a model the way a good analytics engineer would — naming the grain first, mapping lineage, defining each column, choosing the right materialization, and writing the dbt tests that keep it correct — so the model is reviewable before a line of SQL ships. ## Required Inputs Ask for these only if they aren't already provided: - **What the model represents** and its **grain** (one row per ___ — the single most important decision). - **Layer** — staging, intermediate, or mart (dimension/fact). Conventions differ per layer. - **Sources / upstream refs** — the raw tables or models it builds on. - **The business logic** — joins, filters, aggregations, and any business rules. ## Output Format ### dbt Model: `[model_name]` **1. Purpose & grain** — what it is, and **one row per [grain]** stated explicitly. Layer (staging/intermediate/mart). **2. Lineage** — `source('…')` / `ref('…')` upstreams → this model → likely downstream consumers. **3. Transformation logic** — the joins, filters, aggregations, window functions, and business rules, in

What's inside
Steps it walks through
  1. Required Inputs
  2. Output Format
  3. dbt Model: [modelname]
  4. Quality Checks
  5. Anti-Patterns
  6. Based On
More from pm-claude-skills
All skills →
About this skill
What does the dbt-model-spec skill do?

Spec a dbt model — its grain, sources, transformations, tests, and materialization. Use when asked to design a dbt model, plan a data transformation, write a staging/intermediate/mart model spec, or define dbt tests for a table. Produces a model spec — purpose & grain, lineage (sources → refs), the transformation logic, column definitions, dbt tests, materialization choice, and the skeleton SQL/YAML.

How do I install it?

Run `npx skills add mohitagw15856/pm-claude-skills --skill dbt-model-spec --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From mohitagw15856/pm-claude-skills, a repository with 1,255 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going