Dataset First Look
dataset-first-look · v1.0.0
ivyx
Use when someone asks what is in a data file (csv, parquet, xlsx, json), what is wrong with it, its missing values, or whether it is ready for modelling; profiles every column and reports measured numbers.
Who is asked
Risk low: it loads without asking anyone. Each tool it then calls still meets your policy.
Tools it may call
While this skill is active, a call to any other tool is refused. These still meet every policy rule; the list narrows, it approves nothing.
duckdb.inspectduckdb.queryduckdb.registerSourceprofiler.profileprofiler.profileQuerymlops.pandera.contractFromProfileWhat it tells the agent
The published SKILL.md, as written.
--- name: dataset-first-look description: Use when someone asks what is in a data file (csv, parquet, xlsx, json), what is wrong with it, its missing values, or whether it is ready for modelling; profiles every column and reports measured numbers. allowed-tools: duckdb.inspect duckdb.query duckdb.registerSource profiler.profile profiler.profileQuery mlops.pandera.contractFromProfile metadata: risk: low ---
A first look at a dataset
Every number you report comes from a call in this run. Do not read the raw file with a file tool, do not judge from the first rows, and do not fill a gap from what you know about a famous dataset: if you did not measure it, measure it or leave it out.
1. Measure
duckdb.inspect, with the data file's path asfile: columns, row count, the first rows, and for a workbook its sheets.profiler.profilewith{ "path": "<path>" }for a csv, tsv or parquet file. For a workbook or a json file,profiler.profileQuerywith{ "sql": "select * from <view>" }, using the view nameduckdb.inspectreturned.- Ask
duckdb.queryonly for what the profile does not answer, with the file registered through{{file}}:- duplicate rows:
select count(*) - count(distinct (t.*)) from {{file}} t; - the balance of a target the person named:
select <target>, count(*) from {{file}} group by 1.
- duplicate rows:
2. Read the profile
Go through every column, not only the interesting ones. Read nullPct,
uniqueRatio, kind, min/max, q50 and topK. distinct is an
estimate and can exceed the row count; judge uniqueness by uniqueRatio.
Flag a column when:
| Finding | Rule |
|---|---|
| identifier | uniqueRatio is 1 (or above 0.99) and it names a row, not a quantity; it must not be a feature |
| mostly missing | nullPct above 50 |
| some missing | nullPct above 0; give the exact percentage |
| constant | one value in topK, or min equals max |
| high-cardinality text | categorical with uniqueRatio above 0.5 |
| skewed | numeric with max far above q75 (more than ten times the interquartile range) |
| suspicious zero or negative | a quantity whose min is 0 or below where that cannot be real |
Do not call a target imbalanced unless the minority class is under 20%.
Two mistakes to avoid:
- Every column whose
nullPctis above 0 is listed as missing, however small; never call a column complete without reading itsnullPct. - Say what a code means (
1is survived,3is third class) only when a column name or the person says so; otherwise give the values and their counts.
3. Report
Read report.md (call this skill with { "file": "report.md" }) and write
the answer in that shape, in the person's language. Keep column names as
they are in the file.
4. Offer a contract
End by offering a data contract that pins what you measured. When the
person says yes, call mlops.pandera.contractFromProfile with the path and
write: false first and show the draft; write it only after they confirm.
Files it reads
Loading the skill lists these to the agent. It reads one when the instructions send it there.
report.md
# The shape of a first-look answer **<file>**: <rows> rows, <columns> columns. <one sentence on what a row is, read from the columns, not from memory>. | Column | Type | Missing | Notes | |---|---|---|---| | <name> | <kind> | <nullPct, one decimal>% | <the finding, or blank> | **Issues**, most serious first, each with its number: 1. <column>: <finding> (<the measured value>). <what it means for a model>. **Before modelling** - <one action per issue, naming the column> Duplicate rows: <n, or "none">. Would you like a data contract that checks these columns on every run?