dbt-migration-postgres

dbt-migration-postgres is a skill for Claude Code from sfc-gh-dflippo/snowflake-dbt-demo. It costs 80 tokens per session (2,866 once invoked), scanned A, original, Apache-2.0.

A conversion guide for turning PostgreSQL, Greenplum, or Netezza database definitions into dbt models for Snowflake, a cloud data warehouse.

In plain words
What is it for?
Use it to migrate tables, views, or stored procedures, translate database-specific SQL, and create dbt configuration files with tests and documentation.
Why use it?
It removes much of the manual SQL rewriting needed when moving data transformations between these database systems and Snowflake.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: $skill-name invocation.

Part of the snowflake-dbt-migration plugin — 14 skills, 1 command shipped together

Good fit Use it to migrate tables, views, or stored procedures, translate database-specific SQL, and create dbt configuration files with tests and documentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sfc-gh-dflippo/snowflake-dbt-demo/dbt-migration-postgres
Install

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.

Any agent
npx skills add sfc-gh-dflippo/snowflake-dbt-demo --skill dbt-migration-postgres
Clone the repo
git clone --depth 1 https://github.com/sfc-gh-dflippo/snowflake-dbt-demo

Made for: Claude Code.

Or install snowflake-dbt-migration, the plugin that ships this one along with the rest of its 14 skills, 1 command.

Wrote 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.

agentmods badge for dbt-migration-postgres

README.md
[![agentmods](https://agentmods.dev/badge/skills/sfc-gh-dflippo/snowflake-dbt-demo/dbt-migration-postgres/github.svg)](https://agentmods.dev/skills/sfc-gh-dflippo/snowflake-dbt-demo/dbt-migration-postgres)
Your own site
<a href="https://agentmods.dev/skills/sfc-gh-dflippo/snowflake-dbt-demo/dbt-migration-postgres"><img src="https://agentmods.dev/badge/skills/sfc-gh-dflippo/snowflake-dbt-demo/dbt-migration-postgres/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dbt-migration-postgres

Your own site · 80×15
<a href="https://agentmods.dev/skills/sfc-gh-dflippo/snowflake-dbt-demo/dbt-migration-postgres"><img src="https://agentmods.dev/badge/skills/sfc-gh-dflippo/snowflake-dbt-demo/dbt-migration-postgres.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,866 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.02866
Opus 5 $0.00040 $0.01433
Sonnet 5 $0.00016 $0.00573
Haiku 4.5 $0.00008 $0.00287

Measured 10d ago against content hash 84de56576ed1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

dbt-migration-postgres 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 10d 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.

.claude/plugins/snowflake-dbt-migration/skills/dbt-migration-postgres/SKILL.md · 318 lines

How it starts

The opening of the file, as written. The whole thing — 318 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PostgreSQL/Greenplum/Netezza to dbt Model Conversion

Purpose

Transform PostgreSQL/Greenplum/Netezza DDL (views, tables, stored procedures) into production-quality dbt models compatible with Snowflake, maintaining the same business logic and data transformation steps while following dbt best practices.

When to Use This Skill

Activate this skill when users ask about:

  • Converting PostgreSQL/Greenplum/Netezza views or tables to dbt models
  • Migrating PostgreSQL stored procedures to dbt
  • Translating PostgreSQL syntax to Snowflake
  • Generating schema.yml files with tests and documentation
  • Handling PostgreSQL-specific syntax conversions (array expressions, CHAR padding, psql commands)

Task Description

You are a database engineer working for a hospital system. You need to convert PostgreSQL/Greenplum/Netezza DDL to equivalent dbt code compatible with Snowflake, maintaining the same business logic and data transformation steps while following dbt best practices.

Input Requirements

I will provide you the PostgreSQL DDL to convert.

Audience

The code will be executed by data engineers who are learning Snowflake and dbt.

Output Requirements

Generate the following:

  1. One or more dbt models with complete SQL for every column
  2. A corresponding schema.yml file with appropriate tests and documentation
  3. A config block with materialization strategy
  4. Explanation of key changes and architectural decisions
  5. Inline comments highlighting any syntax that was converted

Conversion Guidelines

General Principles

  • Replace procedural logic with declarative SQL where possible
  • Break down complex procedures into multiple modular dbt models
  • Implement appropriate incremental processing strategies
  • Maintain data quality checks through dbt tests
  • Use Snowflake SQL functions rather than macros whenever possible

Sample Response Format

-- dbt model: models/[domain]/[target_schema_name]/model_name.sql
{{ config(materialized='view') }}

/* Original Object: [database].[schema].[object_name]
   Source Platform: PostgreSQL/Greenplum/Netezza
   Purpose: [brief description]
   Conversion Notes: [key changes]
   Description: [SQL logic description] */

WITH source_data AS (
    SELECT
        -- SERIAL converted to INTEGER (use IDENTITY in table)
        customer_id::INTEGER AS customer_id,
        customer_name::VARCHAR(100) AS customer_name,
        account_balance::NUMBER(18,2) AS account_balance,
        -- TIMESTAMPTZ converted to TIMESTAMP_TZ
        created_date::TIMESTAMP_TZ AS created_date
    FROM {{ ref('upstream_model') }}
),

transformed_data AS (
    SELECT
        customer_id,
        UPPER(customer_name)::VARCHAR(100) AS customer_name_upper,
        account_balance,
        created_date,
        CURRENT_TIMESTAMP()::TIMESTAMP_NTZ AS loaded_at
    FROM source_data
)

SELECT
    customer_id,
    customer_name_upper,
    account_balance,
    created_date,
    loaded_at
FROM transformed_data

Read the full file on GitHub · 318 lines

Changes

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.

  1. 10d ago First seen · 318 lines · 80 tokens per session scan A 84de56576ed1

Subscribe to this mod's changes

dbt-migration-postgres is a skill published in the GitHub repository sfc-gh-dflippo/snowflake-dbt-demo (33 stars, last pushed today), licensed Apache-2.0. It adds 80 tokens to every session and 2,866 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

pgvector-semantic-search

Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. Trigger when user asks to: Store or search vector embeddings in PostgreSQL Set up semantic search, similarity search, or nearest neighbor search Create HNSW or IVFFlat indexes for vectors…

timescale/pg-aiguide · 190 tokens

postgres-hybrid-text-search

Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). Trigger when user asks to: Combine keyword and semantic search Implement hybrid search or multi-modal retrieval Use BM25/pgtextsearch with pgvector together Implement RRF (Reciprocal…

timescale/pg-aiguide · 162 tokens

ai-vector-brain

Builds vector-brain implementations for repos, docs hubs, and compliance corpora. Use when creating pgvector retrieval brains with scripts, SQL, manifests, and evals.

vasilyu1983/AI-Agents-public · 40 tokens

postgres-semantic-search

PostgreSQL-based semantic and hybrid search with pgvector and ParadeDB. Use when implementing vector search, semantic search, hybrid search, or full-text search in PostgreSQL. Covers pgvector indexing, hybrid FTS/BM25 + RRF, ParadeDB, reranking, halfvec, multilingual search, query translation, and domain evals.…

laguagu/claude-code-nextjs-skills · 228 tokens

vector-db-rag-expert

Expert guide for high-performance Vector Databases, RAG architectures, pgvector HNSW indexing, hybrid search (Dense + BM25), and semantic chunking / Panduan ahli Vector DB, arsitektur RAG, pgvector HNSW, dan hybrid search.

roedyrustam/vibes-plug · 62 tokens

laravel-vector-search

Use when implementing semantic/vector search in Laravel 13 with PostgreSQL + pgvector.

fusengine/agents · 22 tokens