refactoring-dbt-models

Installation
SKILL.md

dbt Refactoring

Find ALL downstream dependencies before changing. Refactor in small steps. Verify output after each change.

Workflow

1. Analyze Current Model

cat models/<path>/<model_name>.sql

Identify refactoring opportunities:

  • CTEs longer than 50 lines → extract to intermediate model
  • Logic repeated across models → extract to macro
  • Multiple joins in sequence → split into steps
  • Complex WHERE clauses → extract to staging filter

2. Find All Downstream Dependencies

Installs
34
GitHub Stars
122
First Seen
Feb 7, 2026
refactoring-dbt-models — altimateai/data-engineering-skills