Dataset Splitter Skill for Stratified CSV Sets in Claude Code
Split labeled rows into train, validation, and test files with reproducible stratification and explicit overlap checks.
中文Install in Claude Code
Prepare a synthetic CSV with unique row_id and a label column. The example uses pandas and scikit-learn.
- Get the complete `plugins/ai-ml/dataset-splitter/skills/splitting-datasets` directory from the pinned GitHub commit.
- Copy it into the target project's `.claude/skills/`. Check `.claude/skills/splitting-datasets/SKILL.md`, start Claude Code at the project root, and call `/splitting-datasets`.
Example task
Create 1,000 rows with 800 labels A and 200 B. Use stratified train_test_split for 70% training, then stratify and split the remaining 300 rows equally. Write train.csv, val.csv, and test.csv.What to check
The three files contain 700, 150, and 150 rows, each with 20% label B and no overlapping row_id values.
Original SKILL.md on GitHub · Updated
Frequently asked question
Is row-level stratification enough if a customer has multiple records?
Separate by customer group so a customer cannot cross partitions, then report the resulting class balance.