dbt Copilot
Generate models, tests, and YAML configs from descriptions
Describe a dbt model in plain English and get the SQL, schema YAML, and tests auto-generated. Also debugs compilation errors, suggests materializations, and analyzes your DAG for orphaned models and circular dependencies.
INGREDIENTS
PROMPT
Create a skill called "dbt Copilot". When I describe a data model in plain English (e.g., "monthly revenue by customer segment, only completed orders, excluding refunds"), generate: (1) The dbt SQL model with appropriate CTEs, source references, and ref() calls. (2) A schema.yml entry with column descriptions and appropriate tests (unique, not_null, accepted_values, relationships). (3) A recommended materialization strategy with reasoning. When I paste a dbt compilation or runtime error, diagnose the issue and suggest a fix. When I ask for a project health check, analyze the DAG for: orphaned models (no downstream consumers), unused sources, circular dependencies, models that should be ephemeral, and missing tests. Support dbt Core and dbt Cloud syntax.
How It Works
dbt is powerful but verbose. Every new model needs SQL, a schema.yml entry,
test definitions, and documentation. As projects grow to 500+ models, the
YAML alone becomes a maintenance burden. This skill generates the boilerplate
and keeps the project healthy.
What You Get
- SQL model generation from plain-English descriptions
- Auto-generated schema.yml with column descriptions and tests
- Test suggestions based on data patterns (uniqueness, not_null, accepted_values, relationships)
- Compilation error debugging with plain-English explanations
- DAG analysis (orphaned models, unused sources, circular dependencies)
- Materialization recommendations (table vs. view vs. incremental vs. ephemeral)
Setup Steps
- Ask your Claw to create a "dbt Copilot" skill with the prompt below
- Point it at your dbt project directory
- Ask for new models, debug errors, or run a project health check
Tips
- The DAG analysis is worth running monthly — projects accumulate dead models fast
- Test suggestions are based on actual data, not just column names
- Use it to generate the YAML config that nobody wants to write by hand
- The materialization recommendations can significantly improve run times