Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot official · Anthropic

clean-data-xls — Claude Code skill: spreadsheet data cleanup

Automates cleanup of messy Excel and Google Sheets data: trims whitespace, unifies case, converts numbers stored as text, standardizes dates, removes duplicates, and flags mixed-type columns.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add anthropics/financial-services --skill clean-data-xls -a claude-code
Open on GitHub

What clean-data-xls does

clean-data-xls profiles each column and detects common problems — leading and double spaces, inconsistent casing in categorical data, numbers stored as text with stray $ or , characters, dates in mixed formats, exact duplicates and near-duplicates, blank cells, mojibake, and errors like #REF!.

The skill proposes fixes in a summary table (Issue, Count, Proposed Fix), then applies them step by step. It prioritizes formulas in adjacent columns (=TRIM(), =UPPER(), =DATEVALUE()) over hardcoded values to keep transformations auditable. Destructive operations (deduplication, in-place overwrite) require confirmation.

In Excel, it runs via Office JS with range.values and range.formulas. On standalone .xlsx files, it uses openpyxl. The skill processes each stage (whitespace → casing → number conversion → dates → dedup), shows samples of changes, and asks for confirmation before moving forward.

What it helps with

  • remove leading and trailing whitespace from text columns
  • standardize thousands of case variants (USA, usa, Usa) to one format
  • convert numbers stored as text with currency symbols back to numbers
  • detect and unify dates written in different formats within one column
  • remove exact duplicate rows and near-duplicates from typos

Example prompts for the agent

  • clean-data-xls: clean up this spreadsheet
  • normalize columns A through F — there's whitespace everywhere and inconsistent case
  • deduplicate the rows and convert all dates to the same format

How to install clean-data-xls

1Skills CLI (Vercel)

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

2Manually: put the files in place

~/.claude/skills/clean-data-xls/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/clean-data-xls/

From the same set25

The whole set →
earnings-analysis official anthropics Builds quarterly earnings update reports with beat/miss analysis, revised estimates, key metrics, charts, and the effect on the investment thesis. Claude Code CX Codex Cursor +1 3,300installs equity-research official anthropics Builds a stock snapshot from analyst consensus, financials, price history and macro data. Useful when you need to size up a company fast. Claude Code CX Codex Cursor +1 3,200installs competitive-analysis official anthropics A framework for building competitor analysis decks in PowerPoint or chat. It clarifies project scope, then builds verified slides once the outline is approved. Claude Code CX Codex Cursor +1 2,400installs pitch-deck official anthropics Fills an existing investment banking deck template with data from source files. Use it to move figures into established slide layouts, not to build a deck from scratch. Claude Code CX Codex Cursor +1 2,400installs dcf-model official anthropics Builds an institutional-grade DCF valuation model: pulls data from SEC filings and analyst reports, computes WACC and cash flows, and outputs an Excel model with sensitivity analysis. Claude Code CX Codex Cursor +1 2,400installs ppt-template-creator official anthropics A skill that converts PowerPoint templates into self-contained, reusable skills. Analyze your .pptx, extract all layouts and placeholders with exact coordinates, and package everything as a ready-to-use skill. Claude Code CX Codex Cursor +1 2,300installs macro-rates-monitor official anthropics Builds macro and rates dashboards by combining inflation breakevens, yield curves, and swap spreads into a single analysis. Claude Code CX Codex Cursor +1 2,300installs audit-xls official anthropics Audits Excel sheets for formula errors, hardcoded values, and logic breaks. It checks financial model integrity before sharing work with clients or review committees. Claude Code CX Codex Cursor +1 2,200installs

Similar

datanalysis-credit-risk official github This skill cleans credit data and screens variables before risk modeling. Use it when a raw dataset needs quality checks and pre-loan preparation. GitHub Copilot 7,300installs database-migration Seth Hobson This skill handles schema and data migrations with Sequelize, TypeORM, and Prisma. Use it when a change needs a rollback plan or a zero-downtime rollout. Claude Code CX Codex Cursor 17,549installs google-cloud-storage-basics official google This skill helps an agent manage Google Cloud Storage buckets and objects, from file transfers and access control to storage policies. Claude Code Gemini CLI CX Codex 5,516installs cloud-monitoring-metric-selection official google This skill finds relevant Google Cloud Monitoring metric descriptors for a service or resource. Use it when you need to choose metric types for a monitoring query. Claude Code Gemini CLI CX Codex 5,453installs validate-data official anthropics Runs QA checks on data reports, SQL queries, and charts before stakeholder review. Catches calculation bugs, flawed logic, and analytical bias. Claude Code CX Codex Cursor +1 3,700installs data-storytelling Seth Hobson This skill turns raw data into a clear narrative with context, visuals, and recommendations. Use it for analytics reports and executive presentations. Claude Code CX Codex Cursor 16,782installs xlsx official anthropics Creates, reads, edits, and converts spreadsheet files. Use it when the requested deliverable is an Excel workbook or another tabular file. Claude Code Claude.ai 187,223installs google-agents-cli-observability official Google This skill guides you through tracing and monitoring AI agents, including ADK agents. Use it when you need to inspect agent execution or monitor a deployed agent. Claude Code CX Codex Cursor +1 509,900installs

Questions about clean-data-xls

How do I install clean-data-xls for Claude Code?

Run npx skills add anthropics/financial-services --skill clean-data-xls -a claude-code, then check SKILL.md in ~/.claude/skills/clean-data-xls/.

What does clean-data-xls do?

The skill identifies and fixes common spreadsheet errors: whitespace, inconsistent case, numbers in text format, mixed date formats, duplicate rows, and mixed-type columns.

Does it overwrite my original data?

By default, no — it creates formulas in helper columns to preserve the original and keep changes auditable. In-place overwrite requires your confirmation.

Source text

SKILL.md · Apache-2.0
---
name: clean-data-xls
description: Clean up messy spreadsheet data — trim whitespace, fix inconsistent casing, convert numbers-stored-as-text, standardize dates, remove duplicates, and flag mixed-type columns. Use when data is messy, inconsistent, or needs prep before analysis. Triggers on "clean this data", "clean up this sheet", "normalize this data", "fix formatting", "dedupe", "standardize this column", "this data is messy".
---

# 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

| 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

© anthropics · Apache-2.0 · anthropics/financial-services

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor