dbt-transformation
Skill2 starsChanged 28 days agoApache-2.0View on GitHub
Designs, develops, and tests modular SQL data transformations using dbt (data build tool), Jinja macros, semantic layer metrics, automated schema tests, and documentation generation.
In this repository108 other files it gives its agents.
- AGENTS.mdAGENTS.md
- everything-gemini-maintainerSkill
- adversarial-fuzz-generatorSkill
- agent-evalsSkill
- ai-first-engineeringSkill
- alloydb-omni-vectorSkill
- apache-kafka-streamsSkill
- api-craftsmanSkill
- architecture-designerSkill
- argon-3d-game-engineSkill
- argon-3d-scene-architectSkill
- argon-procedural-asset-generatorSkill
- argon-visual-critique-loopSkill
- argo-workflowsSkill
- autonomous-incident-healerSkill
- axum-web-serviceSkill
- bigquery-vector-searchSkill
- browser-qa-testerSkill
- chromadb-vector-storeSkill
- cilium-ebpf-networkingSkill
- clickhouse-analyticsSkill
- cloud-deploy-canarySkill
- cloudflare-r2-object-storageSkill
- cloudflare-workersSkill
- cloud-run-agentsSkill
- context-cachingSkill
- context-distillation-compressorSkill
- context-warmerSkill
- continuous-learningSkill
- cost-oracle-finopsSkill
- cross-repo-swarm-syncSkill
- cve-remediation-orchestratorSkill
- database-architectSkill
- dataproc-spark-analyticsSkill
- debezium-cdcSkill
- devops-pipelineSkill
- distributed-rate-limitingSkill
- docker-compose-orchestratorSkill
- duckdb-local-olapSkill
- dynamic-thinking-allocationSkill
- ebpf-microvm-sandboxSkill
- ebpf-sandbox-enforcerSkill
- elephant-goldfish-modelSkill
- envoy-ai-gatewaySkill
- ephemeral-swarm-orchestratorSkill
- fastapi-productionSkill
- fullstack-nextjsSkill
- game-audio-synthesizerSkill
- game-studioSkill
- gemini-function-callingSkill
- gemini-groundingSkill
- gemini-live-audio-transcriberSkill
- gemini-live-multimodalSkill
- gemini-live-screen-visionSkill
- gemini-multimodalSkill
- genetic-prompt-cross-pollinatorSkill
- git-craftsmanSkill
- github-opsSkill
- google-axSkill
- google-flow-orchestratorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 141
Avoid repetitive boilerplate using parameterized Jinja macros:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
dbt Modular Transformation & Data Modeling
This skill guides structuring production-grade ELT pipelines using dbt (Core & Cloud), enforcing modular layer architecture (staging, intermediate, marts), DRY Jinja macros, automated data testing, and incremental table materialization.
⚡ Core Patterns
1. Multi-Layer Dimensional Modeling Architecture
Organize transformations into clean, progressive DAG layers:
models/
├── staging/ # 1:1 view on raw sources (renaming, casting)
│ ├── stripe/
│ │ ├── _stripe__sources.yml
│ │ ├── _stripe__models.yml
│ │ └── stg_stripe__payments.sql
├── intermediate/ # Business logic joins & window aggregations
│ └── finance/
│ ├── _int_finance__models.yml
│ └── int_payments_pivoted_to_orders.sql
└── marts/ # Dimensional star schema (facts & dimensions)
├── core/
│ ├── fct_orders.sql
│ └── dim_customers.sql
└── marketing/
└── fct_campaign_conversions.sql2. Staging Layer Model with CTE Standards
Clean raw source tables into normalized relational types:
-- models/staging/stripe/stg_stripe__payments.sql
with source as (
select * from {{ source('stripe', 'payment') }}
),
renamed as (
select
id as payment_id,
orderid as order_id,
paymentmethod as payment_method,
status as payment_status,
-- Amount stored in cents; convert to dollars
round(amount / 100.0, 2) as amount_usd,
created as created_at
from source
)
select * from renamedDeclare tests and column descriptions in accompanying YAML:
# models/staging/stripe/_stripe__models.yml
version: 2
models:
- name: stg_stripe__payments
description: "Normalized payments table from Stripe webhook ingest."
columns:
- name: payment_id
description: "Primary key for payment events."
tests:
- unique
- not_null
- name: payment_status
tests:
- accepted_values:
values: ['success', 'fail', 'pending']3. High-Performance Incremental Fact Table
Process only newly ingested or updated records using is_incremental():
-- models/marts/core/fct_orders.sql
{{
config(
materialized='incremental',
unique_key='order_id',
incremental_strategy='merge',
on_schema_change='fail'
)
}}
with orders as (
select * from {{ ref('stg_jaffle_shop__orders') }}
{% if is_incremental() %}
-- Only query rows created or modified in the last 3 days for backfill resilience
where order_date >= (select dateadd('day', -3, max(order_date)) from {{ this }})
{% endif %}
),
payments as (
select * from {{ ref('stg_stripe__payments') }}
),
order_payments as (
select
order_id,
sum(case when payment_status = 'success' then amount_usd else 0 end) as amount_usd
from payments
group by 1
),
final as (
select
orders.order_id,
orders.customer_id,
orders.order_date,
orders.status as order_status,
coalesce(order_payments.amount_usd, 0) as total_amount_usd
from orders
left join order_payments on orders.order_id = order_payments.order_id
)
select * from final4. Custom Jinja Macro for Dynamic Pivoting
Avoid repetitive boilerplate using parameterized Jinja macros:
-- macros/pivot_sum.sql
{% macro pivot_sum(column_name, values_list, aggregate_col='amount_usd') %}
{% for val in values_list %}
sum(case when {{ column_name }} = '{{ val }}' then {{ aggregate_col }} else 0 end) as {{ val }}_amount
{% if not loop.last %},{% endif %}
{% endfor %}
{% endmacro %}Usage in intermediate model:
select
order_id,
{{ pivot_sum('payment_method', ['credit_card', 'coupon', 'bank_transfer', 'gift_card']) }}
from {{ ref('stg_stripe__payments') }}
group by 1🎯 Verification & Diagnostics
- Compile SQL with Resolved Jinja:
dbt compile --select fct_orders - Execute Targeted Subgraph:
dbt run --select +fct_orders # Run fct_orders and all upstream dependencies dbt test --select stg_stripe+ # Test staging models and downstream marts - Build Documentation & DAG Visualizer:
dbt docs generate && dbt docs serve
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

