New to Claude Skills? Learn how to install them →

Canthropics on GitHub

Clean Data

OfficialFree

Effortlessly tidy up your messy spreadsheet data.

Get this skill

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 source

1. Install with the skills CLI

npx skills add anthropics/financial-services/clean-data-xls --agent claude-code

2. 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 anthropics

Clean 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 via range.values, write helper-column formulas via range.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

IssueWhat to look for
Whitespaceleading/trailing spaces, double spaces
Casinginconsistent casing in categorical columns (usa / USA / Usa)
Number-as-textnumeric values stored as text; stray $, ,, % in number cells
Datesmixed formats in the same column (3/8/26, 2026-03-08, March 8 2026)
Duplicatesexact-duplicate rows and near-duplicates (case/whitespace differences)
Blanksempty cells in otherwise-populated columns
Mixed typesa column that's 98% numbers but has 3 text entries
Encodingmojibake (é, ’), non-printing characters
Errors#REF!, #N/A, #VALUE!, #DIV/0!

Step 3: Propose fixes

Show a summary table before changing anything:

ColumnIssueCountProposed 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