Agent skill

Dbt Model Spec

by mohitagw15856 in mohitagw15856/pm-claude-skills

Spec a dbt model — its grain, sources, transformations, tests, and materialization.

MITAuto-check passedData & Analytics

Install Dbt Model Spec

skills CLI
$ npx skills add mohitagw15856/pm-claude-skills --skill dbt-model-spec -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mohitagw15856/pm-claude-skills dbt-model-spec --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mohitagw15856/pm-claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/dbt-model-spec .claude/skills/dbt-model-spec && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dbt-model-spec
GitHub stars
1.4k
Token cost
~939 tokens
SKILL.md length
442 words
Files
1
Skills in repo
1,348
Repo updated
First seen
Licence
MIT

At a glance

Spec a dbt model — its grain, sources, transformations, tests, and materialization.

  • Asked to design a dbt model
  • SKILL.md covers Required Inputs, Output Format, Quality Checks and Anti-Patterns, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Plan a data transformation

What it does

Dbt Model Spec is an agent skill from mohitagw15856/pm-claude-skills. 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.

Its SKILL.md is about 940 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Data & Analytics, covering Data pipelines and ETL, SQL and Data cleaning. It works with dbt and SQL. The repository describes itself as: 1255 professional Agent Skills for Claude, ChatGPT, Gemini, Cursor & Codex — PRDs, postmortems, leases, medical bills, layoffs, go-bags, new countries. Plain markdown, MIT, in… The licence is MIT.

When your agent uses it

  • Asked to design a dbt model
  • Plan a data transformation
  • Write a staging/intermediate/mart model spec
  • Define dbt tests for a table

Example prompts

  • “/dbt-model-spec”

What it can do on your machine

Read from SKILL.md and the folder at commit 1cbf1f0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dbt Model Spec loads about 939 tokens when it runs. Until then it costs about 105 tokens; SKILL.md has 442 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~105
When it runs · the whole SKILL.md, loaded when a task matches
~939

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mohitagw15856/pm-claude-skills at commit 1cbf1f0, republished under its MIT licence (© mohitagw15856). 442 words, ~939 tokens.

Download SKILL.mdSave it as .claude/skills/dbt-model-spec/SKILL.md (or your agent's skills folder).
name
dbt-model-spec
description
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.

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 order. Flag fan-out risks (joins that break the grain).

4. Columns — a table: name · type · description · (key/measure/dimension). The schema contract.

columntypedescription

5. Tests (dbt) — unique + not_null on the grain key, relationships for FKs, accepted_values for enums, and any custom/dbt_utils tests the logic needs. Tests are the model's guarantees — don't skip them.

6. Materialization — view / table / incremental / ephemeral, with the reasoning (incremental needs a unique_key + an is_incremental() filter).

7. Skeleton — a starting model.sql (CTE-structured: imports → logic → final select) and the schema.yml with tests, ready to fill in.

Show full SKILL.md (187 more words)Show less

Quality Checks

  • The grain is stated as "one row per ___" and the key is tested unique + not_null
  • Sources/refs use source()/ref(), not hard-coded table names
  • Every column has a type and description (the schema contract)
  • Tests cover the grain key, FKs (relationships), and enum columns
  • Materialization is justified; incremental models declare a unique_key and is_incremental() logic
  • Fan-out joins that could break the grain are flagged

Anti-Patterns

  • Do not leave the grain ambiguous — an untested, unclear grain is how duplicate rows and wrong metrics happen
  • Do not hard-code upstream table names — use ref()/source() so lineage and environments work
  • Do not ship a model with no tests — untested models silently rot; the grain key at minimum must be tested
  • Do not default everything to a table — pick the materialization the use justifies (views for light, incremental for large append-only)
  • Do not bury business logic without comments — the next analyst must understand the rules

Based On

dbt / analytics-engineering best practice — explicit grain, ref/source lineage, layered modelling (staging→intermediate→mart), schema tests.

Example Trigger Phrases

  • "Design a dbt model."
  • "Plan a data transformation."
  • "Write a staging/intermediate/mart model spec."
  • "Define dbt tests for a table."

© mohitagw15856, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/dbt-model-spec of mohitagw15856/pm-claude-skills.

Open the folder on GitHubat commit 1cbf1f0

Compare with similar skills

Dbt Model Spec next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dbt Model Spec compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dbt Model Spec this skillmohitagw15856/pm-claude-skills1.4k—~939Automated safety check: PassMIT
dbt Model BuilderAltimateAI/data-engineering-skills128—~890Automated safety check: PassMIT
dbt Error DebuggingAltimateAI/data-engineering-skills128—~1.1kAutomated safety check: PassMIT
Analytics Engineerborghei/Claude-Skills886—~3.4kAutomated safety check: PassMIT
Migrating SQL To DbtAltimateAI/data-engineering-skills128—~762Automated safety check: PassMIT
Databricks JobsKilo-Org/kilo-marketplace1901 repos~3.1kAutomated safety check: PassCustom licence

Similar skills

  • dbt Model Builder

    AltimateAI/data-engineering-skills

    Creates or modifies dbt models in line with a project's own conventions, then runs dbt build and dbt show to check the output instead of stopping at compile.

    128 GitHub stars~890 tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • dbt Error Debugging

    AltimateAI/data-engineering-skills

    Walks through fixing dbt compilation, database and test errors: read the full error, check upstream models, apply a fix, then verify with dbt build and a data preview.

    128 GitHub stars~1.1k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Analytics Engineer

    borghei/Claude-Skills

    Analytics engineering across data modeling, dbt, transformation, and semantic layers.

    886 GitHub stars~3.4k tokensUpdated 2 days ago
    Data & AnalyticsAuto-check passed
  • Migrating SQL To Dbt

    AltimateAI/data-engineering-skills

    Converts legacy SQL to modular dbt models. An agent skill from AltimateAI/data-engineering-skills.

    128 GitHub stars~762 tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Databricks Jobs

    Kilo-Org/kilo-marketplace

    Develop and deploy Lakeflow Jobs on Databricks via DABs, Python SDK, or the CLI.

    190 GitHub starsUsed in 1 repo~3.1k tokens
    Data & AnalyticsAuto-check passed
  • Monte Carlo Validation Notebook

    sickn33/agentic-awesome-skills

    Generates SQL validation notebooks for dbt PR changes with before/after comparison queries.

    47k GitHub starsUsed in 1 repo~1.1k tokens
    Data & AnalyticsAuto-check passed

More from mohitagw15856/pm-claude-skills

All 1,348 skills in this repo
  • Car Tco

    mohitagw15856/pm-claude-skills

    Compare the total cost of car ownership across buy-new, buy-used, lease, and keep-your-current-car — depreciation, insurance, maintenance ramp, and fuel over a real horizon, not just the monthly…

    1.4k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Cs Health Scorecard

    mohitagw15856/pm-claude-skills

    Build a customer health scorecard for a specific account. An agent skill from mohitagw15856/pm-claude-skills.

    1.4k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Exit Waterfall

    mohitagw15856/pm-claude-skills

    Compute who gets what at each exit price from a cap table — liquidation preferences, conversion points, and where the founders' share collapses.

    1.4k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Feature Prioritisation

    mohitagw15856/pm-claude-skills

    Apply prioritisation frameworks (RICE, MoSCoW, Kano, ICE, Opportunity Scoring) to rank features and backlog items.

    1.4k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Fire Number

    mohitagw15856/pm-claude-skills

    Compute a financial-independence (FIRE) target and years-to-reach with every assumption labeled as an assumption — plus a sensitivity table instead of a single false-precision answer.

    1.4k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Freelance Rate

    mohitagw15856/pm-claude-skills

    Derive a freelance day/hourly rate backwards from target income, honest billable utilization, overhead, and the self-employment tax premium — the arithmetic that proves a rate is not salary÷2000.

    1.4k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Dbt Model Spec

What does Dbt Model Spec do?

Spec a dbt model — its grain, sources, transformations, tests, and materialization. Dbt Model Spec is an agent skill from mohitagw15856/pm-claude-skills. Spec a dbt model — its grain, sources, transformations, tests, and materialization.

When should I use Dbt Model Spec?

Dbt Model Spec fits situations like: asked to design a dbt model; plan a data transformation; write a staging/intermediate/mart model spec; define dbt tests for a table.

How do I install Dbt Model Spec in Claude Code?

Run `npx skills add mohitagw15856/pm-claude-skills --skill dbt-model-spec -a claude-code`. Or copy the skill folder (skills/dbt-model-spec in mohitagw15856/pm-claude-skills) into .claude/skills/dbt-model-spec in your project. Claude Code loads it when a task matches its description.

How do I install Dbt Model Spec in Codex?

Run `npx skills add mohitagw15856/pm-claude-skills --skill dbt-model-spec -a codex`. Or copy the skill folder (skills/dbt-model-spec in mohitagw15856/pm-claude-skills) into .agents/skills/dbt-model-spec in your project. Codex loads it when a task matches its description.

Can I use Dbt Model Spec in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mohitagw15856/pm-claude-skills --skill dbt-model-spec -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dbt-model-spec, .gemini/skills/dbt-model-spec, .github/skills/dbt-model-spec and .opencode/skills/dbt-model-spec in your project.

What does Dbt Model Spec need to run?

SKILL.md names no scripts, command-line tools or credentials: Dbt Model Spec is instructions for the agent only.

Does Dbt Model Spec access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Dbt Model Spec safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dbt Model Spec use?

Dbt Model Spec is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dbt Model Spec use?

About 939 tokens (SKILL.md is roughly 3.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dbt Model Spec?

Skills that share tags, products or a category with Dbt Model Spec: dbt Model Builder (AltimateAI/data-engineering-skills, 128 stars), dbt Error Debugging (AltimateAI/data-engineering-skills, 128 stars), Analytics Engineer (borghei/Claude-Skills, 886 stars) and Migrating SQL To Dbt (AltimateAI/data-engineering-skills, 128 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dbt Model Spec?

mohitagw15856 (a GitHub user) maintains it in mohitagw15856/pm-claude-skills, which has 1,433 GitHub stars. The repository holds 1,348 skills in this directory. The repository was last updated on October 8, 2026.

Source: mohitagw15856/pm-claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.