$npx -y skills add codeclawd/fable-mode --skill explore-dataProfile and explore a dataset to understand its shape, quality, and patterns. Use when encountering a new table or file, checking null rates and column distributions, spotting data quality issues like duplicates or suspicious values, or deciding which dimensions and metrics to an
| 1 | # /explore-data - Profile and Explore a Dataset |
| 2 | |
| 3 | |
| 4 | Generate a comprehensive data profile for a table or uploaded file. Understand its shape, quality, and patterns before diving into analysis. |
| 5 | |
| 6 | ## Usage |
| 7 | |
| 8 | ``` |
| 9 | /explore-data <table_name or file> |
| 10 | ``` |
| 11 | |
| 12 | ## Workflow |
| 13 | |
| 14 | ### 1. Access the Data |
| 15 | |
| 16 | **If a data warehouse MCP server is connected:** |
| 17 | |
| 18 | 1. Resolve the table name (handle schema prefixes, suggest matches if ambiguous) |
| 19 | 2. Query table metadata: column names, types, descriptions if available |
| 20 | 3. Run profiling queries against the live data |
| 21 | |
| 22 | **If a file is provided (CSV, Excel, Parquet, JSON):** |
| 23 | |
| 24 | 1. Read the file and load into a working dataset |
| 25 | 2. Infer column types from the data |
| 26 | |
| 27 | **If neither:** |
| 28 | |
| 29 | 1. Ask the user to provide a table name (with their warehouse connected) or upload a file |
| 30 | 2. If they describe a table schema, provide guidance on what profiling queries to run |
| 31 | |
| 32 | ### 2. Understand Structure |
| 33 | |
| 34 | Before analyzing any data, understand its structure: |
| 35 | |
| 36 | **Table-level questions:** |
| 37 | - How many rows and columns? |
| 38 | - What is the grain (one row per what)? |
| 39 | - What is the primary key? Is it unique? |
| 40 | - When was the data last updated? |
| 41 | - How far back does the data go? |
| 42 | |
| 43 | **Column classification** — categorize each column as one of: |
| 44 | - **Identifier**: Unique keys, foreign keys, entity IDs |
| 45 | - **Dimension**: Categorical attributes for grouping/filtering (status, type, region, category) |
| 46 | - **Metric**: Quantitative values for measurement (revenue, count, duration, score) |
| 47 | - **Temporal**: Dates and timestamps (created_at, updated_at, event_date) |
| 48 | - **Text**: Free-form text fields (description, notes, name) |
| 49 | - **Boolean**: True/false flags |
| 50 | - **Structural**: JSON, arrays, nested structures |
| 51 | |
| 52 | ### 3. Generate Data Profile |
| 53 | |
| 54 | Run the following profiling checks: |
| 55 | |
| 56 | **Table-level metrics:** |
| 57 | - Total row count |
| 58 | - Column count and types breakdown |
| 59 | - Approximate table size (if available from metadata) |
| 60 | - Date range coverage (min/max of date columns) |
| 61 | |
| 62 | **All columns:** |
| 63 | - Null count and null rate |
| 64 | - Distinct count and cardinality ratio (distinct / total) |
| 65 | - Most common values (top 5-10 with frequencies) |
| 66 | - Least common values (bottom 5 to spot anomalies) |
| 67 | |
| 68 | **Numeric columns (metrics):** |
| 69 | ``` |
| 70 | min, max, mean, median (p50) |
| 71 | standard deviation |
| 72 | percentiles: p1, p5, p25, p75, p95, p99 |
| 73 | zero count |
| 74 | negative count (if unexpected) |
| 75 | ``` |
| 76 | |
| 77 | **String columns (dimensions, text):** |
| 78 | ``` |
| 79 | min length, max length, avg length |
| 80 | empty string count |
| 81 | pattern analysis (do values follow a format?) |
| 82 | case consistency (all upper, all lower, mixed?) |
| 83 | leading/trailing whitespace count |
| 84 | ``` |
| 85 | |
| 86 | **Date/timestamp columns:** |
| 87 | ``` |
| 88 | min date, max date |
| 89 | null dates |
| 90 | future dates (if unexpected) |
| 91 | distribution by month/week |
| 92 | gaps in time series |
| 93 | ``` |
| 94 | |
| 95 | **Boolean columns:** |
| 96 | ``` |
| 97 | true count, false count, null count |
| 98 | true rate |
| 99 | ``` |
| 100 | |
| 101 | **Present the profile as a clean summary table**, grouped by column type (dimensions, metrics, dates, IDs). |
| 102 | |
| 103 | ### 4. Identify Data Quality Issues |
| 104 | |
| 105 | Apply the quality assessment framework below. Flag potential problems: |
| 106 | |
| 107 | - **High null rates**: Columns with >5% nulls (warn), >20% nulls (alert) |
| 108 | - **Low cardinality surprises**: Columns that should be high-cardinality but aren't (e.g., a "user_id" with only 50 distinct values) |
| 109 | - **High cardinality surprises**: Columns that should be categorical but have too many distinct values |
| 110 | - **Suspicious values**: Negative amounts where only positive expected, future dates in historical data, obviously placeholder values (e.g., "N/A", "TBD", "test", "999999") |
| 111 | - **Duplicate detection**: Check if there's a natural key and whether it has duplicates |
| 112 | - **Distribution skew**: Extremely skewed numeric distributions that could affect averages |
| 113 | - **Encoding issues**: Mixed case in categorical fields, trailing whitespace, inconsistent formats |
| 114 | |
| 115 | ### 5. Discover Relationships and Patterns |
| 116 | |
| 117 | After profiling individual columns: |
| 118 | |
| 119 | - **Foreign key candidates**: ID columns that might link to other tables |
| 120 | - **Hierarchies**: Columns that form natural drill-down paths (country > state > city) |
| 121 | - **Correlations**: Numeric columns that move together |
| 122 | - **Derived columns**: Columns that appear to be computed from others |
| 123 | - **Redundant columns**: Columns with identical or near-identical information |
| 124 | |
| 125 | ### 6. Suggest Interesting Dimensions and Metrics |
| 126 | |
| 127 | Based on the column profile, recommend: |
| 128 | |
| 129 | - **Best dimension columns** for slicing data (categorical columns with reasonable cardinality, 3-50 values) |
| 130 | - **Key metric columns** for measurement (numeric columns with meaningful distributions) |
| 131 | - **Time columns** suitable for trend analysis |
| 132 | - **Natural groupings** or hierarchies apparent in the data |
| 133 | - **Potential join keys** linking to other tables (ID columns, foreign key |