
Clean Data
OfficialFreeEffortlessly tidy up your messy spreadsheet data.
Free · Opens the source repo
What Clean Data does
Clean Data is a skill designed to help users prepare and normalize spreadsheet data, making it suitable for analysis. It operates within Excel or on standalone .xlsx files, utilizing Office JS or Python's openpyxl library, respectively. This skill addresses common data issues such as inconsistent casing, whitespace, and mixed data types, ensuring that your datasets are clean and ready for further processing.
The workflow begins by scoping the data range, either using a specified range or the full used range of the active sheet. It profiles each column to determine its dominant data type and identifies any outliers. Users can then review a summary of detected issues, including leading/trailing spaces, duplicate entries, and errors like #REF! or #N/A. This structured approach allows users to understand the state of their data before making any changes.
Once issues are identified, the skill proposes fixes in a summary table, allowing users to see the potential changes before they are applied. The skill emphasizes using formulas for cleaning operations, which keeps the transformations transparent and auditable. Users can confirm each step of the process, ensuring they have control over how their data is modified. After applying the fixes, a before-and-after summary is provided, giving users a clear view of what has changed in their dataset.
When to use it
Use this skill when you have a spreadsheet with inconsistent formatting, duplicates, or mixed data types that need to be cleaned before analysis.
When not to use it
This skill is not suitable for datasets that are already clean or for complex data transformations that require advanced data manipulation techniques.
What you can build with it
Cleaning Up Client Data
When preparing client data for analysis, use this skill to standardize names and remove duplicates, ensuring accuracy in reporting.
Preparing Data for Visualization
Before creating visualizations, clean up your dataset to ensure consistent formatting and eliminate errors that could skew results.
Normalizing Survey Responses
Use this skill to tidy up survey data, fixing inconsistent casing and removing blank responses to prepare for analysis.
How to install Clean Data
View source1. Install with the skills CLI
npx skills add anthropics/financial-services/clean-data-xls --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by anthropicsClean Data
Clean messy data in the active sheet or a specified range.
Environment
- If running inside Excel (Office Add-in / Office JS): Use Office JS directly (
Excel.run(async (context) => {...})). Read viarange.values, write helper-column formulas viarange.formulas = [["=TRIM(A2)"]]. The in-place vs helper-column decision still applies. - If operating on a standalone .xlsx file: Use Python/openpyxl.
Workflow
Step 1: Scope
- If a range is given (e.g.
A1:F200), use it - Otherwise use the full used range of the active sheet
- Profile each column: detect its dominant type (text / number / date) and identify outliers
Step 2: Detect issues
| Issue | What to look for |
|---|---|
| Whitespace | leading/trailing spaces, double spaces |
| Casing | inconsistent casing in categorical columns (usa / USA / Usa) |
| Number-as-text | numeric values stored as text; stray $, ,, % in number cells |
| Dates | mixed formats in the same column (3/8/26, 2026-03-08, March 8 2026) |
| Duplicates | exact-duplicate rows and near-duplicates (case/whitespace differences) |
| Blanks | empty cells in otherwise-populated columns |
| Mixed types | a column that's 98% numbers but has 3 text entries |
| Encoding | mojibake (é, ’), non-printing characters |
| Errors | #REF!, #N/A, #VALUE!, #DIV/0! |
Step 3: Propose fixes
Show a summary table before changing anything:
| Column | Issue | Count | Proposed Fix |
|---|
Step 4: Apply
- Prefer formulas over hardcoded cleaned values — where the cleaned output can be expressed as a formula (e.g.
=TRIM(A2),=VALUE(SUBSTITUTE(B2,"$","")),=UPPER(C2),=DATEVALUE(D2)), write the formula in an adjacent helper column rather than computing the result in Python and overwriting the original. This keeps the transformation transparent and auditable. - Only overwrite in place with computed values when the user explicitly asks for it, or when no sensible formula equivalent exists (e.g. encoding/mojibake repair)
- For destructive operations (removing duplicates, filling blanks, overwriting originals), confirm with the user first
- After each category of fix (whitespace → casing → number conversion → dates → dedup), show the user a sample of what changed and get confirmation before moving to the next category
- Report a before/after summary of what changed
Frequently asked questions about Clean Data
Similar skills
Single-Cell RNA-seq QC
Automate quality control for single-cell RNA-seq data.
Instrument Data to Allotrope Converter
Standardize lab data for seamless integration.
SQL Server Table Reconciliation
Efficiently compare SQL Server tables across instances.
Data Cleaning and Variable Screening
Streamline credit risk data preprocessing for modeling.
Arize Dataset
Manage and query Arize datasets efficiently.
Spreadsheet Management
Efficiently create, edit, and analyze spreadsheet files.
