posit-dev/pointblank/scan-and-profile
Claude Code and agent skill by posit-dev/pointblank
- community
Checking that the SKILL.md file is still in the repository.
Profile and scan datasets with Pointblank before writing validation rules. Covers DataScan for column-level statistics, comparing a scan with a saved baseline to find drift (DataScan.compare), schemas taken from a table, missing values analysis with missing_vals_tbl(), and table previewing. Use when exploring a new dataset, understanding data distributions before validation, or checking a refreshed table against an earlier profile.
Install
npx vskill@latest install posit-dev/pointblank/scan-and-profileSKILL.md
The same SKILL.md was published earlier as posit-dev/pointblank/scan-and-profile.
Scan and Profile
Skill for profiling datasets before writing validation rules. Understanding your data's shape, types, distributions, and missingness patterns helps you write targeted, effective validation plans.
Quick start
Skill directory structure
When to use what
| I want to... | Use | |
|---|---|---|
| Get a full column-level profile | DataScan | |
| See column types and basic stats | DataScan.get_tabular_report() | |
| Export a profile as JSON or a dict | to_json(), save_to_json(), to_dict() | |
| Bring back a saved profile | DataScan.load_from_json(), from_json(), from_dict() | |
| Compare a table's profile with a baseline | DataScan.compare() | |
| Find which rows of two tables differ | pb.compare() (rows, not profiles) | |
Get a schema for col_schema_match | Schema(tbl=df) | |
| Infer constraints for generating data | schema_from_tbl(), Schema.from_table() | |
| See a quick preview of the table | preview() | |
| Analyze missing values | missing_vals_tbl() | |
| Get row/column counts | get_row_count(), get_column_count() |
Core concepts
DataScan
DataScan produces a comprehensive profile of every column in a dataset:
summary_data has these columns: colname, coltype, icon, n_missing, n_unique, mean, std, min, p05, q_1, median, q_3, p95, max, iqr, freqs, and sample_data. For a string column the statistics are of the string lengths; freqs holds the value counts of a Boolean column.
Comparing with a baseline
A table that's refreshed regularly can change in ways no single row shows: a column dropped, a type changed, values shifted. Save a profile of a version known to be good, then compare later scans with it. The scan you call compare() on is the current one:
Each statistic is compared exactly, so any change is reported with both values. Drift scores show how far the distribution moved: numeric columns get psi (population stability index), ks_statistic, and ks_p_value, and other columns get a psi from their value counts. A PSI below 0.1 is usually read as little shift, 0.1 to 0.25 as moderate, and above 0.25 as large.
Shortcut: col_summary_tbl
For a quick column summary without creating a DataScan object:
Table preview
Quick visual preview of the first and last rows:
Missing values analysis
Dedicated analysis of missingness patterns:
Schemas from a table
There are two kinds, for two jobs:
pb.Schema.from_table() is the same as schema_from_tbl().
Constructing schemas manually
Quick counts
Workflows
Profiling a new dataset
- Load or connect to the data.
- Run
pb.preview(data)for a quick look. - Run
pb.DataScan(data=df).get_tabular_report()for full stats. - Run
pb.missing_vals_tbl(data=df)to understand missingness. - Take a schema:
schema = pb.Schema(tbl=df). - Use the profile to inform validation rules.
From profile to validation plan
- Profile the data with
DataScan. - Note columns with high missingness -- add
col_pct_nullchecks. - Note columns with few distinct values -- add
col_vals_in_set. - Note numeric ranges -- add
col_vals_betweenchecks. - Use
pb.Schema(tbl=df)incol_schema_match. - Build the validation plan with the
write-validationskill.
Watching a refreshed table for drift
- Scan a version known to be good and
save_to_json()it. - On each refresh, scan the new data and
compare()it with
DataScan.load_from_json(...).
- Check
diff.has_changes, the added, removed, and type-changed
columns, and the drift scores; show diff.get_tabular_report().
- Turn anything that matters into a validation step.
Gotchas
- DataScan reads the full table. For large datasets, consider
sampling first.
- Schema type names are backend-specific. Polars uses
"Int64",
Pandas uses "int64", and Ibis uses "int64". Schema(tbl=df) gets the right names automatically.
- **
schema_from_tbl()is for generating data, not for
col_schema_match().** Its fields hold short dtypes ("Datetime" rather than "Datetime(time_unit='us', time_zone=None)"), so a schema match with the default full_match_dtypes=True can fail on the same table. Use Schema(tbl=df) to validate.
- A restored profile has no values. After
load_from_json(),
from_json(), or from_dict(), compare() still compares the statistics, but only Boolean columns get drift scores. Compare two scans made from data to get them for every column.
- `compare()` direction matters. Call it on the current scan and
pass the baseline; "added" means in the current scan only.
- `missing_vals_tbl` only shows null by default. Pass
MissingSpec definitions to include sentinel values.
- `preview()` returns a GT table object. In notebooks it renders
automatically; in scripts, you may need to display it.
Related skills
| Skill | When to use it | |
|---|---|---|
| pointblank | Full Validate workflow overview | |
| write-validation | Build validation plans from profile insights | |
| generate-data | Create synthetic data matching a schema | |
| draft-validation | Have an LLM draft a plan from the profile | |
| check-training-data | Drift between train/test splits (check_splits) |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/scan-and-profile/SKILL.md
Popularity
- Repository stars
- 483
- Repository forks
- 30
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/posit-dev/pointblank/scan-and-profile)