Snowflake dbt Model Refactor
Breaks up bloated dbt models on Snowflake safely, proves the output is unchanged and reports what improved.
Claude's review
7/10 Careful dbt-on-Snowflake refactor procedure with parity checks, the incremental/ephemeral trap and a plain dbt fallback.
We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.
In detail
Refactor a bloated dbt model on Snowflake safely and produce a quantified before/after report that explains **which qualities improved and why** — not just raw deltas. Extends the standard refactor flow with (1) downstream impact analysis via `dbt-analyze`, (2) row-count + column-hash parity validation via `data-parity`, (3) a report that lands a Bottleneck Summary and an "Outcome axes improved" table (readability, maintainability, performance, cost, governance, best-practices), and (4) an optional post-refactor warehouse benchmark against real Snowflake query history offered at the end. Use when the user says "refactor this model", "clean up this model", or points at a model that is oversized / over-joined / duplicated across the project — and the warehouse is Snowflake. Delegates to Altimate skills — does not reinvent them.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: snowflake-dbt-model-refactoring
description: >
Refactor a bloated dbt model on Snowflake safely and produce a quantified
before/after report that explains **which qualities improved and why** —
not just raw deltas. Extends the standard refactor flow with (1) downstream
impact analysis via `dbt-analyze`, (2) row-count + column-hash parity
validation via `data-parity`, (3) a report that lands a Bottleneck Summary
and an "Outcome axes improved" table (readability, maintainability,
performance, cost, governance, best-practices), and (4) an optional
post-refactor warehouse benchmark against real Snowflake query history
offered at the end. Use when the user says "refactor this model", "clean
up this model", or points at a model that is oversized / over-joined /
duplicated across the project — and the warehouse is Snowflake. Delegates
to Altimate skills — does not reinvent them.
---
# snowflake-dbt-model-refactoring
## When to invoke
Trigger this skill when any of the following is true for a target dbt model
**on a Snowflake-backed dbt project**:
- More than ~200 lines
- More than 5 joins in a single query block
- A CTE longer than ~50 lines
- Logic duplicated across 3+ models (payment pivots, RFM buckets, etc.)
- Hardcoded lists / thresholds repeated inline
- Downstream consumers exist and would be affected by structural changes
If the project targets BigQuery, Redshift, or Databricks, use the generic
`refactoring-dbt-models` skill instead — Phase 7's warehouse benchmark is
Snowflake-specific.
## Non-goals
- Do **not** rewrite for performance alone — that is the job of `query-optimize`
- Do **not** change model outputs — refactoring must preserve row count and per-row values
- Do **not** touch models the user did not point at, even if they look messy
...From AltimateAI's repository, MIT licence.
Related skills
-
Checked
dbt platform migration
Moves a dbt project from one warehouse to another and fixes SQL dialect gaps, so your models build again.
7/101 credit -
Checked
CSV and Excel merging
Merges, stacks and dedupes CSV and Excel files into one clean table, then checks the row counts add up.
7/101 credit -
Checked
BigQuery migration checks
Validates that tables moved to BigQuery match their source on schema, aggregates and rows, so nothing is lost.
7/101 credit -
Checked
dbt Mesh contracts
Checks whether a dbt model change breaks consumers and versions it, so downstream dashboards keep working.
7/101 credit -
Checked
SQL and dbt Analytics
Writes analytical SQL and dbt models tested for grain and join errors, so the numbers come out right.
7/101 credit -
Checked
D3 Animated Data Charts
Turns sourced data into honest, accessible animated D3 charts that render reliably frame by frame for video.
7/101 credit