Skip to content

borghei/Claude-Skills / data-analytics/analytics-engineer

analytics-engineer

Verified

Analytics engineering across data modeling, dbt, transformation, and semantic layers. Use when building dbt models, designing star schemas, writing staging or mart SQL, configuring data tests, or optimizing warehouse queries.

FileKindSize
REFERENCE.mdmarkdown4.2 KB
SKILL.mdskill md13.4 KB
assets/dbt_project.ymlconfig1.1 KB
assets/macros.sqlother1.5 KB
assets/schema.ymlconfig1.4 KB
assets/source.ymlconfig1.0 KB
references/dbt_style_guide.mdmarkdown2.7 KB
references/modeling_patterns.mdmarkdown3.2 KB
references/optimization.mdmarkdown3.0 KB
references/testing_guide.mdmarkdown2.4 KB
scripts/doc_generator.pyexecutablescript3.2 KB
scripts/impact_analyzer.pyexecutablescript3.5 KB
scripts/quality_scorer.pyexecutablescript3.9 KB
scripts/schema_diff.pyexecutablescript4.0 KB

assets/macros.sql

View on GitHub
-- 1. Customize Schema Names based on Environments
-- By default, dbt appends custom schemas like `dev_username_custom`.
-- This enforces that Production builds strictly into their raw defined folders.
{% macro generate_schema_name(custom_schema_name, node) -%}
    {%- set default_schema = target.schema -%}
    
    {%- if target.name == 'prod' -%}
        {%- if custom_schema_name is none -%}
            {{ default_schema }}
        {%- else -%}
            {{ custom_schema_name | trim }}
        {%- endif -%}
    {%- else -%}
        {%- if custom_schema_name is none -%}
            {{ default_schema }}
        {%- else -%}
            {{ default_schema }}_{{ custom_schema_name | trim }}
        {%- endif -%}
    {%- endif -%}
{%- endmacro %}

-- 2. Incremental Lookback Filter
-- NOTE: This macro only emits SQL inside incremental models (uses is_incremental() guard).
-- Always call within an incremental model; in non-incremental context it returns empty string.
{% macro get_incremental_filter(column_name, default_lookback=3) %}
    {% if is_incremental() %}
        -- Grab from global variables or fallback to default
        {% set lookback = var('incremental_lookback_days', default_lookback) %}
        
        WHERE {{ column_name }} >= (
            SELECT DATEADD(day, -{{ lookback }}, MAX({{ column_name }}))
            FROM {{ this }}
        )
    {% endif %}
{% endmacro %}

-- 3. Dynamic Field Casting
{% macro cents_to_dollars(column_name, decimal_places=2) %}
    ROUND( CAST({{ column_name }} AS FLOAT) / 100.0, {{ decimal_places }} )
{% endmacro %}
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 197kUpdated Claude CodeCodexVerifiedInstall