Karthik Data Cleaning 标志

Karthik Data Cleaning

社区
skthewimp
karthik-data-cleaning

在使用 R/Rmd、Quarto、notebooks、Python、SQL 或分析代码库进行 Karthik 风格分析时,凡是需要清理、分析数据概况、导入、重塑、合并、验证或准备表格数据,都应使用此技能。尤其适用于制作图表、建模、撰写数据故事、构建仪表板和开展探索性分析之前,需要结合上下文并由人工监督清理数据的任务:检查数据,定义分析单位,明确应用领域规则,避免不受监督的通用修正,并保持原始文件和规范文件不变。

概览

发布者skthewimp
代码仓库karthik-data-visualization-skill
技能名称karthik-data-cleaning
星标数
49
复刻数
5
附带文件
仅含指令
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 skthewimp 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Karthik Data Cleaning AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/skthewimp/karthik-data-visualization-skill/tree/main/karthik-data-cleaning/codex
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/skthewimp/karthik-data-visualization-skill.git /tmp/karthik-data-visualization-skill
mkdir -p .claude/skills
cp -r /tmp/karthik-data-visualization-skill/karthik-data-cleaning/codex .claude/skills/karthik-data-cleaning
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Karthik Data Cleaning,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Karthik Data Cleaning。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Karthik Data Cleaning 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Karthik Data Cleaning

Own contextual profiling, parsing, reshaping, joining, recoding, missingness decisions, and validation. Do not define the analytical question, prescribe exploratory notebook voice, or choose the final visual; those belong to karthik-analysis-planner, karthik-r-analysis-style, and dataviz-selector.

Clean data like an analyst, not like an automated janitor. Cleaning is part of the analysis. It depends on the question, the unit of analysis, the source quirks, and the domain rules.

Default stack: R/Rmd/Quarto with tidyverse-style pipelines. Use Python/SQL when the project already does, but keep the same judgement pattern.

Core rule

Use this loop:

text
question/context → inspect → clean one layer → inspect again → encode visible rule → sanity check → proceed

Do not do one-shot unsupervised cleaning. Do not silently standardize, impute, drop, dedupe, or recode because a generic rule says so.

Workflow

  1. Start by identifying the analytical context:
    • question or intended chart/model/story
    • unit of analysis: row, event, transaction, person, match ball, order item, day, hour, constituency, etc.
    • required denominator/numerator/metric if known
    • canonical raw/source files
  2. Inspect before changing:
    • names(), glimpse()/str(), summary()
    • count()/table() for categories
    • date ranges and duplicate keys
    • missingness by important dimensions
    • impossible values and obvious source sentinels
  3. Clean in small visible steps, preferably in an Rmd/qmd/notebook when exploring.
  4. After each non-trivial step, inspect again. Compare counts before/after.
  5. Convert types deliberately: dates, times, numerics, booleans, factors/categories.
  6. Normalize strings only when needed for joins, grouping, or parsing. Preserve original values if useful.
  7. Reshape to the useful grain:
    • wide repeated fields → long entity/event table
    • JSON/list columns → unnested rows
    • timestamp pairs → event intervals or start/end rows
    • monthly columns → date, value
  8. Apply domain rules explicitly:
    • known bad IDs/files
    • category collapses
    • spelling/name/location mappings
    • exclusion rules
    • parser hacks
    • impossible-value rules
  9. Join carefully:
    • check join keys and grain first
    • use anti_join()/unmatched counts where mismatches matter
    • make one-to-many expansion intentional
    • build small lookup/default tables when the data/domain supports it
  10. Treat missingness contextually:
    • drop only when row cannot answer the question
    • infer/default only with a visible reason
    • use coalesce()/modal defaults only when defensible
    • mark impossible values as missing rather than pretending they are real
  11. Validate before using cleaned data:
    • row counts before/after
    • key uniqueness at intended grain
    • date coverage
    • missingness of analysis fields
    • impossible values after cleaning
    • denominator sanity
    • spot checks of suspicious rows
  12. Preserve raw/canonical files. Never overwrite source data unless explicitly asked.

Working-file rule

Do not create working/intermediate files by default.

Create/cache a working file only when the canonical/raw source is too huge, slow, remote, unstable, expensive to parse, or annoying enough that repeated inspection becomes impractical. If you create one, say why and keep its contents clearly derived from canonical data.

R/Rmd style

Prefer this exploratory shape:

r
raw <- readr::read_csv(path)

raw %>%
  count(category, sort = TRUE)

cleaned <- raw %>%
  mutate(
    date = lubridate::ymd(date),
    amount = readr::parse_number(amount),
    city = stringr::str_to_title(city),
city = dplyr::recode(city,
  source_value_a = "canonical_value_a",
  source_value_b = "canonical_value_b",
  .default = city
)
  )

cleaned %>%
  summarise(
    rows = n(),
    start = min(date, na.rm = TRUE),
    end = max(date, na.rm = TRUE),
    missing_amount = sum(is.na(amount))
  )

Use scripts/functions only after the cleaning loop stabilizes or when the same parsing logic repeats.

What to avoid

  • Do not invent generic cleaning rules unrelated to the analysis.
  • Do not drop rows merely because they contain some missing values.
  • Do not impute without a domain reason.
  • Do not normalize strings if the raw distinction may matter later.
  • Do not dedupe without checking the intended grain.
  • Do not make polished pipeline code before understanding the mess.
  • Do not create *_working, cleaned.csv, or .RData intermediates unless the working-file rule is met.
  • Do not regenerate derived artifacts unless asked.

Output expectations

When asked to clean data, produce or edit code that includes:

  • the inspection checks
  • the cleaning transformations
  • the domain assumptions as short comments
  • the validation checks
  • any remaining caveats

When giving a summary, state:

  • raw rows and cleaned rows
  • unit of analysis
  • key filters/exclusions
  • important recodes/mappings
  • missingness decisions
  • join mismatches, if any
  • what still needs human judgement

常见问题

Karthik Data Cleaning AI 技能有什么作用?

在使用 R/Rmd、Quarto、notebooks、Python、SQL 或分析代码库进行 Karthik 风格分析时,凡是需要清理、分析数据概况、导入、重塑、合并、验证或准备表格数据,都应使用此技能。尤其适用于制作图表、建模、撰写数据故事、构建仪表板和开展探索性分析之前,需要结合上下文并由人工监督清理数据的任务:检查数据,定义分析单位,明确应用领域规则,避免不受监督的通用修正,并保持原始文件和规范文件不变。

为什么在 TypingMind 中使用 Karthik Data Cleaning?

因为您只需安装一次,就能搭配任何模型使用。Karthik Data Cleaning 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Karthik Data Cleaning?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/skthewimp/karthik-data-visualization-skill/tree/main/karthik-data-cleaning/codex。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Karthik Data Cleaning?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Karthik Data Cleaning 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Karthik Data Cleaning 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Karthik Data Cleaning AI 技能免费吗?

是的。skthewimp 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇