data-preparation

Plans and audits dataset cleaning, joining, deduplication, and reconciliation with a logged decisions ledger.

2|Updated Jun 8, 2026
One-click install
npx skills add https://github.com/lancegui/causal-powers --skill data-preparation-lancegui
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: data-preparation
Source: https://github.com/lancegui/causal-powers/tree/main/evals/prompt-pilot-state-did/transcripts/current/stage1/instructions/skills/data-preparation
Command: npx skills add https://github.com/lancegui/causal-powers --skill data-preparation-lancegui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Data cleaning decisions silently reshape analysis samples without leaving an audit trail, producing confident but wrong results that cannot be defended or debugged later. ## Core Features & Use Cases - Phased cleaning checklist: Decomposes ingest, join, dedup, recode, and reconciliation work into an ordered, resumable checklist stored under docs/analysis/. - Decisions ledger: Records every consequential cleaning choice with its reasoning and sample impact in decisions.yaml, surviving session compaction. - Validation delegation: Routes join cardinality assertions and reconciliation checks to a data-contracts checker skill, and escalates sample-changing decisions to the user. - Use Case: When merging orders and customers tables into a panel dataset, the skill asserts the many-to-one cardinality before the join, reconciles row counts after, and logs why 412 negative-quantity rows were dropped. ## Quick Start Ask the assistant to clean and assemble the raw source files into a validated analysis dataset with every consequential decision logged.

Frequently Asked Questions about data-preparation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean and merge multiple data sources for analysis?▼

Break the work into a phased checklist covering source provenance, join cardinality assertions, dedup rules, missingness handling, and reconciliation to source totals. Log every consequential decision with its reasoning so the sample changes remain auditable.

How to validate a join before merging datasets?▼

Declare the expected cardinality (one-to-one, one-to-many, many-to-one) and assert it before running the merge, then reconcile row counts afterward. An unintended many-to-many join silently inflates totals without throwing an error.

When should data cleaning decisions be escalated to the user?▼

Escalate whenever a step drops, filters, winsorizes, or dedups rows beyond trivial exact duplicates, recodes a reported grouping, or moves a number the user has already seen. Routine tidying like parsing dates or trimming whitespace can proceed without a checkpoint.

Why do dataset totals not match the raw source after cleaning?▼

A failed reconciliation means a cleaning step corrupted the data, typically a fan-out join, an over-aggressive dedup, or a silent filter. Bisect the pipeline step by step using the decisions log rather than adjusting the total to match.

When is a formal data cleaning plan unnecessary?▼

A single already-clean file that loads directly is waived from the phased checklist. State the waiver explicitly so the record shows the cleaning phase was considered and judged unnecessary rather than skipped by accident.