dbt-transformation-patterns
Skill0 starsChanged 10 months agoMITView on GitHub
Expert in dbt (data build tool) for SQL-first analytics engineering—model organization, incremental strategies, testing, documentation, and lineage management. Use when building dbt projects, designing transformation models, implementing incremental strategies, testing data quality, or managing dbt documentation.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- ControllableModel/SWE-Skills-Benchtheir own version, first seen Nov 8, 2026
- amanuelmamo7/Skillstheir own version, first seen Nov 7, 2026
- KumailQazi/krmaazha-binance-mcptheir own version, first seen Oct 17, 2026
- xfstudio/skillstheir own version, first seen Oct 13, 2026
- Samueladewole/claude-skillstheir own version, first seen Oct 13, 2026
- Ghosteken/agent-harnesstheir own version, first seen Oct 1, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- xfstudio/skills★ 9same name
- ControllableModel/SWE-Skills-Bench★ 8same name
- KumailQazi/krmaazha-binance-mcp★ 4same name
- ai4brands-design/claude-skills★ 2same name
- CodeWithBehnam/cc-docs★ 2same name
- Ghosteken/agent-harness★ 2same name
- amanuelmamo7/Skills★ 1same name
- Samueladewole/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository33 other files it gives its agents.
- architectSkill
- brainstormingSkill
- concise-planningSkill
- context-engineerSkill
- data-deprecation-analysisSkill
- data-modelerSkill
- data-pipeline-engineerSkill
- data-quality-frameworksSkill
- github-workflow-automationSkill
- guardianSkill
- implementerSkill
- json-to-pydanticSkill
- llm-app-patternsSkill
- navigatorSkill
- ops-managerSkill
- orchestratorSkill
- principal-data-engineerSkill
- product-manager-toolkitSkill
- proj-memorySkill
- prompt-librarySkill
- qa-testerSkill
- researcherSkill
- senior-data-engineerSkill
- software-architectureSkill
- spark-optimizationSkill
- sql-optimization-patternsSkill
- state-managerSkill
- subagent-driven-developmentSkill
- thinkerSkill
- top-web-vulnerabilitiesSkill
- verification-before-completionSkill
- web-design-guidelinesSkill
- workflow-managerSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Use this skill when:
- Distinctive: line 64
Create intermediate models (business logic, joins)
- Distinctive: line 69
Add column and model tests
- Distinctive: line 98
Delete+Insert: Default; good for append-only data
- Very specific: line 105
Hardcoded Dates: Use {{ var() }} for parameters, not hardcoded filters.
- Distinctive: line 117
All models must pass testing before deployment
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
- sql
- analytics
- transformations
dbt Transformation Patterns
Overview
The dbt Transformation Patterns skill focuses on building production-grade analytics transformations with dbt—from project structure through testing and documentation. This is a specialized, deep-focus skill for analytics engineers and data engineers implementing SQL transformations.
Use this skill when:
- Building or restructuring a dbt project
- Implementing incremental models for large datasets
- Setting up testing and documentation
- Optimizing dbt model organization and materialization
- Creating reusable macros and transformations
Core Capabilities
- Project Architecture: Organize models into staging, intermediate, and marts layers
- Incremental Strategies: Choose delete+insert, merge, or insert-overwrite based on warehouse and data patterns
- Testing Framework: Design comprehensive test suites (schema, data quality, relationships)
- Documentation: Generate and maintain dbt docs, column-level lineage, model descriptions
- Macro Development: Build DRY, reusable SQL macros for common transformations
- Performance Tuning: Optimize dbt DAG, materialization strategy, and warehouse execution
When to Use
When to Use
- Building a new dbt project or restructuring an existing one
- Implementing incremental models for large fact/event tables
- Setting up automated testing and data quality validation
- Optimizing dbt performance (compile time, execution time, DAG structure)
- Creating reusable macros for transformations
- Establishing documentation and lineage standards
Workflow / Process
Phase 1: Project Structure
- Define source system definitions and mappings
- Design layer strategy (staging → intermediate → marts)
- Establish naming conventions and materialization strategy
Phase 2: Model Development
- Build staging models (1:1 with sources, light cleaning)
- Create intermediate models (business logic, joins)
- Build mart models (final dimension and fact tables)
Phase 3: Testing & Documentation
- Add column and model tests
- Define data quality expectations
- Generate and validate dbt docs
Phase 4: Optimization
- Tune materialization (view vs table vs ephemeral vs incremental)
- Optimize incremental strategies for full-refresh vs run speed
- Monitor dbt run time and warehouse costs
Standards & Best Practices
Project Organization
- Staging: 1:1 with sources, minimal transformations, documented column lineage
- Intermediate: Business logic, joins, aggregations; ephemeral unless reused
- Marts: Final analytics tables (dimensions and facts), fully tested
- Naming:
stg_(staging),int_(intermediate),dim_/fct_(marts)
Testing Strategy
- Schema Tests: Column-level (not null, unique) on all key columns
- Relationship Tests: Foreign key integrity to upstream models
- Custom Tests: Business rule validation (amounts >= 0, statuses in enum)
- Test Coverage: Goal is 100% on dimensions and facts; 80%+ on staging
Incremental Models
- Use for: Tables > 1M rows where full refresh becomes expensive
- Delete+Insert: Default; good for append-only data
- Merge: Best for tables with updates to existing rows
- Insert Overwrite: Partition-based; efficient for time-series data
Common Pitfalls
- Raw → Mart in One Model: Creates tech debt. Always stage data first.
- Hardcoded Dates: Use
{{ var() }}for parameters, not hardcoded filters. - Duplicate Logic: Extract repeated SQL to macros, not copy-paste.
- No Testing: Prevents bugs from propagating downstream. Test aggressively.
- Ignoring Source Freshness: Data staleness breaks analytics. Monitor it.
- Over-Materialization: Materialize as table only when necessary (marts, heavy joins).
- Not Using Incremental: Full refresh becomes expensive; incremental catches late arrivals.
Constraints
Technical Constraints:
- Cannot modify source system definitions without architect approval
- All models must pass testing before deployment
- Incremental strategies must handle late-arriving and updated data correctly
Scope Constraints:
- In Scope: Model development, SQL transformations, dbt macros, testing, documentation
- Out of Scope: Data pipeline orchestration (use data-pipeline-engineer), source system setup (use architect)
Integration Points
| Phase | Input From | Output To | Context |
| Requirements | architect, data-pipeline-engineer | Model design | Understanding data domain and staging inputs |
| Source Definitions | data-pipeline-engineer | Staging models | Raw data from pipelines becomes transformed |
| Quality Validation | data-quality-frameworks | dbt tests | Data quality expectations embedded in tests |
| Documentation | Model metadata | Analytics tools (Tableau, Looker) | dbt docs provide lineage and column descriptions |
| Optimization | Performance issues | senior-data-engineer | Complex tuning or architectural redesign |
Reference Examples
See examples/ directory for:
- Complete project structure (staging/intermediate/marts)
- Source definitions and freshness monitoring
- Incremental model implementations
- Testing suites (schema, relationships, custom)
- Macro examples (DRY transformations)
- dbt commands reference
Version History:
- 1.0 (2026-01-24): dbt-focused analytics engineering skill
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.

