Implement data quality validation with Great Expectations

Data quality frameworks

by wshobson · MIT license · ★ 39,857 on GitHub · updated Sep 21

Data quality frameworks cover

Implement data quality validation with Great Expectations, dbt tests, and data contracts. Use when building data quality pipelines, implementing validation rules, or establishing data contracts.

---
name: data-quality-frameworks
description: Implement data quality validation with Great Expectations, dbt tests, and data contracts. Use when building data quality pipelines, implementing validation rules, or establishing data contracts.
---

# Data Quality Frameworks

Production patterns for implementing data quality with Great Expectations, dbt tests, and data contracts to ensure reliable data pipelines.

## When to Use This Skill

- Implementing data quality checks in pipelines
- Setting up Great Expectations validation
- Building comprehensive dbt test suites
- Establishing data contracts between teams
- Monitoring data quality metrics
- Automating data validation in CI/CD

Overview

Production patterns for implementing data quality with Great Expectations, dbt tests, and data contracts to ensure reliable data pipelines.

Manual install (npx, ZIP)
Claude Codenpx skills add wshobson/agents --skill data-quality-frameworks -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/wshobson/agents/tar.gz/4236bb91f839 \ | tar -xz -C ~/.claude/skills --strip-components=4 agents-4236bb91f839/plugins/data-engineering/skills/data-quality-frameworks
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/14b5971af4d223737bea/data-quality-frameworks.zip" -OutFile "$env:TEMP\data-quality-frameworks.zip"; Expand-Archive "$env:TEMP\data-quality-frameworks.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md4.4 KB
  • references/1 file · 11.4 KB
Read the files here
wshobson/4236bb92 files
SKILL.md
Show the full text139 lines

Data Quality Frameworks

Production patterns for implementing data quality with Great Expectations, dbt tests, and data contracts to ensure reliable data pipelines.

When to Use This Skill

  • Implementing data quality checks in pipelines
  • Setting up Great Expectations validation
  • Building comprehensive dbt test suites
  • Establishing data contracts between teams
  • Monitoring data quality metrics
  • Automating data validation in CI/CD

Core Concepts

1. Data Quality Dimensions
Dimension Description Example Check
Completeness No missing values expect_column_values_to_not_be_null
Uniqueness No duplicates expect_column_values_to_be_unique
Validity Values in expected range expect_column_values_to_be_in_set
Accuracy Data matches reality Cross-reference validation
Consistency No contradictions expect_column_pair_values_A_to_be_greater_than_B
Timeliness Data is recent expect_column_max_to_be_between
2. Testing Pyramid for Data
          /\
         /  \     Integration Tests (cross-table)
        /────\
       /      \   Unit Tests (single column)
      /────────\
     /          \ Schema Tests (structure)
    /────────────\

Quick Start

Great Expectations Setup
# Install
pip install great_expectations

# Initialize project
great_expectations init

# Create datasource
great_expectations datasource new
# great_expectations/checkpoints/daily_validation.yml
import great_expectations as gx

# Create context
context = gx.get_context()

# Create expectation suite
suite = context.add_expectation_suite("orders_suite")

# Add expectations
suite.add_expectation(
    gx.expectations.ExpectColumnValuesToNotBeNull(column="order_id")
)
suite.add_expectation(
    gx.expectations.ExpectColumnValuesToBeUnique(column="order_id")
)

# Validate
results = context.run_checkpoint(checkpoint_name="daily_orders")

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Summary: {total_passed}/{total_tables} tables passed")

    report.append("")

    for table, result in results.items():
        status = "✅" if result.passed else "❌"
        report.append(f"### {status} {table}")
        report.append(f"- Expectations: {result.total_expectations}")
        report.append(f"- Failed: {result.failed_expectations}")

        if not result.passed:
            report.append("- Failed checks:")
            for detail in result.details:
                if not detail["success"]:
                    report.append(f"  - {detail['expectation']}: {detail['observed_value']}")
        report.append("")

    return "\n".join(report)

Usage

context = gx.get_context() pipeline = DataQualityPipeline(context)

tables_to_validate = { "orders": "orders_suite", "customers": "customers_suite", "products": "products_suite", }

results = pipeline.run_all(tables_to_validate) report = pipeline.generate_report(results)

Fail pipeline if any table failed

if not all(r.passed for r in results.values()): print(report) raise ValueError("Data quality checks failed!")


## Best Practices

### Do's

- **Test early** - Validate source data before transformations
- **Test incrementally** - Add tests as you find issues
- **Document expectations** - Clear descriptions for each test
- **Alert on failures** - Integrate with monitoring
- **Version contracts** - Track schema changes

### Don'ts

- **Don't test everything** - Focus on critical columns
- **Don't ignore warnings** - They often precede failures
- **Don't skip freshness** - Stale data is bad data
- **Don't hardcode thresholds** - Use dynamic baselines
- **Don't test in isolation** - Test relationships too
1---
2name: data-quality-frameworks
3description: Implement data quality validation with Great Expectations, dbt tests, and data contracts. Use when building data quality pipelines, implementing validation rules, or establishing data contracts.
4---
5 
6# Data Quality Frameworks
7 
8Production patterns for implementing data quality with Great Expectations, dbt tests, and data contracts to ensure reliable data pipelines.
9 
10## When to Use This Skill
11 
12- Implementing data quality checks in pipelines
13- Setting up Great Expectations validation
14- Building comprehensive dbt test suites
15- Establishing data contracts between teams
16- Monitoring data quality metrics
17- Automating data validation in CI/CD
18 
19## Core Concepts
20 
21### 1. Data Quality Dimensions
22 
23| Dimension | Description | Example Check |
24| ---------------- | ------------------------ | -------------------------------------------------- |
25| **Completeness** | No missing values | `expect_column_values_to_not_be_null` |
26| **Uniqueness** | No duplicates | `expect_column_values_to_be_unique` |
27| **Validity** | Values in expected range | `expect_column_values_to_be_in_set` |
28| **Accuracy** | Data matches reality | Cross-reference validation |
29| **Consistency** | No contradictions | `expect_column_pair_values_A_to_be_greater_than_B` |
30| **Timeliness** | Data is recent | `expect_column_max_to_be_between` |
31 
32### 2. Testing Pyramid for Data
33 
34```
35 /\
36 / \ Integration Tests (cross-table)
37 /────\
38 / \ Unit Tests (single column)
39 /────────\
40 / \ Schema Tests (structure)
41 /────────────\
42```
43 
44## Quick Start
45 
46### Great Expectations Setup
47 
48```bash
49# Install
50pip install great_expectations
51 
52# Initialize project
53great_expectations init
54 
55# Create datasource
56great_expectations datasource new
57```
58 
59```python
60# great_expectations/checkpoints/daily_validation.yml
61import great_expectations as gx
62 
63# Create context
64context = gx.get_context()
65 
66# Create expectation suite
67suite = context.add_expectation_suite("orders_suite")
68 
69# Add expectations
70suite.add_expectation(
71 gx.expectations.ExpectColumnValuesToNotBeNull(column="order_id")
72)
73suite.add_expectation(
74 gx.expectations.ExpectColumnValuesToBeUnique(column="order_id")
75)
76 
77# Validate
78results = context.run_checkpoint(checkpoint_name="daily_orders")
79```
80 
81## Detailed patterns and worked examples
82 
83Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.
84 
85## Summary: {total_passed}/{total_tables} tables passed")
86 report.append("")
87 
88 for table, result in results.items():
89 status = "✅" if result.passed else "❌"
90 report.append(f"### {status} {table}")
91 report.append(f"- Expectations: {result.total_expectations}")
92 report.append(f"- Failed: {result.failed_expectations}")
93 
94 if not result.passed:
95 report.append("- Failed checks:")
96 for detail in result.details:
97 if not detail["success"]:
98 report.append(f" - {detail['expectation']}: {detail['observed_value']}")
99 report.append("")
100 
101 return "\n".join(report)
102 
103# Usage
104context = gx.get_context()
105pipeline = DataQualityPipeline(context)
106 
107tables_to_validate = {
108 "orders": "orders_suite",
109 "customers": "customers_suite",
110 "products": "products_suite",
111}
112 
113results = pipeline.run_all(tables_to_validate)
114report = pipeline.generate_report(results)
115 
116# Fail pipeline if any table failed
117if not all(r.passed for r in results.values()):
118 print(report)
119 raise ValueError("Data quality checks failed!")
120```
121 
122## Best Practices
123 
124### Do's
125 
126- **Test early** - Validate source data before transformations
127- **Test incrementally** - Add tests as you find issues
128- **Document expectations** - Clear descriptions for each test
129- **Alert on failures** - Integrate with monitoring
130- **Version contracts** - Track schema changes
131 
132### Don'ts
133 
134- **Don't test everything** - Focus on critical columns
135- **Don't ignore warnings** - They often precede failures
136- **Don't skip freshness** - Stale data is bad data
137- **Don't hardcode thresholds** - Use dynamic baselines
138- **Don't test in isolation** - Test relationships too
139 
View all files on GitHub →

Details

Updated
Sep 21, 2026
License
MIT
Stars on the repo
★ 39,857
Checked
Source
wshobson/agents ↗
Creator
wshobson · 179 listings
View creator

Similar skills

See all →
SkillTranslates Snowflake dbt SQL models to Standardized BigQuerydbt Snowflake to BigQuery Translatorgoogle/skills · by googleTranslates Snowflake dbt SQL models to Standardized BigQuery SQL. Handles SQL compilation, Jinja macro placeholder masking, BigQuery Translation Service migration workflows, AST-based config transformations, explicit type casting, JSON extraction standardization, and deduplication. Use when migrating Snowflake dbt pipelines or models to Google Cloud BigQuery. Don't use for generic BigQuery queries or non-Snowflake SQL migrations.★ 20.9k GitHub starsSkillAnswering business analytics, RevOps, GTM metric, pipelineDeepline analyticsgetaero-io/gtm-eng-skills · by getaero-ioUse this skill when answering business analytics, RevOps, GTM metric, pipeline, revenue, funnel, customer, or warehouse questions with Deepline. Triggers on phrases like 'query Snowflake', 'analyze pipeline', 'total ACV', 'break down by quarter', 'use the semantic layer', 'run a semantic query', or any use of snowflake_get_semantic_layer / snowflake_run_semantic_query. Skip prospecting, enrichment, contact finding, outbound, or personalization workflows; use deepline-gtm for those.★ 66 GitHub starsSkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patternswshobson/agents · by wshobsonBuild production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.★ 39.9k GitHub starsSkillOptimize Apache Spark jobs with partitioning, cachingApache Spark Optimizationwshobson/agents · by wshobsonOptimize Apache Spark jobs with partitioning, caching, shuffle optimization, and memory tuning. Use when improving Spark performance, debugging slow jobs, or scaling data processing pipelines.★ 39.9k GitHub starsSkillMaster dbt for analytics engineering with model organizationDbt transformation patternswshobson/agents · by wshobsonMaster dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.★ 39.9k GitHub starsSkillAudit datasets for completeness, consistency, accuracyData quality auditoralirezarezvani/claude-skills · by alirezarezvaniAudit datasets for completeness, consistency, accuracy, and validity. Profile data distributions, detect anomalies and outliers, surface structural issues, and produce an actionable remediation plan. Use when the user asks to check data quality, profile a dataset, hunt outliers or missing values, or validate data before analysis or model training.★ 26.3k GitHub stars

More from wshobson

SkillMaster C/.NET backend development patterns for buildingwshobson/agents · by wshobsonMaster C#/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications. Covers async/await, dependency injection, Entity Framework Core, Dapper, configuration, caching, and testing with xUnit. Use when developing .NET backends, reviewing C# code, or designing API architectures.★ 39.9k GitHub starsSkillImplement WCAG 2.2 compliant interfaces with mobileAccessibility compliancewshobson/agents · by wshobsonImplement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.★ 39.9k GitHub starsSkillMaster Material Design 3 and Jetpack Compose patternsAndroid Mobile Designwshobson/agents · by wshobsonMaster Material Design 3 and Jetpack Compose patterns for building native Android apps. Use when designing Android interfaces, implementing Compose UI, or following Google's Material Design guidelines.★ 39.9k GitHub starsSkillMigrate from AngularJS to Angular using hybrid modeAngular migrationwshobson/agents · by wshobsonMigrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates. Use when upgrading AngularJS applications, planning framework migrations, or modernizing legacy Angular code.★ 39.9k GitHub starsSkillUnderstand anti-reversing, obfuscationAnti reversing techniqueswshobson/agents · by wshobsonUnderstand anti-reversing, obfuscation, and protection techniques encountered during software analysis. Use this skill when analyzing malware evasion techniques, when implementing anti-debugging protections for CTF challenges, when reverse engineering packed binaries, or when building security research tools that need to detect virtualized environments.★ 39.9k GitHub starsSkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patternswshobson/agents · by wshobsonBuild production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.★ 39.9k GitHub stars