altimate-code
Delegates dbt and warehouse work to altimate-code, a specialized CLI agent with 100+ purpose-built data tools. USE THIS SKILL…
Convert MS SQL Server source code (stored procs, views, T-SQL scripts) into dbt models targeting Snowflake, with build-first-then-parity, isolated-schema deployment, and a migration dashboard. Use when: (1) User says "migrate this T-SQL to dbt on Snowflake", "convert these
$ npx -y skills add AltimateAI/data-engineering-skills --skill mssql-to-snowflake-dbt-migration --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/mssql-to-snowflake-dbt-migrationContext preview
The summary Claude sees to decide when to auto-load this skill.
Convert MS SQL Server source code (stored procs, views, T-SQL scripts) into dbt models targeting Snowflake, with build-first-then-parity, isolated-schema deployment, and a migration dashboard. Use when: (1) User says "migrate this T-SQL to dbt on Snowflake", "convert these
name: mssql-to-snowflake-dbt-migration description: | Convert MS SQL Server source code (stored procs, views, T-SQL scripts) into dbt models targeting Snowflake, with build-first-then-parity, isolated-schema deployment, and a migration dashboard. Use when: (1) User says "migrate this T-SQL to dbt on Snowflake", "convert these stored procs end-to-end", "move <schema> from SQL Server to Snowflake" (2) Source lives in a repo as `.sql` dumps OR behind a reachable MS SQL connection, AND source rows are available in Snowflake for parity (replicated, staged, or landable) (3) Target is a dbt project with a Snowflake adapter (4) User expects a layered architecture (Medallion or Data Vault 2.0), parity-validated output, and an isolated-schema deploy **Prefer `migrating-sql-to-dbt`** for generic SQL-to-dbt conversion with no cross-engine parity, no isolated deploy, and no T-SQL-specific traps. Target wall time: ≤7 min for ≤10 objects; scales roughly linearly.
**Pick architecture → inventory source → convert → confirm → build to isolated schema → parity → verify → dashboard.**
command -v altimate-code # strongly preferred — carries MS SQL + Snowflake adapters and data-parity command -v dbt # required for the deploy phase command -v git # required
Must have:
`profiles.yml` or env-var profile).
`USAGE` on a warehouse. The skill writes to an **isolated schema**, not prod.
override** (see Phase 5 Method 1). The skill refuses to deploy without it — the `--vars '{target_schema: ...}'` trick is a no-op on standard projects.
rewrite table recommends `dbt_utils.generate_surrogate_key` as the NULL-safe way to port T-SQL `IDENTITY` columns. If `dbt_utils` isn't installed, add it before Phase 2 or avoid the IDENTITY mapping.
(`altimate-code providers`), OR
replicated (Fivetran/Airbyte/pre-existing bronze), or landable via stage + `COPY INTO`. Phase 6 hard-stops if neither is true.
If `altimate-code` is unavailable AND no dump exists, stop and tell the user.
If `dbt` is not installed, Phase 5 cannot run — stop and tell the user.
Target end-to-end runtime: **≤7 min** (420s) for ≤10 objects; scales roughly linearly beyond that. Hard ceiling **10 min** (600s). Per-phase caps (sum = 420s): Phase 0 ≤20s · Phase 1 ≤45s · Phase 2 ≤120s · Phase 3 ≤15s · Phase 4 ≤15s · Phase 5 ≤90s · Phase 6 ≤90s · Phase 7 ≤25s.
Ask the user:
> Which layering should the Snowflake dbt project use? > **1. Medallion** (bronze → silver → gold) — recommended for most analytics workloads. > **2. Data Vault 2.0** (hubs / links / satellites) — pick if the source is heavily normalized OLTP and auditability matters.
Default to Medallion if the user doesn't answer in one exchange.
**Initialise the run state immediately after the layering decision** — Phase 2's conversion step calls `scripts/record_written.sh`, which requires an active run. If init were deferred to Phase 4 (user confirmation), Phase 2's writes would either fail with "no current run" or write to a stale previous run that Phase 4's `init_run.sh` then overwrites with an empty manifest.
scripts/init_run.sh <Medallion|DataVault> '<migrated_models_selector>' <dbt_root>
What it does (see `scripts/init_run.sh`):
**before** touching state.
directory under `$(git rev-parse --git-dir)/skill/mssql_migration/<run_id>/`.
all later scripts read these from state.
`LAYERING`, `SCOPE_SELECTOR` into state.
**If an earlier attempt left stale state** (e.g. you ran `init_run.sh` with the wrong layering, or interrupted a previous run), the next `init_run.sh` would refuse with `a run is already active`. Either reset:
source scripts/state.sh reset scripts/init_run.sh … # retry
…or re-use the same run (if its state is still correct) and update only what changed via `source scripts/state.sh set VAR VALUE`.
The migrated-models selector can be refined in Phase 2 after inventory. **Do NOT re-run `init_run.sh`** — that would create a new `<run_id>`, truncate the written-files manifest, and regenerate `TS` + the schema prefix. Update the single value in place instead:
source scripts/state.sh load source scripts/state.sh set SCOPE_SELECTOR '<updated_selector>'
**Live MS SQL (via altimate-code):** pass the prompt via file to avoid shell interpolation of DB/schema names (which may contain quotes):
if command -v altimate-code >/dev/nu
Claude Code skills for Analytics & Data engineers working with dbt and Snowflake Altimate Data Skills is a collection of Claude Code skills that encode the workflows and best practices of experienced analytics engineers.
Delegates dbt and warehouse work to altimate-code, a specialized CLI agent with 100+ purpose-built data tools. USE THIS SKILL…
Analyze DBSQL queries, including SQL embedded in notebooks (`spark.sql(...)`, `%sql` cells), for anti-patterns, lint issues, and…
Creates dbt models following project conventions. Use when working with dbt models for: (1) Creating new models (any layer -…
Scoped enhancement of ONE existing dbt model from a ticket, with a validated PR as the deliverable. Use when: (1) User says…
Debugs and fixes dbt errors systematically. Use when working with dbt errors for: (1) Task mentions "fix", "error", "broken",…
Develops and troubleshoots dbt incremental models. Use when working with incremental materialization for: (1) Creating new…