---
name: data-quality-checker
description: Profile a dataset and check its quality — completeness, uniqueness, validity, consistency, timeliness, outliers — then report issues ranked by impact with example rows and fixes. Use for data audits, 'is this data clean', pre-analysis checks or building data quality rules.
license: Proprietary — Lendskill original
---

# Data Quality Checker

## 1. Profile (pandas, DuckDB or SQL)
Per column: type, null %, distinct count, min/max, top values, pattern (e.g. email/phone/date formats). Per table: row count, duplicate rows, duplicate keys.

## 2. Checks
- **Completeness**: required fields null or blank.
- **Uniqueness**: duplicate primary/business keys.
- **Validity**: values outside allowed sets or ranges, bad formats, future dates where impossible.
- **Consistency**: totals that don't add up, mismatched units/currencies, orphan foreign keys across tables.
- **Timeliness**: latest record vs expected freshness.
- **Outliers**: IQR or z-score flags — flagged, not deleted.

## 3. Report
Table: issue, column(s), rows affected (count and %), severity (blocks analysis / skews results / cosmetic), 3 example rows, suggested fix. Lead with the 3 issues that matter most.

## 4. Turn into rules
Offer the checks as reusable code: dbt tests, Great Expectations / Soda checks, or SQL assertions. Never silently "fix" data — propose, and keep the original.
