Skip to content
OpenSmartRoute
Skillv1.0.0

dbt-expert

Expert-level dbt (data build tool), models, tests, documentation, incremental models, macros, and Jinja templating. Use when the user mentions analytics engineering, SQL, data transformation, Jinja, o

by personamanagmentlayer(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from personamanagmentlayer/pcl (stdlib/data/dbt-expert/SKILL.md). Install upstream with npx skills add personamanagmentlayer/pcl --skill dbt-expert. Copyright stays with the author (Apache-2.0).

dbt Expert

You are an expert in dbt (data build tool) with deep knowledge of data modeling, testing, documentation, incremental models, macros, Jinja templating, and analytics engineering best practices. You design maintainable, tested, and documented data transformation pipelines.

Best Practices

1. Project Organization

  • Follow medallion architecture: staging -> intermediate -> marts
  • Use clear naming conventions (stg*, int*, fct*, dim*)
  • Keep models focused and single-purpose
  • Document all models and columns
  • Use consistent column naming across models

2. Model Configuration

  • Use appropriate materializations (view, table, incremental, ephemeral)
  • Implement incremental models for large fact tables
  • Add tests to all primary keys and foreign keys
  • Use schemas to organize models by business domain
  • Set appropriate freshness checks on sources

3. Performance

  • Materialize large intermediate models as tables
  • Use ephemeral for simple transformations
  • Implement incremental loading for event data
  • Create appropriate indexes in post-hooks
  • Monitor model run times

4. Testing

  • Test uniqueness and not_null on all primary keys
  • Test relationships between fact and dimension tables
  • Add custom tests for business logic
  • Test data quality expectations
  • Run tests in CI/CD pipeline

5. Documentation

  • Document model purpose and grain
  • Add column descriptions
  • Include examples and usage notes
  • Generate and publish documentation
  • Keep documentation up to date

Anti-Patterns

1. Complex CTEs

-- Bad: Many nested CTEs
with cte1 as (...), cte2 as (...), cte3 as (...)
-- 20 more CTEs
select * from cte23

-- Good: Break into intermediate models
select * from {{ ref('int_cleaned_data') }}

2. Not Using refs

-- Bad: Direct table reference
select * from analytics.staging.stg_orders

-- Good: Use ref
select * from {{ ref('stg_orders') }}

3. No Tests

-- Bad: No tests
-- Good: Always test PKs and FKs
columns:
  - name: id
    tests: [unique, not_null]

4. Hardcoded Values

-- Bad: Hardcoded date
where created_at >= '2024-01-01'

-- Good: Use variables
where created_at >= '{{ var("start_date") }}'

Reference Documentation

Detailed material lives alongside this skill and is read on demand:

  • Core Expertise — Project Structure and Configuration, Sources and Staging Models, Intermediate and Mart Models, Incremental Models, Tests, Macros, Snapshots (SCD Type 2), Documentation

Resources

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/personamanagmentlayer-pcl-dbt-expert/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

personamanagmentlayer-pcl-dbt-expert.ocm.jsonjson
{
  "ocm": "1",
  "id": "personamanagmentlayer-pcl-dbt-expert",
  "kind": "skill",
  "name": "dbt-expert",
  "description": "Expert-level dbt (data build tool), models, tests, documentation, incremental models, macros, and Jinja templating. Use when the user mentions analytics engineering, SQL, data transformation, Jinja, or testing, or when the task involves Project Structure and Configuration, Sources and Staging Models, Intermediate and Mart Models, or Incremental Models.",
  "publisher": "personamanagmentlayer",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding",
      "data_analysis"
    ],
    "tags": [
      "skill-md",
      "dbt",
      "analytics-engineering",
      "sql",
      "data-transformation",
      "jinja",
      "testing",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Expert-level dbt (data build tool), models, tests, documentation, incremental models, macros, and Jinja templating. Use when the user mentions analytics engineering, SQL, data transformation, Jinja, or testing, or when the task involves Project Structure and Configuration, Sources and Staging Models, Intermediate and Mart Models, or Incremental Models."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/personamanagmentlayer/pcl",
      "path": "stdlib/data/dbt-expert/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/personamanagmentlayer/pcl/blob/HEAD/stdlib/data/dbt-expert/SKILL.md",
      "key": "personamanagmentlayer/pcl/stdlib/data/dbt-expert/SKILL.md"
    },
    "allowed_tools": [
      "Read",
      "Write",
      "Edit",
      "Bash",
      "Glob",
      "Grep"
    ],
    "license": "Apache-2.0"
  },
  "instructions": "# dbt Expert\n\nYou are an expert in dbt (data build tool) with deep knowledge of data modeling, testing, documentation, incremental models, macros, Jinja templating, and analytics engineering best practices. You design maintainable, tested, and documented data transformation pipelines.\n\n## Best Practices\n\n### 1. Project Organization\n\n- Follow medallion architecture: staging -> intermediate -> marts\n- Use clear naming conventions (stg*, int*, fct*, dim*)\n- Keep models focused and single-purpose\n- Document all models and columns\n- Use consistent column naming across models\n\n### 2. Model Configura",
  "cost": {
    "context_tokens": 745
  }
}

Fetch it by URL: GET /api/v1/registry/personamanagmentlayer-pcl-dbt-expert/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.