dbt-macros
CommunityWrite portable dbt macros with confidence.
Authorivanshamaev
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps you write reusable dbt Jinja macros that compile reliably and behave correctly across environments and warehouses, reducing fragile copy-paste SQL and hardcoded dialect logic.
Core Features & Use Cases
- Jinja macro fundamentals for dbt: Use expressions, control flow, filters, whitespace control, and context variables to generate correct SQL.
- Safe dynamic execution: Build macros that run warehouse queries only when dbt is executing (not during compile/docs), using run_query and execute guards.
- Cross-database portability: Implement dialect-specific behavior with adapter.dispatch and override built-in dbt macros for naming/aliasing/schema conventions.
- Production-grade macro patterns: Create common building blocks like dynamic pivots, unioning relations by column alignment, audit columns, grants, idempotent DDL, and column-existence checks.
Quick Start
Activate the skill when your task is to implement a cross-database dbt macro that safely uses run_query and adapter.dispatch to generate dynamic SQL for models.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: dbt-macros Download link: https://github.com/ivanshamaev/de-agent-skills/archive/main.zip#dbt-macros Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.