altimateai/migrating-sql-to-dbt
| (1) Converting stored procedures, views, or raw SQL files to dbt models (2) Task mentions "migrate", "convert", "legacy SQL", "transform to dbt", or "modernize" (3) Breaking monolithic queries into modular layers (discovers project conventions first) (4) Porting existing data pipelines or ETL to dbt patterns Checks for existing models/sources, builds and validates layer by layer.
npx skills add https://github.com/AltimateAI/data-engineering-skills --skill migrating-sql-to-dbt
Don't convert everything at once. Build and validate layer by layer.
cat <legacy_sql_file>
Identify all tables referenced in the query.
# Search for existing models/sources that reference the table
grep -r "<table_name>" models/ --include="*.sql" --include="*.yml"
find models/ -name "*.sql" | xargs grep -l "<table_name>"
For each table referenced in the legacy SQL:
Only proceed to intermediate/mart layers after all dependencies exist.
# models/staging/sources.yml
version: 2
sources:
- name: raw_database
schema: raw_schema
tables:
- name: orders
description: Raw orders from source system
- name: customers
description: Raw customer records
One staging model per source table. Follow existing project naming conventions.
Build before proceeding:
dbt build --select <staging_model>
Extract complex joins/logic into intermediate models.
Build incrementally:
dbt build --select <intermediate_model>
Final business-facing model with aggregations.
# Build entire lineage
dbt build --select +<final_model>
dbt show --select <final_model>
{{ config(materialized='ephemeral') }}{{ var("name") }}Take altimateai/migrating-sql-to-dbt from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.