data-cleanup

GitHub

用于清理和标准化混乱的表格数据(如CSV、粘贴内容),将其转换为分析就绪的数据集。该技能确保所有转换透明,明确处理日期、名称、重复项和缺失值,绝不静默猜测或修改数据含义,保障数据完整性与可追溯性。

skills/data-cleanup/SKILL.md sgharlow/claude-code-recipes

触发场景

用户说'clean this data' 用户说'standardize this CSV' 用户说'dedupe this list' 用户粘贴格式不一致的表格

安装

npx skills add sgharlow/claude-code-recipes --skill data-cleanup -g -y
更多选项

不安装直接使用

npx skills use sgharlow/claude-code-recipes@data-cleanup

指定 Agent (Claude Code)

npx skills add sgharlow/claude-code-recipes --skill data-cleanup -a claude-code -g -y

安装 repo 全部 skill

npx skills add sgharlow/claude-code-recipes --all -g -y

预览 repo 内 skill

npx skills add sgharlow/claude-code-recipes --list

SKILL.md

Frontmatter
{
    "name": "data-cleanup",
    "description": "Clean and standardize messy tabular data (CSV, spreadsheet paste, system exports) into an analysis-ready dataset — consistent dates and names, typed columns, duplicates identified, missing values handled explicitly. Use when the user says \"clean this data\", \"standardize this CSV\", \"dedupe this list\", or pastes a table with inconsistent formatting."
}

Data Cleanup and Formatting

Standardize messy tabular data without ever silently changing what it says. Every transformation is declared; every ambiguous value is surfaced, not guessed.

Steps

  1. Get the data (file path or paste) and profile it first: row count, columns, detected types, distinct-value oddities (mixed date formats, case-inconsistent names, stray whitespace, mixed types in one column), missing-value counts, and candidate duplicates. Present this profile BEFORE changing anything.
  2. Propose the cleanup plan as a checklist the user confirms: target date format, name casing, type per column, duplicate rule (exact vs. fuzzy key), and missing-value policy per column (leave blank / fill with sentinel / drop row — never a silent default).
  3. Apply the confirmed plan. For anything ambiguous (is 02/03/24 Feb 3 or Mar 2? are "J. Smith" and "John Smith" the same person?), stop and ask — wrong-but-tidy is worse than messy.
  4. Deliver: the cleaned dataset, plus a transformation log — rows in/out, per-column changes applied, duplicates found (listed, not just deleted), missing values and how each was handled, and any rows quarantined as unparseable rather than mangled.
  5. Verify: spot-check that no value changed meaning (dates shifted, names merged wrongly); re-state the row count arithmetic (in = out + dropped + quarantined) so nothing vanishes.

Constraints

  • Never delete or merge rows without listing exactly which ones and why.
  • Never guess an ambiguous date, unit, or identity — ask.
  • The original input is never overwritten; cleaned output is a new file/table.
  • If the data is too large to show fully, show the profile + a sample and operate via a script the user can inspect, not invisible edits.

Full walkthrough, examples, and variations: recipes/Recipe-009-Data-Cleanup-Formatting.md.

版本历史

  • 9157c9a 当前 2026-07-19 10:48

同 Skill 集合

skills/meeting-notes-to-actions/SKILL.md
skills/qc-checklist/SKILL.md
skills/research-synthesis/SKILL.md
skills/summarize-document/SKILL.md
skills/weekly-status-report/SKILL.md

元信息

文件数
0
版本
9157c9a
Hash
dea1619d
收录时间
2026-07-19 10:48

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-29 14:47
浙ICP备14020137号-1 $访客地图$