data-cleaning

data-cleaning is a skill for Claude Code from claude-office-skills/claude-office-plugin. It costs 27 tokens per session (1,155 once invoked), scanned A, original, MIT.

A set of spreadsheet practices for preparing messy data for use. It covers missing values, duplicates, inconsistent formats, unusual values, and splitting data into columns.

In plain words
What is it for?
Use it to remove blank rows, fill missing cells with an agreed value or the previous row's value, remove duplicates by selected columns, standardize formats, detect unusual values, and split combined data.
Why use it?
Unclean data can produce misleading calculations and make tables difficult to use.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-wps-excel plugin — 26 skills, 14 commands, 8 agents, 2 MCP servers shipped together

Good fit Use it to remove blank rows, fill missing cells with an agreed value or the previous row's value, remove duplicates by selected columns, standardize formats, detect unusual values, and split combined data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/claude-office-skills/claude-office-plugin/data-cleaning
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add claude-office-skills/claude-office-plugin --skill data-cleaning
Clone the repo
git clone --depth 1 https://github.com/claude-office-skills/claude-office-plugin

Made for: Claude Code.

Or install claude-wps-excel, the plugin that ships this one along with the rest of its 26 skills, 14 commands, 8 agents, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for data-cleaning

README.md
[![agentmods](https://agentmods.dev/badge/skills/claude-office-skills/claude-office-plugin/data-cleaning/github.svg)](https://agentmods.dev/skills/claude-office-skills/claude-office-plugin/data-cleaning)
Your own site
<a href="https://agentmods.dev/skills/claude-office-skills/claude-office-plugin/data-cleaning"><img src="https://agentmods.dev/badge/skills/claude-office-skills/claude-office-plugin/data-cleaning/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for data-cleaning

Your own site · 80×15
<a href="https://agentmods.dev/skills/claude-office-skills/claude-office-plugin/data-cleaning"><img src="https://agentmods.dev/badge/skills/claude-office-skills/claude-office-plugin/data-cleaning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,155 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.01155
Opus 5 $0.00014 $0.00577
Sonnet 5 $0.00005 $0.00231
Haiku 4.5 $0.00003 $0.00115

Measured 11d ago against content hash 8da066cf3c8d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

data-cleaning scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/bundled/data-cleaning/SKILL.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

数据清洗操作规范

空值/空白处理策略

根据用户意图选择策略,不要自行决定删除数据:

var ws = Application.ActiveSheet;
var ur = ws.UsedRange;
var lastRow = ur.Row + ur.Rows.Count - 1;
var lastCol = ur.Column + ur.Columns.Count - 1;

// 策略1: 删除整行空白行
for (var r = lastRow; r >= 2; r--) {
  var empty = true;
  for (var c = 1; c <= lastCol; c++) {
    if (ws.Range(CL(c) + r).Value2 !== null && ws.Range(CL(c) + r).Value2 !== "") {
      empty = false; break;
    }
  }
  if (empty) ws.Range(r + ":" + r).Delete();
}

// 策略2: 用指定值填充空白
for (var r = 2; r <= lastRow; r++) {
  if (ws.Range(CL(col) + r).Value2 === null || ws.Range(CL(col) + r).Value2 === "") {
    ws.Range(CL(col) + r).Value2 = fillValue;
  }
}

// 策略3: 用上一行值向下填充
for (var r = 3; r <= lastRow; r++) {
  if (ws.Range(CL(col) + r).Value2 === null || ws.Range(CL(col) + r).Value2 === "") {
    ws.Range(CL(col) + r).Value2 = ws.Range(CL(col) + (r - 1)).Value2;
  }
}

去重逻辑

// 按指定列去重,保留首次出现
var seen = {};
var delRows = [];
for (var r = 2; r <= lastRow; r++) {
  var key = String(ws.Range(CL(keyCol) + r).Value2);
  if (seen[key]) { delRows.push(r); }
  else { seen[key] = true; }
}
for (var i = delRows.length - 1; i >= 0; i--) {
  ws.Range(delRows[i] + ":" + delRows[i]).Delete();
}

// 多列组合去重
var key = cols.map(function(c) { return String(ws.Range(CL(c) + r).Value2); }).join("||");

格式统一

// 日期格式统一(文本 → 标准日期)
var v = String(ws.Range(CL(c) + r).Value2);
// 处理 2024/1/5、2024.1.5、20240105 等变体
var m = v.match(/(\d{4})[\/\.\-]?(\d{1,2})[\/\.\-]?(\d{1,2})/);
if (m) {
  ws.Range(CL(c) + r).Value2 = m[1] + "-" + ("0" + m[2]).slice(-2) + "-" + ("0" + m[3]).slice(-2);
}

// 数字格式统一
ws.Range(CL(c) + "2:" + CL(c) + lastRow).NumberFormat = "#,##0.00";

// 文本去空格/换行
var v = String(ws.Range(CL(c) + r).Value2).replace(/[\s\n\r]+/g, " ").trim();

异常值检测

// IQR 方法检测异常值
var vals = [];
for (var r = 2; r <= lastRow; r++) {
  var v = ws.Range(CL(c) + r).Value2;
  if (typeof v === "number") vals.push(v);
}
vals.sort(function(a, b) { return a - b; });
var q1 = vals[Math.floor(vals.length * 0.25)];
var q3 = vals[Math.floor(vals.length * 0.75)];
var iqr = q3 - q1;
var lower = q1 - 1.5 * iqr, upper = q3 + 1.5 * iqr;
// 标记异常值(黄色背景)
for (var r = 2; r <= lastRow; r++) {
  var v = ws.Range(CL(c) + r).Value2;
  if (typeof v === "number" && (v < lower || v > upper)) {
    ws.Range(CL(c) + r).Interior.Color = 0x00AAFF; // 橙黄标记
  }
}

Read the full file on GitHub · 116 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 116 lines · 27 tokens per session scan A 8da066cf3c8d

Subscribe to this mod's changes

data-cleaning is a skill published in the GitHub repository claude-office-skills/claude-office-plugin (9 stars, last pushed 5mo ago), licensed MIT. It adds 27 tokens to every session and 1,155 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.