skills/data-quality-guardian/SKILL.md
Great Expectations, dbt tests, anomaly detection, and data contracts for data quality. Activate on: data quality, data validation, Great Expectations, data contract, anomaly detection, SLA, freshness check, schema validation. NOT for: dbt model structure (use dbt-analytics-engineer), schema evolution (use schema-evolution-manager).
npx skillsauth add curiositech/windags-skills data-quality-guardianInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Implement comprehensive data quality frameworks with automated validation, anomaly detection, data contracts, and SLA monitoring.
Activate on: "data quality", "data validation", "Great Expectations", "data contract", "anomaly detection", "SLA", "freshness check", "schema validation", "data observability", "Soda", "elementary"
NOT for: dbt project layout → dbt-analytics-engineer | Schema evolution strategy → schema-evolution-manager | Data migration validation → data-migration-specialist
| Domain | Technologies | |--------|-------------| | Testing | dbt tests, Great Expectations 1.x, Soda Core 3.x | | Observability | elementary (dbt), Monte Carlo, Anomalo | | Contracts | Soda data contracts, dbt model contracts, Protobuf schemas | | Anomaly Detection | elementary anomaly monitors, custom z-score, Prophet | | Alerting | Slack/PagerDuty integration, SLA miss alerts |
Raw Data (Landing)
↓
Layer 1: Schema Validation
- Column types match contract
- No unexpected NULLs in required fields
- Row count within expected range
↓
Layer 2: Business Rule Validation
- Referential integrity (FK relationships hold)
- accepted_values constraints
- Custom SQL assertions (e.g., revenue >= 0)
↓
Layer 3: Statistical Anomaly Detection
- Row count deviation from 7-day rolling average
- Null rate spike detection
- Distribution shift (KL divergence)
↓
Layer 4: Freshness & SLA Monitoring
- Source loaded within 2 hours
- Downstream models built within 4 hours
- Dashboard data <6 hours old
# contracts/payments-contract.yml
contract:
name: stripe_payments
owner: payments-team
version: "2.0"
sla:
freshness: 2h # must be updated within 2 hours
volume_min: 1000 # at least 1000 rows per day
volume_max: 500000 # no more than 500k (anomaly if exceeded)
schema:
- name: payment_id
type: string
required: true
unique: true
- name: amount_cents
type: integer
required: true
checks:
- type: range
min: 0
max: 10000000 # $100k max
- name: status
type: string
required: true
checks:
- type: accepted_values
values: [succeeded, failed, pending, refunded]
- name: created_at
type: timestamp
required: true
checks:
- type: not_in_future
# dbt model with elementary anomaly monitors
version: 2
models:
- name: fct_orders
tests:
- elementary.volume_anomalies:
timestamp_column: created_at
where: "created_at > dateadd(day, -30, current_date())"
sensitivity: 3 # z-score threshold
- elementary.column_anomalies:
column_name: total_amount
where: "created_at > dateadd(day, -30, current_date())"
- elementary.freshness_anomalies:
timestamp_column: _loaded_at
sensitivity: 2
unique, not_null, accepted_values, relationshipsdata-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.