/clio-analysis-skills:data-cleanfrom clio-analysis-skills
Profiles missing values, duplicates, outliers and validation rules before data analysis. Guides pandas-based cleaning with explicit strategy/method separation for imputation.
Ships in clio-analysis-skills. 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.
Read when SKILL.md points to them.
Every repair here changes the numbers that come out. Look before repairing, and say what was done.
For an explicitly specified repair, inspect the affected columns, perform that repair and verify its output. Do not expand a request for interpolation into deduplication, outlier removal, memory optimisation or a general validation audit. Use the broader checks below when the user asks for cleaning or the observed data exposes a relevant problem.
clio-pandas:profile_data — shape, types, missing values, distributions, quality
checks. On a raw CSV, clio-pandas:profile_csv answers the same first questions
using a bounded sample; its counts/statistics need not cover the whole file.
Read three things before touching anything: how much is missing and where, whether dtypes match what the columns mean, and whether ranges are physically possible.
clio-pandas:handle_missing_data takes two separate arguments, and conflating
them is the usual first failure. strategy is one of detect, impute,
remove or analyze, and defaults to detect, which only reports. method is
the imputation itself: mean, median, mode, forward_fill,
backward_fill, interpolate. Passing strategy="median" fails with "Unknown
strategy"; the call you want is strategy="impute", method="median".
The methods are not interchangeable. interpolate fills interior numeric gaps
linearly by row position: [1, missing, 3, missing, 5] becomes
[1, 2, 3, 4, 5]. Leading/trailing gaps, entirely missing columns and
non-numeric gaps remain missing; inspect the reported imputed_count and the
output. Select the intended columns. This is not time-weighted interpolation:
for irregular timestamps, use a verified time-aware calculation instead.
forward_fill propagates the previous observed value; backward_fill uses
the next observed value. Both follow row order, so sort and separate independent
series first. mode fills numeric or categorical gaps from observed values.
Mean/median operate only on numeric columns. Entirely missing columns stay
missing, and imputed_count counts actual fills. Preserve the input and assert
expected values before accepting any transformation.
If the tool chooses its own output filename, preserve the input and copy the
verified result to the user's requested destination, then verify that file.
Dropping rows is honest and biased: it silently removes exactly the cases with missing data, which are rarely a random sample.
clio-pandas:clean_data removes duplicates, detects outliers via IQR or Z-score,
and optimises dtypes in one pass.
Outlier detection is not outlier removal. An extreme value can be a sensor fault or the event the whole run was about. Look at flagged rows before deleting them. Z-score thresholds can be misleading on skewed distributions. IQR is a robust screening rule, not proof that flagged values are invalid; inspect the domain and distribution before changing any values.
Duplicate rows are sometimes real — two identical measurements at different times where the timestamp was not kept. Check what makes a row unique before deduping.
clio-pandas:validate_data checks columns against explicit rules: min/max range,
type, nullability, uniqueness, regex. This is stronger than eyeballing a profile,
because it is a claim that can fail later on new data.
Write the rules from what the data means: a fraction is in [0, 1], a temperature in Kelvin is not negative, an ID is unique and non-null. A validation rule that encodes physics catches the corrupt file that a statistical check accepts. Do not invent a storage-type contract. CSV does not preserve dtypes: reloading integral values as integers instead of floats is not a scientific validation failure unless the user requires that representation. Check values, units and the stated schema; do not enforce a guessed dtype merely to add a check.
clio-pandas:optimize_memory reduces footprint through dtype optimisation and
suggests chunking. Worth running before an expensive operation on a wide table.
Check what it did. A column downcast to a narrower integer type will silently overflow if later values exceed the new range, and an ID stored as a float has already lost precision.
clio-pandas:filter_data supports comparison, membership, pattern matching and
null checks across several columns. Filter before aggregating, not after: an
average over rows you meant to exclude is wrong in a way that looks fine.
Every step above changes the result. Report which columns were imputed and how, how many rows were removed and why, and what was excluded. A cleaned dataset with no record of the cleaning is not reproducible.
Names such as clio-hdf5:open_file identify a server and its tool in this
guide. Your agent may expose a different prefix. Match the server and tool
against its live MCP inventory, then use the advertised name and input schema.
If a required server is unavailable, report it before attempting the workflow.
Keep the source file. Report the output path, before/after row counts, missing counts, transformations, and validation failures. Use each returned output file for the next step; these tools do not share an in-memory dataframe.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
data-cleaning, data-profiling, missing-data, outlier-detection, pandas
4 skills in this plugin
/chart-selectUse when choosing a chart, axes, bins or color scale for scientific data. Triggers on "which chart", "log scale", "color map". Calls no tools. Not for rendering a chart; use results-summary./results-summaryUse when calculating tabular summaries and plotting transformed CSV or Excel data. Triggers on "summarize this table", "plot these results", "grouped mean". Not for mesh or volume rendering; use simulation-visualize./simulation-visualizeUse when inspecting and rendering simulation fields with ParaView. Triggers on "isosurface", "slice this volume", "render the field". Not for tabular charts; use results-summary.npx claudepluginhub iowarp/clio-kit --plugin clio-analysis-skillsOther plugins' skills for the same job