areas/software/data-engineering/skills/dbt-patterns/SKILL.md
# Skill: dbt Development Patterns ## When to load When building dbt models, writing macros, or configuring materializations. ## Materialization Strategy | Layer | Materialization | Why | |:---|:---|:---| | `staging/` | `view` | Always reflects source | | `intermediate/` | `ephemeral` | Reduce clutter | | `marts/` | `table` or `incremental` | Pre-computed for BI | ## Incremental Model ```sql {{ config( materialized='incremental', unique_key='order_id', incrementa
npx skillsauth add sawrus/agent-guides areas/software/data-engineering/skills/dbt-patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When building dbt models, writing macros, or configuring materializations.
| Layer | Materialization | Why |
|:---|:---|:---|
| staging/ | view | Always reflects source |
| intermediate/ | ephemeral | Reduce clutter |
| marts/ | table or incremental | Pre-computed for BI |
{{
config(
materialized='incremental',
unique_key='order_id',
incremental_strategy='merge',
partition_by={'field': 'order_date', 'data_type': 'date'},
)
}}
SELECT order_id, user_id, order_date, total_amount
FROM {{ ref('stg_orders') }}
{% if is_incremental() %}
WHERE order_date >= (SELECT MAX(order_date) FROM {{ this }}) - INTERVAL '3 days'
{% endif %}
{% macro audit_columns() %}
CURRENT_TIMESTAMP AS loaded_at,
'{{ invocation_id }}' AS dbt_invocation_id,
'{{ this.name }}' AS dbt_model
{% endmacro %}
testing
QA Expert for writing E2E tests, test scenarios, test plans, and ensuring test coverage quality.
development
Expert UI/UX design intelligence for creating distinctive, high-craft, and mobile-first interfaces. Focuses on premium aesthetics, touch-first ergonomics, and Flutter performance.
development
Code Review Expert for static analysis, security auditing, architecture review, and ensuring code quality standards.
development
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep watching open PRs so fresh review feedback is surfaced promptly. Use when the user asks Codex to monitor a PR, watch CI, handle review comments, or keep an eye on failures and feedback on an open PR.