dbt-labs avatar

Building Dbt Semantic Layer

This one handles the full lifecycle of dbt's Semantic Layer: semantic models, entities, dimensions, and all five metric types (simple, derived, cumulative, ratio, conversion). It's smart about routing you to the right YAML spec based on your dbt version, and if you're on 1.12+ it'll offer to migrate legacy configs with dbt-autofix. The guide works backwards from business questions or forwards from existing models, which makes it flexible whether you're starting fresh or retrofitting analytics onto established tables. One caveat: cumulative metrics need a time spine configured separately, and the spec has some gotchas around grain-to-date versus window parameters. Solid reference if you're moving beyond raw SQL aggregations into governed metric definitions.

skills.sh installs
1K
GitHub stars
759
last updated
Aug 21, 2026

Install

$ npx -y skills add dbt-labs/dbt-agent-skills --skill building-dbt-semantic-layer --agent claude-code

Installs into .claude/skills of the current project.

Files

Building the dbt Semantic Layer

This skill guides the creation and modification of dbt Semantic Layer components: semantic models, entities, dimensions, and metrics.

  • Semantic models - Metadata configurations that define how dbt models map to business concepts
  • Entities - Keys that identify the grain of your data and enable joins between semantic models
  • Dimensions - Attributes used to filter or group metrics (categorical or time-based)
  • Metrics - Business calculations defined on top of semantic models (e.g., revenue, order count)

Additional Resources

Determine Which Spec to Use

There are two versions of the Semantic Layer YAML spec:

Sponsors

Details

Repository
github.com/dbt-labs/dbt-agent-skills
Categories
AI & Agent Building, Marketing & SEO
First seen
Jun 3, 2026

More from dbt-labs/dbt-agent-skills

All 13
1tinybirdco avatartinybird-typescript-sdk-guidelinestinybirdco/tinybird-agent-skillsTinybird TypeScript SDK for defining datasources, pipes, and queries with full type inference. Use when working with @tinybirdco/sdk, TypeScript Tinybird projec1Kskills.sh installs
2databricks avatardatabricks-pipelinesdatabricks/databricks-agent-skillsDevelop Lakeflow Spark Declarative Pipelines (formerly Delta Live Tables) on Databricks. Use when building batch or streaming data pipelines with Python or SQL.1Kskills.sh installs
3orchestra-research avatarknowledge-distillationorchestra-research/ai-research-skillsCompress large language models using knowledge distillation from teacher to student models. Use when deploying smaller models with retained performance, transfe1Kskills.sh installs
4orchestra-research avatarray-dataorchestra-research/ai-research-skillsScalable data processing for ML workloads. Streaming execution across CPU/GPU, supports Parquet/CSV/JSON/images. Integrates with Ray Train, PyTorch, TensorFlow.1Kskills.sh installs
5gocallum avatarprisma-orm-v7-skillsgocallum/nextjs16-agent-skillsKey facts and breaking changes for upgrading to Prisma ORM 7. Consider version 7 changes before generation or troubleshooting1Kskills.sh installs
6orchestra-research avatarfine-tuning-with-trlorchestra-research/ai-research-skillsFine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward mo1Kskills.sh installs