New to Claude Skills? Learn how to install them →

wshobson on GitHub

Data Quality Frameworks

Free

Ensure reliable data pipelines with validation tools.

Get this skill

Free · Opens the source repo

What Data Quality Frameworks does

Data Quality Frameworks provides a structured approach to implementing data quality checks using tools like Great Expectations, dbt tests, and data contracts. This skill is particularly useful for data engineers and analysts who are responsible for maintaining the integrity of data across various pipelines. By leveraging established patterns and practices, users can automate validation processes and ensure that their data meets specified quality standards.

The framework encompasses several dimensions of data quality, including completeness, uniqueness, validity, accuracy, consistency, and timeliness. Each dimension is supported by specific checks that can be integrated into data pipelines. For example, users can validate that there are no missing values in critical columns or ensure that data entries are unique. This skill also facilitates the establishment of data contracts, which help define expectations between teams regarding data quality and usage.

The quick start guide provides essential commands and code snippets for setting up Great Expectations and implementing validation checks. Users can create expectation suites, add validation rules, and run checkpoints to verify data quality. The built-in reporting functionality allows teams to monitor the results of their validations, making it easier to identify and address issues as they arise.

Overall, Data Quality Frameworks is a valuable tool for teams looking to enhance their data quality practices. It supports a proactive approach to data validation, enabling users to catch problems early and maintain high standards for their data assets.

When to use it

Use this skill when implementing data quality checks in your data pipelines or when establishing data contracts between teams.

When not to use it

This skill may not be suitable for environments where data quality is not a priority or where simpler validation methods suffice.

What you can build with it

Implementing Data Quality Checks

Use this skill to set up automated data quality checks in your ETL pipelines, ensuring data integrity throughout the process.

Creating Expectation Suites

Quickly create and manage expectation suites in Great Expectations to validate data against your quality standards.

Establishing Data Contracts

Facilitate collaboration between teams by defining and monitoring data contracts to ensure everyone adheres to agreed data quality metrics.

How to install Data Quality Frameworks

View source

1. Install with the skills CLI

npx skills add wshobson/agents/data-quality-frameworks --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by wshobson

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

DimensionDescriptionExample Check
CompletenessNo missing valuesexpect_column_values_to_not_be_null
UniquenessNo duplicatesexpect_column_values_to_be_unique
ValidityValues in expected rangeexpect_column_values_to_be_in_set
AccuracyData matches realityCross-reference validation
ConsistencyNo contradictionsexpect_column_pair_values_A_to_be_greater_than_B
TimelinessData is recentexpect_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

Frequently asked questions about Data Quality Frameworks

Similar skills