Agent skill

Transforming Data

by ancoleman in ancoleman/ai-design-components

Transform raw data into analytical assets using ETL/ELT patterns, SQL (dbt), Python (pandas/polars/PySpark), and orchestration (Airflow).

MITAuto-check passedData & Analytics

Install Transforming Data

skills CLI
$ npx skills add ancoleman/ai-design-components --skill transforming-data -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ancoleman/ai-design-components transforming-data --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ancoleman/ai-design-components.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/transforming-data .claude/skills/transforming-data && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
transforming-data
GitHub stars
526
Token cost
~3k tokens
SKILL.md length
792 words
Files
20 (incl. scripts, references)
Skills in repo
75
Repo updated
First seen
Licence
MIT

At a glance

Transform raw data into analytical assets using ETL/ELT patterns, SQL (dbt), Python (pandas/polars/PySpark), and orchestration (Airflow).

  • Works in 3 steps: Staging Layer (models/staging/) → Intermediate Layer (models/intermediate/) → Marts Layer (models/marts/)
  • Building data pipelines
  • SKILL.md covers Purpose, When to Use, Quick Start: Common Patterns and Decision Frameworks, plus 6 more sections
  • Runs Python scripts from its folder; calls pip

What it does

Transforming Data is an agent skill from ancoleman/ai-design-components. Transform raw data into analytical assets using ETL/ELT patterns, SQL (dbt), Python (pandas/polars/PySpark), and orchestration (Airflow). Use when building data pipelines, implementing incremental models, migrating from pandas to polars, or orchestrating multi-step transformations with testing and quality checks.

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 23 other files, including scripts and reference files (for example `examples/python/airflow-data-pipeline.py`, `examples/python/pandas-basics.py` and `examples/python/polars-migration.py`).

It sits in Data & Analytics, covering Data pipelines and ETL and DataFrames. It works with dbt, Polars, pandas and Apache Airflow. The repository describes itself as: Comprehensive UI/UX and Backend component design skills for AI-assisted development with Claude. The licence is MIT.

When your agent uses it

  • Building data pipelines
  • Implementing incremental models
  • Migrating from pandas to polars
  • Orchestrating multi-step transformations with testing and quality checks

Example prompts

  • “/transforming-data”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Staging Layer (models/staging/)
  2. Intermediate Layer (models/intermediate/)
  3. Marts Layer (models/marts/)

What it can do on your machine

Read from SKILL.md and the folder at commit 76551b7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Transforming Data loads about 3k tokens when it runs, and up to ~21k if it reads all its reference files. Until then it costs about 83 tokens; SKILL.md has 792 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~83
When it runs · the whole SKILL.md, loaded when a task matches
~3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~21k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ancoleman/ai-design-components at commit 76551b7, republished under its MIT licence (© ancoleman). 792 words, ~3,022 tokens.

Download SKILL.mdSave it as .claude/skills/transforming-data/SKILL.md (or your agent's skills folder). This skill also uses 19 other files; get the full folder from GitHub.
name
transforming-data
description
Transform raw data into analytical assets using ETL/ELT patterns, SQL (dbt), Python (pandas/polars/PySpark), and orchestration (Airflow). Use when building data pipelines, implementing incremental models, migrating from pandas to polars, or orchestrating multi-step transformations with testing and quality checks.

Data Transformation

Transform raw data into analytical assets using modern transformation patterns, frameworks, and orchestration tools.

Purpose

Select and implement data transformation patterns across the modern data stack. Transform raw data into clean, tested, and documented analytical datasets using SQL (dbt), Python DataFrames (pandas, polars, PySpark), and pipeline orchestration (Airflow, Dagster, Prefect).

When to Use

Invoke this skill when:

  • Choosing between ETL and ELT transformation patterns
  • Building dbt models (staging, intermediate, marts)
  • Implementing incremental data loads and merge strategies
  • Migrating pandas code to polars for performance improvements
  • Orchestrating data pipelines with dependencies and retries
  • Adding data quality tests and validation
  • Processing large datasets with PySpark
  • Creating production-ready transformation workflows

Quick Start: Common Patterns

dbt Incremental Model
sql
{{
  config(
    materialized='incremental',
    unique_key='order_id'
  )
}}

select order_id, customer_id, order_created_at, sum(revenue) as total_revenue
from {{ ref('int_order_items_joined') }}
group by 1, 2, 3

{% if is_incremental() %}
    where order_created_at > (select max(order_created_at) from {{ this }})
{% endif %}
polars High-Performance Transformation
python
import polars as pl

result = (
    pl.scan_csv('large_dataset.csv')
    .filter(pl.col('year') == 2024)
    .with_columns([(pl.col('quantity') * pl.col('price')).alias('revenue')])
    .group_by('region')
    .agg(pl.col('revenue').sum())
    .collect()  # Execute lazy query
)
Airflow Data Pipeline
python
from airflow import DAG
from airflow.operators.python import PythonOperator
from datetime import datetime, timedelta

with DAG(
    dag_id='daily_sales_pipeline',
    schedule_interval='0 2 * * *',
    default_args={'retries': 2, 'retry_delay': timedelta(minutes=5)},
    start_date=datetime(2024, 1, 1),
    catchup=False
) as dag:
    extract = PythonOperator(task_id='extract', python_callable=extract_data)
    transform = PythonOperator(task_id='transform', python_callable=transform_data)
    extract >> transform

Decision Frameworks

ETL vs ELT Selection

Use ELT (Extract, Load, Transform) when:

  • Using modern cloud data warehouse (Snowflake, BigQuery, Databricks)
  • Transformation logic changes frequently
  • Team includes SQL analysts
  • Data volume 10GB-1TB+ (leverage warehouse parallelism)

Tools: dbt, Dataform, Snowflake tasks, BigQuery scheduled queries

Use ETL (Extract, Transform, Load) when:

  • Regulatory compliance requires pre-load data redaction (PII/PHI)
  • Target system lacks compute power
  • Real-time streaming with immediate transformation
  • Legacy systems without cloud warehouse

Tools: AWS Glue, Azure Data Factory, custom Python scripts

Use Hybrid when combining sensitive data cleansing (ETL) with analytics transformations (ELT).

Default recommendation: ELT with dbt unless specific compliance or performance constraints require ETL.

For detailed patterns, see references/etl-vs-elt-patterns.md.

DataFrame Library Selection

Choose pandas when:

  • Data size < 500MB
  • Prototyping or exploratory analysis
  • Need compatibility with pandas-only libraries

Choose polars when:

  • Data size 500MB-100GB
  • Performance critical (10-100x faster than pandas)
  • Production pipelines with memory constraints
  • Want lazy evaluation with query optimization

Choose PySpark when:

  • Data size > 100GB
  • Need distributed processing across cluster
  • Existing Spark infrastructure (EMR, Databricks)

Migration path: pandas → polars (easier, similar API) or pandas → PySpark (requires cluster)

For comparisons and migration guides, see references/dataframe-comparison.md.

Orchestration Tool Selection

Choose Airflow when:

  • Enterprise production (proven at scale)
  • Need 5,000+ integrations
  • Managed services available (AWS MWAA, GCP Cloud Composer)

Choose Dagster when:

  • Heavy dbt usage (native dbt_assets integration)
  • Data lineage and asset-based workflows prioritized
  • ML pipelines requiring testability

Choose Prefect when:

  • Dynamic workflows (runtime task generation)
  • Cloud-native architecture preferred
  • Pythonic API with decorators

Safe default: Airflow (battle-tested) unless specific needs for Dagster/Prefect.

For detailed patterns, see references/orchestration-patterns.md.

SQL Transformations with dbt

Model Layer Structure
  1. Staging Layer (models/staging/)

    • 1:1 with source tables
    • Minimal transformations (renaming, type casting, basic filtering)
    • Materialized as views or ephemeral
  2. Intermediate Layer (models/intermediate/)

    • Business logic and complex joins
    • Not exposed to end users
    • Often ephemeral (CTEs only)
  3. Marts Layer (models/marts/)

    • Final models for reporting
    • Fact tables (events, transactions)
    • Dimension tables (customers, products)
    • Materialized as tables or incremental
dbt Materialization Types

View: Query re-run each time model referenced. Use for fast queries, staging layer.

Table: Full refresh on each run. Use for frequently queried models, expensive computations.

Incremental: Only processes new/changed records. Use for large fact tables, event logs.

Ephemeral: CTE only, not persisted. Use for intermediate calculations.

Show full SKILL.md (299 more words)Show less
dbt Testing
yaml
models:
  - name: fct_orders
    columns:
      - name: order_id
        tests:
          - unique
          - not_null
      - name: customer_id
        tests:
          - relationships:
              to: ref('dim_customers')
              field: customer_id
      - name: total_revenue
        tests:
          - dbt_utils.accepted_range:
              min_value: 0

For comprehensive dbt patterns, see:

  • references/dbt-best-practices.md
  • references/incremental-strategies.md

Python DataFrame Transformations

pandas Transformation
python
import pandas as pd

df = pd.read_csv('sales.csv')
result = (
    df
    .query('year == 2024')
    .assign(revenue=lambda x: x['quantity'] * x['price'])
    .groupby('region')
    .agg({'revenue': ['sum', 'mean']})
)
polars Transformation (10-100x Faster)
python
import polars as pl

result = (
    pl.scan_csv('sales.csv')  # Lazy evaluation
    .filter(pl.col('year') == 2024)
    .with_columns([(pl.col('quantity') * pl.col('price')).alias('revenue')])
    .group_by('region')
    .agg([
        pl.col('revenue').sum().alias('revenue_sum'),
        pl.col('revenue').mean().alias('revenue_mean')
    ])
    .collect()  # Execute lazy query
)

Key differences:

  • polars uses scan_csv() (lazy) vs pandas read_csv() (eager)
  • polars uses with_columns() vs pandas assign()
  • polars uses pl.col() expressions vs pandas string references
  • polars requires collect() to execute lazy queries
PySpark for Distributed Processing
python
from pyspark.sql import SparkSession, functions as F

spark = SparkSession.builder.appName("Transform").getOrCreate()
df = spark.read.csv('sales.csv', header=True, inferSchema=True)

result = (
    df
    .filter(F.col('year') == 2024)
    .withColumn('revenue', F.col('quantity') * F.col('price'))
    .groupBy('region')
    .agg(F.sum('revenue').alias('total_revenue'))
)

For migration guides, see references/dataframe-comparison.md.

Pipeline Orchestration

Airflow DAG Structure
python
from airflow import DAG
from airflow.operators.python import PythonOperator
from datetime import datetime, timedelta

default_args = {
    'owner': 'data-engineering',
    'retries': 2,
    'retry_delay': timedelta(minutes=5)
}

with DAG(
    dag_id='data_pipeline',
    default_args=default_args,
    schedule_interval='0 2 * * *',  # Daily at 2 AM
    start_date=datetime(2024, 1, 1),
    catchup=False
) as dag:
    task1 = PythonOperator(task_id='extract', python_callable=extract_fn)
    task2 = PythonOperator(task_id='transform', python_callable=transform_fn)
    task1 >> task2  # Define dependency
Task Dependency Patterns

Linear: A >> B >> C (sequential) Fan-out: A >> [B, C, D] (parallel after A) Fan-in: [A, B, C] >> D (D waits for all)

For Airflow, Dagster, and Prefect patterns, see references/orchestration-patterns.md.

Data Quality and Testing

dbt Tests

Generic tests (reusable): unique, not_null, accepted_values, relationships

Singular tests (custom SQL):

sql
-- tests/assert_positive_revenue.sql
select * from {{ ref('fct_orders') }}
where total_revenue < 0
Great Expectations
python
import great_expectations as gx

context = gx.get_context()
suite = context.add_expectation_suite("orders_suite")

suite.add_expectation(
    gx.expectations.ExpectColumnValuesToNotBeNull(column="order_id")
)
suite.add_expectation(
    gx.expectations.ExpectColumnValuesToBeBetween(
        column="total_revenue", min_value=0
    )
)

For comprehensive testing patterns, see references/data-quality-testing.md.

Advanced SQL Patterns

Window functions for analytics:

sql
select
    order_date,
    daily_revenue,
    avg(daily_revenue) over (
        partition by region
        order by order_date
        rows between 6 preceding and current row
    ) as revenue_7d_ma,
    sum(daily_revenue) over (
        partition by region
        order by order_date
    ) as cumulative_revenue
from daily_sales

For advanced window functions, see references/window-functions-guide.md.

Production Best Practices

Idempotency

Ensure transformations produce same result when run multiple times:

  • Use merge statements in incremental models
  • Implement deduplication logic
  • Use unique_key in dbt incremental models
Incremental Loading
sql
{% if is_incremental() %}
    where created_at > (select max(created_at) from {{ this }})
{% endif %}
Error Handling
python
try:
    result = perform_transformation()
    validate_result(result)
except ValidationError as e:
    log_error(e)
    raise
Monitoring
  • Set up Airflow email/Slack alerts on task failure
  • Monitor dbt test failures
  • Track data freshness (SLAs)
  • Log row counts and data quality metrics

Tool Recommendations

SQL Transformations: dbt Core (industry standard, multi-warehouse, rich ecosystem)

bash
pip install dbt-core dbt-snowflake

Python DataFrames: polars (10-100x faster than pandas, multi-threaded, lazy evaluation)

bash
pip install polars

Orchestration: Apache Airflow (battle-tested at scale, 5,000+ integrations)

bash
pip install apache-airflow

Examples

Working examples in:

  • examples/python/pandas-basics.py - pandas transformations
  • examples/python/polars-migration.py - pandas to polars migration
  • examples/python/pyspark-transformations.py - PySpark operations
  • examples/python/airflow-data-pipeline.py - Complete Airflow DAG
  • examples/sql/dbt-staging-model.sql - dbt staging layer
  • examples/sql/dbt-intermediate-model.sql - dbt intermediate layer
  • examples/sql/dbt-incremental-model.sql - Incremental patterns
  • examples/sql/window-functions.sql - Advanced SQL

Scripts

  • scripts/generate_dbt_models.py - Generate dbt model boilerplate
  • scripts/benchmark_dataframes.py - Compare pandas vs polars performance

For data ingestion patterns, see ingesting-data. For data visualization, see visualizing-data. For database design, see databases-* skills. For real-time streaming, see streaming-data. For data platform architecture, see ai-data-engineering. For monitoring pipelines, see observability.

© ancoleman, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 19 other files (scripts, references) in skills/transforming-data of ancoleman/ai-design-components.

  • SKILL.md
  • examples/python/airflow-data-pipeline.py
  • examples/python/pandas-basics.py
  • examples/python/polars-migration.py
  • examples/python/pyspark-transformations.py
  • examples/sql/dbt-incremental-model.sql
  • examples/sql/dbt-intermediate-model.sql
  • examples/sql/dbt-staging-model.sql
  • examples/sql/window-functions.sql
  • outputs.yaml
  • references/data-quality-testing.md
  • references/dataframe-comparison.md
  • references/dbt-best-practices.md
  • references/etl-vs-elt-patterns.md
  • references/incremental-strategies.md
  • references/orchestration-patterns.md
  • references/window-functions-guide.md
  • … and 3 more

Open the folder on GitHubat commit 76551b7

Compare with similar skills

Transforming Data next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Transforming Data compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Transforming Data this skillancoleman/ai-design-components526—~3kAutomated safety check: PassMIT
Senior Data Engineerbenchflow-ai/skillsbench1.8k—~5.9kAutomated safety check: PassMIT
Senior Data Engineeralirezarezvani/claude-skills28k3 repos~1.4kAutomated safety check: PassMIT
Senior Data Engineerdavila7/claude-code-templates32k1 repos~1.4kAutomated safety check: PassMIT
Python Pipelinejamditis/claude-skills-journalism416—~4.8kAutomated safety check: PassMIT
Analyzing Dataastronomer/agents451—~1.3kAutomated safety check: PassApache-2.0

Similar skills

  • Senior Data Engineer

    benchflow-ai/skillsbench

    World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, real-time streaming, and data infrastructure.

    1.8k GitHub stars~5.9k tokensUpdated 2 mo ago
    Data & AnalyticsAuto-check passed
  • Senior Data Engineer

    alirezarezvani/claude-skills

    Data engineering skill for building scalable data pipelines, ETL/ELT systems, and data infrastructure.

    28k GitHub starsUsed in 3 repos~1.4k tokens
    Data & AnalyticsAuto-check passed
  • Senior Data Engineer

    davila7/claude-code-templates

    World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, and data infrastructure.

    32k GitHub starsUsed in 1 repo~1.4k tokens
    Data & AnalyticsAuto-check passed
  • Python Pipeline

    jamditis/claude-skills-journalism

    Python data pipelines with modular architecture. An agent skill from jamditis/claude-skills-journalism.

    416 GitHub stars~4.8k tokensUpdated 3 days ago
    Data & AnalyticsAuto-check passed
  • Analyzing Data

    astronomer/agents

    Queries the data warehouse with SQL and answers business questions about data.

    451 GitHub stars~1.3k tokensUpdated today
    DatabasesAuto-check passed
  • Chdb Datastore

    vemetric/vemetric

    A skill your agent uses when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or speed up slow pandas.

    394 GitHub starsUsed in 2 repos~1.4k tokens
    Data & AnalyticsAuto-check passed

More from ancoleman/ai-design-components

All 75 skills in this repo
  • Building AI Chat

    ancoleman/ai-design-components

    Builds AI chat interfaces and conversational UI with streaming responses, context management, and multi-modal support.

    526 GitHub starsUsed in 1 repo~3.4k tokens
    Auto-check passed
  • Building Forms

    ancoleman/ai-design-components

    Builds form components and data collection interfaces including contact forms, registration flows, checkout processes, surveys, and settings pages.

    526 GitHub stars~3.7k tokensUpdated 10 mo ago
    Auto-check passed
  • Building Tables

    ancoleman/ai-design-components

    Builds tables and data grids for displaying tabular information, from simple HTML tables to complex enterprise data grids.

    526 GitHub stars~1.8k tokensUpdated 10 mo ago
    Auto-check passed
  • Creating Dashboards

    ancoleman/ai-design-components

    Creates comprehensive dashboard and analytics interfaces that combine data visualization, KPI cards, real-time updates, and interactive layouts.

    526 GitHub stars~3.5k tokensUpdated 10 mo ago
    Auto-check passed
  • Designing Layouts

    ancoleman/ai-design-components

    Designs layout systems and responsive interfaces including grid systems, flexbox patterns, sidebar layouts, and responsive breakpoints.

    526 GitHub stars~1.7k tokensUpdated 10 mo ago
    Auto-check passed
  • Displaying Timelines

    ancoleman/ai-design-components

    Displays chronological events and activity through timelines, activity feeds, Gantt charts, and calendar interfaces.

    526 GitHub stars~2.7k tokensUpdated 10 mo ago
    Auto-check passed

Questions about Transforming Data

What does Transforming Data do?

Transform raw data into analytical assets using ETL/ELT patterns, SQL (dbt), Python (pandas/polars/PySpark), and orchestration (Airflow). Transforming Data is an agent skill from ancoleman/ai-design-components. Transform raw data into analytical assets using ETL/ELT patterns, SQL (dbt), Python (pandas/polars/PySpark), and orchestration (Airflow).

When should I use Transforming Data?

Transforming Data fits situations like: building data pipelines; implementing incremental models; migrating from pandas to polars; orchestrating multi-step transformations with testing and quality checks.

How do I install Transforming Data in Claude Code?

Run `npx skills add ancoleman/ai-design-components --skill transforming-data -a claude-code`. Or copy the skill folder (skills/transforming-data in ancoleman/ai-design-components) into .claude/skills/transforming-data in your project. Claude Code loads it when a task matches its description.

How do I install Transforming Data in Codex?

Run `npx skills add ancoleman/ai-design-components --skill transforming-data -a codex`. Or copy the skill folder (skills/transforming-data in ancoleman/ai-design-components) into .agents/skills/transforming-data in your project. Codex loads it when a task matches its description.

Can I use Transforming Data in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ancoleman/ai-design-components --skill transforming-data -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/transforming-data, .gemini/skills/transforming-data, .github/skills/transforming-data and .opencode/skills/transforming-data in your project.

What does Transforming Data need to run?

Going by SKILL.md and its folder, Transforming Data needs Python for the scripts in its folder and the command-line tools its instructions call (pip). Our summary lists: Python 3.

Does Transforming Data access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Transforming Data safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Transforming Data use?

Transforming Data is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Transforming Data use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 18k tokens, read only when the agent opens those files.

What are the alternatives to Transforming Data?

Skills that share tags, products or a category with Transforming Data: Senior Data Engineer (benchflow-ai/skillsbench, 1.8k stars), Senior Data Engineer (alirezarezvani/claude-skills, 28k stars), Senior Data Engineer (davila7/claude-code-templates, 32k stars) and Python Pipeline (jamditis/claude-skills-journalism, 416 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Transforming Data?

ancoleman (a GitHub user) maintains it in ancoleman/ai-design-components, which has 526 GitHub stars. The repository holds 75 skills in this directory. The repository was last updated on December 11, 2025.

Source: ancoleman/ai-design-components on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.