check-dbt-conventions

Audits dbt models and connector configurations against ClickHouse ReplacingMergeTree pipeline conventions.

10|9|Updated May 22, 2026
One-click install
npx skills add https://github.com/constructorfabric/insight --skill check-dbt-conventions-constructorfabric
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: check-dbt-conventions
Source: https://github.com/constructorfabric/insight/tree/main/.claude/skills/check-dbt-conventions
Command: npx skills add https://github.com/constructorfabric/insight --skill check-dbt-conventions-constructorfabric

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Data pipeline conventions around ClickHouse ReplacingMergeTree engines, unique_key formulas, and read-time deduplication drift silently as connectors and silver models evolve, causing duplicate rows and inflated metrics. This Skill systematically audits the dbt codebase against the documented architecture rules and reports every deviation with file paths and line numbers. ## Core Features & Use Cases - Eight-rule convention audit: Verifies engine=ReplacingMergeTree, order_by=['unique_key'], silver delete+insert strategy, unique_key formula prefixes, bronze-to-RMT promotion, Airbyte append-only sync mode, ephemeral wrapping, incremental-by-default materialization, and read-time dedup of every RMT read. - Actionable violation reports: Outputs per-check PASS/FAIL status with exact file paths, line numbers, offending text, and minimal fix suggestions. - Use Case: Before merging a new connector PR, run the audit to confirm the connector projects a unique_key, has a bronze_promoted bootstrap model, uses append sync mode, and deduplicates all RMT reads via FINAL, QUALIFY, or the union_by_tag macro. ## Quick Start Run the dbt conventions audit on the ingestion codebase and report any violations with file paths and suggested fixes.

Frequently Asked Questions about check-dbt-conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit dbt models for ClickHouse ReplacingMergeTree conventions?

Invoke the check-dbt-conventions skill, which scans all silver and connector dbt models for correct engine, order_by, materialization strategy, and unique_key projection. It reports each violation with the file path, line number, and a minimal fix suggestion.

How to detect duplicate rows from ClickHouse ReplacingMergeTree reads?

ReplacingMergeTree only collapses duplicates during background merges, so every read must deduplicate at query time. The audit checks that reads use FINAL, QUALIFY ROW_NUMBER, LIMIT 1 BY, or the union_by_tag macro, and flags aggregations over un-deduplicated bronze sources.

What dbt materialization should silver models use with ClickHouse?

Silver models must use materialized='incremental' with incremental_strategy='delete+insert' and unique_key='unique_key', making them physically deduplicated. Views are forbidden in silver, and materialized='table' is allowed only for a small allow-list of full-refresh or aggregation models.

Does this audit replace dbt build or schema validation?

No, it complements structural validators like cfs validate, which only check artifact structure and code-marker presence. This skill performs LLM-based correctness validation of engine configuration content and read-time dedup semantics, and can run alongside the deterministic audit_rmt_read_dedup.py script.

When should I run a dbt pipeline conventions audit?

Run it before merging a connector PR, after refactoring silver models, or periodically in CI before dbt build. This surfaces convention drift early, before duplicate rows inflate downstream metrics.