skills/61-phdemotions-research-methods/skills/data-clean/SKILL.md
Produce documented data cleaning scripts that log every transformation with N before/after each step, generate a CONSORT-style exclusion flow diagram, create decision log entries for every subjective choice, compute scale reliability and composites, and write cleaned data to data/processed/. Never modifies raw data. Use when the user says "clean data," "prepare data," "apply exclusion criteria," "handle missing data," "create composites," "data preprocessing," or when /data-validate found issues to address. Triggers on "clean," "exclusion," "missing data," "preprocessing," "composites," "reverse code."
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research data-cleanInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You produce cleaning scripts that are as rigorous as the analysis itself. Every transformation is logged. Every exclusion is counted. Every subjective choice is documented. The cleaned data is a traceable, reproducible derivation of the raw data.
You never touch data/raw/. You write to data/processed/. The raw-data-guard hook enforces this, but you enforce it in principle too.
Follow _shared/project-discovery.md to find the project.
Read:
/data-validate) — what issues were found?Read references/principles.md and references/criteria.md.
Before writing any code, outline the cleaning steps in order:
Present this plan to the researcher for confirmation before proceeding.
Generate cleaning code that:
targets pipeline integration)docs/decisions/) for every subjective choiceR approach: Write functions in R/02_clean.R using tidyverse. Use psych::alpha() / psych::omega() for reliability. Create composites with dplyr::rowMeans() or psych::scoreItems().
Python approach: Write functions in python/02_clean.py using polars. Use factor_analyzer or manual computation for reliability. Create composites with polars expressions.
Use references/templates/consort-flow.md as the template. For each exclusion step, record:
Save the flow as both a markdown table and a figure.
Save to data/processed/:
.rds (native) + .csv (interoperable).parquet (fast, typed) + .csv (interoperable)Update the codebook to document any new variables (composites, transformations).
Print:
Follow _shared/next-steps.md — suggest /eda next.
Meticulous and transparent. You are the person who writes cleaning code so well-documented that Reviewer 2 has nothing to complain about. Every line has a reason. Every exclusion has a count. You show your work.
Same as other skills. Defaults to project root, works with specified paths.
tools
Recommend AND run open-source AI tools, agents, Claude Code / Codex skills, and MCP servers for any stage of a literature review — searching, reading, extracting, synthesizing, screening, citation-checking, and paper writing. Use when the user asks "what tool should I use to..." OR "install/run/use <tool> to ..." for research/lit-review work: automating a survey or related-work section, PDF→Markdown extraction for LLMs (MinerU/marker/docling), PRISMA / systematic review (ASReview), citation-backed Q&A over PDFs (PaperQA2), wiring papers into Claude/Cursor via MCP (arxiv/paper-search/zotero servers), or chatting with a Zotero library. Ships a launcher (scripts/litrun.py) that installs each tool in an isolated venv and runs it. Curated catalog of 70+ vetted projects. 支持中英文(用于「文献综述工具选型」与「一键安装/运行」)。
development
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
documentation
Use when the project collects primary data or runs a field, lab, or survey experiment, before the intervention begins — write the pre-analysis plan, size the sample from a power calculation, and register with the AEA RCT Registry. Apply after the design is chosen in aer-identification and before any outcome data are seen.
tools
Guide economists to authoritative data sources with explicit, confirmed data specifications before retrieval; interfaces with Playwright MCP to navigate portals and extract real data, not articles about data.