agentleFS
XData-siXData-si/xdata-agenthub/skills/data-quality-checks/SKILL.md

data-quality-checks

Skill1 starsChanged 33 days agoMITView on GitHub

Define and implement data quality checks and data contracts — freshness, volume, schema, uniqueness, validity, referential integrity and reconciliation — with owners, thresholds and alerting. Use when stakeholders distrust a dataset, before exposing data to ML or reports, or when introducing data contracts between teams.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run checks with read-only credentials.

    line 50

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Data Quality Checks

Goal

Detect broken data before people or models use it, with checks that are owned, cheap to run and tuned to avoid alert fatigue.

Inputs

  • Critical datasets and their consumers, known past incidents, current tests, tooling (dbt tests, Great Expectations, Soda, SQL checks), alert routing.

Procedure

  1. Pick critical data elements: the tables and columns behind key decisions, reports or models. Start with 5–10, not everything.
  2. Write a data contract per dataset: schema, semantics of key columns, freshness SLA, allowed values, owner, change process.
  3. Implement check types:
    DimensionExample check
    freshnessmax(updated_at) within 2 h of now
    volumedaily row count within ±30 % of the 28-day median
    schemaexpected columns and types present
    uniquenessprimary key has no duplicates
    completenesscustomer_id not null in 100 % of orders
    validitycountry in ISO 3166 list; amounts ≥ 0
    integrityevery order.customer_id exists in customers
    reconciliationwarehouse revenue matches source system within 0.5 %
  4. Severity: blocking checks stop downstream jobs (or quarantine data); warning checks notify the owner.
  5. Thresholds from history, not guesses; review false positives monthly.
  6. Alert routing to the dataset owner with context (failed rows sample, query link) — without personal data in the alert.
  7. Track: incidents and check failures over time; add a check for every incident that reached consumers.

Example fixture

-- volume anomaly check
SELECT COUNT(*) AS n FROM orders WHERE order_date = CURRENT_DATE - 1;
-- compare with median of previous 28 days; fail if outside ±30 %

Acceptance checks

  • Each critical dataset has a contract, an owner and at least freshness, volume and key checks.
  • Negative case: injecting duplicate keys or a stale load in a test environment triggers the expected blocking check.
  • Thresholds are justified by historical data, documented next to the check.

Output

Contracts, checks in code, alert routing, and a dashboard of check status.

Safety

Run checks with read-only credentials. Failed-row samples can contain personal data — store them with restricted access and short retention. Enabling blocking checks (which stop downstream jobs) or new alert routes changes production behaviour: agree them with the dataset owner and consumers first.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.