/data-utils:type-consistency-sweepfrom data-utils
Scan one or more datasets for data-type inconsistencies that would block analysis or relational/graph database loading — mixed types within a column, the same logical field typed differently across files, string-encoded numbers/dates, inconsistent null sentinels. Report findings, and either delegate the fix to a Data-Utils skill or apply small wrangling in place.
Ships in data-utils. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Hybrid analysis + wrangling. Find the type inconsistencies that silently break joins, skew aggregations, and cause COPY INTO failures when the user tries to load the dataset into Postgres / DuckDB / BigQuery / a graph store. Then fix them — directly for trivial cases, or by handing off to the right specialist skill.
postgres, duckdb, bigquery, neo4j, parquet, none) — affects strictness.VARCHAR but >80% of values parse as numeric — a few stray strings are poisoning the type."1,234", "$19.99", "3.14 " — numeric intent, string storage.2024-01-15, 15/01/2024, Jan 15 2024 all in one column)."Y"/"N", "true"/"false", "1"/"0", "yes"/"no" — sometimes mixed."NA", "N/A", "null", "-", "-999".1.0, 2.0, ...) — will break joins to an integer key.INTEGER, another as VARCHAR, a third zero-padded."001" and the other is 1.NUMERIC/DATE/BOOLEAN; nested JSON in a column if destination is relational and not JSON-aware.List every file/table in scope. For each column, capture:
duckdb -c "DESCRIBE SELECT * FROM '<file>'").For each column, run the checks above. For numeric/date candidates held as strings, try parsing (TRY_CAST, strptime) and record pass rate. Anything below ~95% clean parse is a finding.
Match columns by name (fuzzy: lowercase, strip separators) across files. For each match group, compare types and sample values. Flag mismatches.
| Severity | Meaning |
|---|---|
blocker | Will fail load into destination, or will silently corrupt joins/aggregations. |
warning | Works, but introduces ambiguity or subtle bugs (e.g. string "1.0" comparisons). |
cosmetic | Stylistic, not analytically harmful (trailing whitespace in a free-text column). |
For each finding, pick one of:
(a) Fix in place — when the change is small, safe, reversible, and fully specified. Examples:
"1.0", "2.0", ... to INTEGER."-999" to NULL.Apply via DuckDB: write the result to a new file (*_typed.parquet) or a new table, never overwrite the source. Log the transformation.
(b) Delegate to a sibling data-utils skill — when the fix matches an existing specialist skill, invoke it rather than re-implementing. Matching map:
| Finding | Delegate to |
|---|---|
| Text-formatted numbers across a file | data-utils:text-to-numeric |
| Mixed / inconsistent date formats | data-utils:date-wrangling |
| Country name vs ISO code mismatch | data-utils:standardise-country-names or :add-iso3166 |
| Missing currency codes on monetary columns | data-utils:enrich-with-currency |
| Unicode / case / whitespace drift | data-utils:unicode-consistency |
| JSON needs flattening for relational load | data-utils:json-restructure |
| CSV ↔ JSON conversion for destination | data-utils:csv-to-json |
| Loading into a SQL / graph database | data-utils:sql-load or :graph-database |
| Cleanliness audit beyond types | data-utils:data-cleanliness-scan |
Delegation means invoking the matching skill via Skill with the relevant file path and options. Don't silently re-do the work.
(c) Escalate to the user — when the fix requires a judgement the agent shouldn't make alone. Examples:
Write outputs/type-consistency-sweep/report.md:
yes / yes with warnings / no — blockers.pending / fixed / delegated / skipped).After any fixes or delegated wrangling, re-run Steps 1–3 on the output artifacts. Confirm blockers are resolved. Update the report with the post-fix state.
*_typed.parquet, *_normalised.csv) and make the new path visible in the report.forensic-sweep (detects whether cleaning has happened) — type-consistency-sweep fixes what's broken, forensic-sweep flags what's been changed without permission.What SKILL.md sets; muted values are Claude Code's defaults
47 skills in this plugin
/add-changelogAdd or update a CHANGELOG.md in a data repository, recording dataset versions, schema changes, row-count deltas, enrichments applied, and re-publications. Follows Keep-a-Changelog conventions adapted for datasets. Use when the user wants versioned documentation of how a dataset has evolved over time./add-data-dictionaryCreate a data dictionary for a dataset (CSV, JSON, JSONL, Parquet, Excel) that documents every column/field — name, type, description, units, example values, nulls allowed, source. Use when a dataset has no accompanying documentation and the user wants one generated./add-iso3166Add ISO 3166 country codes (alpha-2, alpha-3, numeric) to a dataset that references countries by name but lacks standardised codes. Use when the user has a CSV/JSON/Parquet/Excel dataset with country names and wants ISO 3166 codes added as new columns/fields.data-utils@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin data-utilsOther plugins' skills for the same job