209-dbt-model-quality

209-dbt-model-quality is a cursor rule for coding agents from hamzaamjad/cursor-rules. It costs 0 tokens per session (94 once invoked), scanned A, original, MIT.

A set of standards for building dbt models, which are SQL transformations used to prepare data for analysis. It covers documentation, data checks, refresh strategy, and query performance.

In plain words
What is it for?
Use it when reviewing or creating dbt models, adding YAML and column documentation, writing uniqueness and relationship checks, and improving model performance.
Why use it?
It helps prevent undocumented models, invalid or duplicate data, unsuitable refresh methods, and slow SQL from entering a data project.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/hamzaamjad/cursor-rules/209-dbt-model-quality
Clone the repo
git clone --depth 1 https://github.com/hamzaamjad/cursor-rules

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 209-dbt-model-quality

README.md
[![agentmods](https://agentmods.dev/badge/rules/hamzaamjad/cursor-rules/209-dbt-model-quality.svg)](https://agentmods.dev/rules/hamzaamjad/cursor-rules/209-dbt-model-quality)
Your own site
<a href="https://agentmods.dev/rules/hamzaamjad/cursor-rules/209-dbt-model-quality"><img src="https://agentmods.dev/badge/rules/hamzaamjad/cursor-rules/209-dbt-model-quality.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 94 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00094
Opus 5 $0.00000 $0.00047
Sonnet 5 $0.00000 $0.00019
Haiku 4.5 $0.00000 $0.00009

Measured 3d ago against content hash 358c708ebaeb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

209-dbt-model-quality scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rules/200-domain/209-dbt-model-quality.mdc · 12 lines

What it actually says

dbt-model-quality

Purpose: Maintain high standards for dbt models.

  • Every model requires description in YAML and column-level docs.
  • Write tests: for uniqueness, non-null, relationships.
  • Use incremental vs. full-refresh appropriately; document rationale.
  • Optimize model SQL for performance (avoid cross-joins, excessive CTEs).
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 12 lines · 0 tokens per session scan A 358c708ebaeb

Subscribe to this mod's changes

209-dbt-model-quality is a cursor rule published in the GitHub repository hamzaamjad/cursor-rules (2 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 94 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.