clean-data

clean-data is a skill for Claude Code from Aperivue/medsci-skills. It costs 54 tokens per session (2,571 once invoked), scanned A, original, MIT.

An interactive assistant that profiles clinical data, flags possible problems, and generates cleaning code for CSV or Excel files. It does not change the data automatically; the researcher approves each decision.

In plain words
What is it for?
It is for reviewing and preparing medical research datasets before analysis, with researcher approval at each cleaning stage.
Why use it?
It helps find missing values, unusual values, duplicate records, and incorrect data types without hiding decisions inside an automatic cleanup.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_SKILL_DIR} variable.

Part of the medsci-data plugin — 8 skills shipped together

Good fit It is for reviewing and preparing medical research datasets before analysis, with researcher approval at each cleaning stage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aperivue/medsci-skills/clean-data
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 Aperivue/medsci-skills --skill clean-data
Clone the repo
git clone --depth 1 https://github.com/Aperivue/medsci-skills

Made for: Claude Code.

Or install medsci-data, the plugin that ships this one along with the rest of its 8 skills.

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 clean-data

README.md
[![agentmods](https://agentmods.dev/badge/skills/aperivue/medsci-skills/clean-data/github.svg)](https://agentmods.dev/skills/aperivue/medsci-skills/clean-data)
Your own site
<a href="https://agentmods.dev/skills/aperivue/medsci-skills/clean-data"><img src="https://agentmods.dev/badge/skills/aperivue/medsci-skills/clean-data/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 clean-data

Your own site · 80×15
<a href="https://agentmods.dev/skills/aperivue/medsci-skills/clean-data"><img src="https://agentmods.dev/badge/skills/aperivue/medsci-skills/clean-data.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,571 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00054 $0.02571
Opus 5.5 $0.00022 $0.01028
Sonnet 5.5 $0.00011 $0.00514
Haiku 4.5 $0.00005 $0.00257

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

Security

Grade A, and why

clean-data 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 8d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (references/profiling_template.py, scripts/check_reverse_coding.py, scripts/check_structural_zero.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/clean-data/SKILL.md · 176 lines

How it starts

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

Data Profiling and Cleaning Skill

Profile, flag, and generate cleaning code for a clinical dataset in three stages, each ending at a user-approval gate. You generate code and reports; you do NOT auto-clean data. Every cleaning decision needs the researcher's explicit confirmation, because clinical cleaning calls need domain knowledge.

PHI first. If the dataset contains PHI or PII, run /deidentify before proceeding, and use *_deidentified.* files when they exist in the working directory. Otherwise work from the data dictionary / codebook alone, or in a local-only environment with no network access. The skill writes code that runs on the data; it does not need to see the raw rows to write it.

Three-Stage Workflow

Stage 1: Profiling

Input: CSV/Excel file path OR data dictionary/codebook

  1. Adapt ${CLAUDE_SKILL_DIR}/references/profiling_template.py (pandas) to the dataset. It reports: variable and row counts, data types; missing count and percentage per variable; unique counts for categorical variables; min/max/mean/median/SD for numeric variables; histograms and bar charts.
  2. If the user provides a codebook, cross-reference variable names, expected types, and expected ranges. Never guess a column name or coding: when a mapping is uncertain, write [VERIFY: variable_name] and ask the user to confirm it against the data dictionary.
  3. Present the summary (see Output Format). Every count and statistic comes from the executed script's output.
  4. Earlier delivery of the same dataset. If the project already holds an earlier extract from the same study and source (even if its columns differ), do not assume the new file replaces it: a replacement, an increment and a mix of corrections and new rows look the same by name and date, and reading the type wrongly changes the denominator. Ask the user to confirm with the data provider which it is, which columns identify a row, and whether both files use the same ID system, and how corrections are delivered. Report counts only (no ID lists) of rows and patients in the old file only, the new file only, and both, and only once the key correspondence is confirmed. The choice (replace, key-based update-and-add, append, or separate cohort) is the user's, after the provider has confirmed those points; do not pick one.

Read the full file on GitHub · 176 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. 8d ago Changed · +33 lines e52c40f1a2ae
  2. 2mo ago Changed · -43 lines · -10 tokens per session 6acb2b638a08
  3. 3mo ago First seen · 186 lines · 64 tokens per session scan A a860659a2043

Subscribe to this mod's changes

clean-data is a skill published in the GitHub repository Aperivue/medsci-skills (406 stars, last pushed 4d ago), licensed MIT. It adds 54 tokens to every session and 2,571 once invoked, about $0.0002 per session on Opus 5.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-30.

Related

clean-data compared with skills from other repositories

clean-data next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
clean-dataAperivue/medsci-skillsSkill4064d agoMITA54Claude Code
genomic-intelligenceK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA151Claude Code, Codex
torch-geometricK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA71Claude Code, Codex
bulk-rnaseqK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA111Claude Code, Codex
waypoint-bioK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA129Claude Code, Codex
aeonK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA74Claude Code
bidsK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA84Claude Code, Codex