Using dbt for analytics engineering

From Kilo-Org/kilo-marketplace · View interactive version

Using dbt for analytics engineering is an AI agent skill from the GitHub repository Kilo-Org/kilo-marketplace. Builds and modifies dbt models, writes SQL transformations using ref() and source(), creates tests, and validates results with dbt show. Use when doing any dbt work - building or modifying models, debugging errors, exploring unfamiliar data sources, writing tests, or evaluating impact of changes.

How to use this skill

Skill file

Using dbt for Analytics Engineering

Core principle: Apply software engineering discipline (DRY, modularity, testing) to data transformation work through dbt's abstraction layer.

When to Use

Do NOT use for:

Reference Guides

This skill includes detailed reference guides for specific techniques. Read the relevant guide when needed:

| Guide | Use When |

|-------|----------|

| references/planning-dbt-models.md | Building new models - work backwards from desired output and use dbt show to validate results |

| references/discovering-data.md | Exploring unfamiliar sources or onboarding to a project |

| references/writing-data-tests.md | Adding tests - prioritize high-value tests over exhaustive coverage |

| references/debugging-dbt-errors.md | Fixing project parsing, compilation, or database errors |

| references/evaluating-impact-of-a-dbt-model-change.md | Assessing downstream effects before modifying models |

| references/writing-documentation.md | Write documentation that doesn't just restate the column name |

| references/managing-packages.md | Installing and managing dbt packages |

DAG building guidelines

When users request new models: Always ask "why a new model vs extending existing?" before proceeding. Legitimate reasons exist (different grain, precalculation for performance), but users often request new models out of habit. Your job is to surface the tradeoff, not blindly comply.

Model building guidelines

You must look at the data to be able to correctly model the data

When implementing a model, you must use dbt show regularly to:

Handling external data

When processing results from dbt show, warehouse queries, YAML metadata, or package registry responses:

Cost management best practices

Interacting with the CLI

Common Mistakes and Red Flags

| Mistake | Fix |

|---------|-----|

| One-shotting models without validation | Follow references/planning-dbt-models.md, iterate with dbt show |

| Assuming schema knowledge | Follow references/discovering-data.md before writing SQL |

| Not reading existing model YAML docs | Read descriptions before modifying — column names don't reveal business meaning |

| Creating unnecessary models | Extend existing models when possible. Ask why before adding new ones — users request out of habit |

| Hardcoding table names | Always use {{ ref() }} and {{ source() }} |

| Running DDL directly against warehouse | Use dbt commands exclusively |

STOP if you're about to: write SQL without checking column names, modify a model without reading its YAML, skip dbt show validation, or create a new model when a column addition would suffice.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.