Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/altimateai/data-engineering-skills/migrating-sql-to-dbtnpx skills add AltimateAI/data-engineering-skills --skill migrating-sql-to-dbtgit clone --depth 1 https://github.com/AltimateAI/data-engineering-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/altimateai/data-engineering-skills/migrating-sql-to-dbt)<a href="https://agentmods.dev/skills/altimateai/data-engineering-skills/migrating-sql-to-dbt"><img src="https://agentmods.dev/badge/skills/altimateai/data-engineering-skills/migrating-sql-to-dbt.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00121 | $0.00721 |
| Opus 5 | $0.00060 | $0.00360 |
| Sonnet 5 | $0.00024 | $0.00144 |
| Haiku 4.5 | $0.00012 | $0.00072 |
Grade A, and why
migrating-sql-to-dbt scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- migrating-sql-to-dbt — 94% identical, 25 lines differ
How it starts
The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.
dbt Migration
Don't convert everything at once. Build and validate layer by layer.
Workflow
1. Analyze Legacy SQL
cat <legacy_sql_file>
Identify all tables referenced in the query.
2. Check What Already Exists
# 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:
- Check if an existing model already references this table
- Check if a source definition exists
- If neither exists, ask user: "Table X not found - should I create it as a source?"
Only proceed to intermediate/mart layers after all dependencies exist.
3. Create Missing Sources
# 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
4. Build Staging Layer
One staging model per source table. Follow existing project naming conventions.
Build before proceeding:
dbt build --select <staging_model>
5. Build Intermediate Layer (if needed)
Extract complex joins/logic into intermediate models.
Build incrementally:
dbt build --select <intermediate_model>
6. Build Mart Layer
Final business-facing model with aggregations.
7. Validate Migration
# Build entire lineage
dbt build --select +<final_model>
dbt show --select <final_model>
Migration Checklist
- All source tables identified and documented
- Sources.yml created with descriptions
- Staging models: 1:1 with sources, renamed columns
- Intermediate models: business logic extracted
- Mart models: final aggregations
- Each layer compiles successfully
- Each layer builds successfully
- Row counts match original (manual validation)
- Tests added for key constraints
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 113 lines · 121 tokens per session scan A 38c6cae440d3
migrating-sql-to-dbt is a skill published in the GitHub repository AltimateAI/data-engineering-skills (122 stars, last pushed 1mo ago), licensed MIT. It adds 121 tokens to every session and 721 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
explain-sql
Explain complex SQL queries in plain English with Mermaid data flow diagrams, performance annotations, and anti-pattern detection. Use when the user pastes a SQL query and asks "what does this do?", "explain this query", or needs to understand inherited SQL, CTEs, window functions, recursive queries, or dbt model…
sql-optimizer
Analyze and optimize slow SQL queries. Use when the user says a query is slow, asks to optimize or speed up SQL, wants to find anti-patterns, needs index recommendations, or asks for a query rewrite. Also use when EXPLAIN output shows full table scans or poor join strategies.
backend-patterns
Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.
dbt-patterns
The most important design decision in a dbt project is how to organize model layers. A clear layer structure means every model has exactly one place it belongs, and anyone reading the project can understand what each model does.
data-migration
Moving data between systems safely — cutover planning, backfill strategies, dual-write patterns, validation, rollback procedures, and zero-downtime migration techniques. Use this skill whenever the team is migrating from one database or warehouse to another (MySQL → Snowflake, Redshift → BigQuery, on-prem → cloud)…
schema-design
Data modeling for analytical workloads — star schema, snowflake schema, one big table (OBT), slowly changing dimensions (SCD), normalization tradeoffs, grain definition, and surrogate key strategies. Use this skill whenever the user is designing or reviewing a data warehouse schema, planning a fact/dimension table…