Data profiling

From vm0-ai/vm0-skills · View interactive version

Data profiling is an AI agent skill from the GitHub repository vm0-ai/vm0-skills. Profile datasets for schema, distributions, nulls, cardinality, outliers, relationships, and data quality.

How to use this skill

Skill file

Structural Reconnaissance

Table-Level Inventory

Start every new dataset encounter by answering these questions:

Classifying Columns by Role

Assign every column to one of these categories:

Column-Level Inspection

Universal Checks (All Column Types)

Numeric Measures

Minimum, maximum, mean, median
Standard deviation
Percentile ladder: p1, p5, p25, p75, p95, p99
Count of zeros
Count of negatives (flag if unexpected)

Text and Categorical Fields

Shortest length, longest length, average length
Count of empty strings
Format regularity (do values follow a consistent pattern?)
Case consistency (uniform upper, uniform lower, or mixed?)
Count of values with leading or trailing whitespace

Date and Timestamp Fields

Earliest date, latest date
Count of nulls
Count of future dates (flag if the domain forbids them)
Distribution across months or weeks
Gaps in expected daily/weekly cadence

Boolean Fields

True count, false count, null count
True proportion

Discovering Relationships

After examining columns individually, look for connections:

Evaluating Data Quality

Completeness Ratings

Assign each column a tier:

Consistency Checks

Scan for:

Accuracy Warning Signs

Patterns that suggest the data may be unreliable:

Freshness Assessment

Recognizing Patterns

Distribution Shapes

When profiling a numeric column, classify its shape:

Time-Based Patterns

For any temporal data, investigate:

Segment Discovery

Surface natural groupings by:

Correlation Scanning

Across numeric columns:

Documenting What You Find

Dataset Summary Template


## Table: [schema.table_name]

**Purpose**: [What this table captures]
**Grain**: [One row per...]
**Primary Key**: [column(s)]
**Approximate Rows**: [count, as of date]
**Refresh Cadence**: [real-time / hourly / daily / weekly]
**Responsible Team**: [owner]

### Important Columns

| Column | Type | Meaning | Sample Values | Notes |
|--------|------|---------|---------------|-------|
| user_id | STRING | Unique user handle | "usr_abc123" | References users.id |
| event_type | STRING | Action category | "click", "view", "purchase" | 15 distinct values |
| revenue | DECIMAL | USD transaction amount | 29.99, 149.00 | Null for non-purchases |
| created_at | TIMESTAMP | Event occurrence time | 2024-01-15 14:23:01 | Partition column |

### Join Paths
- Links to `users` via `user_id`
- Links to `products` via `product_id`
- Parent of `event_details` (one-to-many on event_id)

### Known Caveats
- [Document any quality issues]
- [Note analytical gotchas]

### Typical Query Use Cases
- [List common analytical patterns against this table]

Schema Discovery Queries

When working directly against a warehouse, use these patterns:

-- Enumerate tables in a schema (PostgreSQL)
SELECT table_name, table_type
FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY table_name;

-- Inspect column metadata (PostgreSQL)
SELECT column_name, data_type, is_nullable, column_default
FROM information_schema.columns
WHERE table_name = 'target_table'
ORDER BY ordinal_position;

-- Rank tables by storage footprint (PostgreSQL)
SELECT relname, pg_size_pretty(pg_total_relation_size(relid))
FROM pg_catalog.pg_statio_user_tables
ORDER BY pg_total_relation_size(relid) DESC;

-- Row count per table (general approach)
-- Execute individually: SELECT COUNT(*) FROM table_name

Tracing Data Lineage

When navigating an unfamiliar warehouse:

  1. Begin at the consumption layer — identify which tables power reports and dashboards
  2. Follow dependencies upstream: what feeds those tables?
  3. Map the raw / staging / mart architecture
  4. Track where transformations enrich, filter, or roll up the data
  5. Record any points where data is joined with external sources
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.