Connect Clawsmith to your coding agent. Ship products like crazy.Unlimited usage during betaGet API Key โ†’
โ† Back to dashboard
clawsmith.com/signal/dbt-contract-yaml-generator-from-prod-schema
โš  IssueUnderserveddev_tool_cliLive

CLI that reads a production dbt target and writes the explicit contract YAML blocks so teams can adopt dbt contracts without hand-authoring every column

dbt added model contracts in v1.5 but requires teams to hand-write YAML column definitions for every contracted model. A community feature request for the core to infer contracts from the production schema had 141 reactions and 23 comments. The dbt-labs maintainer explicitly closed it as not_planned in March 2026 stating: 'explicit is better than implicit and having inferred contracts is going to add a lot of headaches. I would like to suggest instead tooling to generate the yaml.' This is a direct invitation to build the missing tool. dbt-contract-gen (1 star, last updated August 2024) exists but is abandoned and does not handle the prod-diffing use case (detecting breaking changes between the prod schema and the declared contract). The product is a CLI that connects to the prod warehouse, reads column types and nullability from information_schema, and writes or diffs the contract YAML, with an option to flag columns that changed since the last run.

Score Breakdown

GitHub
164

Gap Assessment

UnderservedExisting solutions leave gaps

Maintainer explicitly declined the feature in March 2026 and redirected to 'tooling to generate the yaml' - a direct invitation for a third-party tool. Only dbt-contract-gen exists (1 star, abandoned Aug 2024). The follow-on issue #11764 filed June 2025 confirms ongoing demand but has 0 reactions - vendor not picking it up.