Skip to content
Research
Skill

/dataset-curation

Use when the user wants to analyze dataset bias, create stratified samples, evaluate fairness, or plan dataset collection. Triggers on phrases like "dataset bias", "stratified sample", "class imbalance", "data distribution", "fairness analysis", or "ethical review".

From plugin
labrat
48111 skills

Claude Code

$ npx -y skills add fcakyon/labrat --skill dataset-curation --agent claude-code

SKILL.md

dataset-curation.SKILL.md
name: dataset-curation
description: >
  Use when the user wants to analyze dataset bias, create stratified
  samples, evaluate fairness, or plan dataset collection. Triggers on
  phrases like "dataset bias", "stratified sample", "class imbalance",
  "data distribution", "fairness analysis", or "ethical review".

Dataset Curation Methodology

You are helping a researcher curate, analyze, or expand a dataset with attention to bias, fairness, and quality.

Step 1: Distribution Analysis

Before any curation action, understand the current state:

Per-Class Distribution

  • Count instances per class/label/tag
  • Compute imbalance ratio (max_count / min_count)
  • Identify severely underrepresented classes (< 5% of max class)
  • Visualize: bar chart of class frequencies sorted by count

Co-occurrence Analysis

  • Build co-occurrence matrix: which labels appear together
  • Identify spurious correlations (e.g., "violence" always co-occurs with "male")
  • Check for label leakage between splits

Metadata Distribution

  • Source diversity: how many sources/movies/documents contribute
  • Temporal distribution: are all time periods represented?
  • Content diversity: genre, style, domain coverage

Step 2: Bias Assessment

For each identified imbalance or correlation:

1. **Is it real-world reflective?** Some imbalances reflect genuine phenomena 2. **Is it harmful?** Would a model trained on this data make unfair predictions? 3. **Is it fixable?** Can we collect more data, resample, or reweight?

Fairness Dimensions

Check for bias along relevant protected attributes:

  • Gender representation (if applicable)
  • Racial/ethnic representation (if applicable)
  • Age distribution (if applicable)
  • Geographic/cultural diversity (if applicable)

Bias Metrics

  • Demographic parity: equal positive rates across groups
  • Equalized odds: equal TPR and FPR across groups
  • Representation ratio: group proportion in data vs population

Step 3: Stratified & Grouped Splitting

When creating splits (train/val/test):

1. **Grouping (prevent source leakage)**: keep all samples from the same source/subject/session in one split when evaluating generalization to unseen sources 2. **Stratification**: balance label/class distribution across splits (stratified group splitting when grouped; direct label/source stratification only when splitting within shared sources) 3. **Validation**:

  • Label balance across splits (e.g. chi-squared test) and rare-class coverage where group sizes allow
  • Zero group/source overlap (when grouped) and no exact or near-duplicate leakage across splits

Split ratios depend on dataset size:

  • Large (>50k): 80/10/10 or 90/5/5
  • Medium (5k-50k): 70/15/15 or 80/10/10
  • Small (<5k): k-fold cross-validation preferred

Step 4: Quality Assessment

For labeled datasets, assess annotation quality:

  • **Inter-annotator agreement**: Cohen's kappa, Fleiss' kappa, or Krippendorff's alpha
  • **Label noise estimation**: sample and manually verify N labels
  • **Edge cases**: identify ambiguous examples that annotators might disagree on
  • **Consistency checks**: automated rules for label validity

Step 5: Expansion Recommendations

If the dataset needs more data:

1. **Priority classes**: which classes benefit most from more data 2. **Source suggestions**: where to find more data for underrepresented classes 3. **Collection strategy**: active learning, targeted scraping, synthetic augmentation 4. **Cost estimation**: time and resources for each approach

Step 6: Ethical Review Checklist

Before using or publishing any dataset:

  • [ ] Content sensitivity: does the data contain sensitive material?
  • [ ] Consent: was data collected with appropriate consent?
  • [ ] Privacy: are individuals identifiable? Is anonymization needed?
  • [ ] Licensing: are data sources used within their license terms?
  • [ ] Potential harms: could the dataset be misused?
  • [ ] Documentation: is the dataset documented with a datasheet/data card?

Output Format

Produce: 1. **Distribution report**: per-class counts, imbalance ratios, co-occurrence matrix 2. **Bias findings**: identified biases with severity and actionability 3. **Split recommendation**: stratification strategy with validation results 4. **Expansion plan**: prioritized suggestions for addressing gaps 5. **Ethics checklist**: completed checklist with notes per item

Read more
@fcakyon
Ships withlabrat

PhD Research Skills for Claude Code: paper reproduction, experiment design, paper review, result comparison and more.

Stars on GitHub

Momentum

stars in total
481
Star history of fcakyon/phd-skills on GitHub, a chart by star-history.com

Other skills on labrat.

compare

compare

Same-epoch comparison and analysis of training runs across wandb, neptune, tensorboard, mlflow, or local result files. Aligns…

@fcakyon@fcakyonInstall Skill
debug

debug

Evidence-before-action diagnosis of failing ML experiments. Probes the system before guessing causes, process list, dmesg, GPU…

@fcakyon@fcakyonInstall Skill
experiment-design

experiment-design

Use when the user wants to design experiments, plan ablation studies, structure baselines, or create incremental evaluation…

@fcakyon@fcakyonInstall Skill
launch

launch

Pre-flight checklist for long-running ML training jobs and GitHub research tracker issue formatting, covering config diff, run…

@fcakyon@fcakyonInstall Skill
literature-research

literature-research

Use when the user wants to find related work, survey a research area, run a literature gap analysis, or discover open-source…

@fcakyon@fcakyonInstall Skill
paper-check

paper-check

Check a paper against its code, results and citations before submission (numbers, terms, code vs paper, formulas vs code, BibTeX…

@fcakyon@fcakyonInstall Skill

More skills from other plugins.

academic-paper-review

academic-paper-review

Use this skill when the user requests to review, analyze, critique, or summarize academic papers, research articles, preprints,…

deer-flow11d85k
@bytedance@bytedanceInstall Skill
last30days

last30days

Research what people actually say about any topic in the last 30 days. Pulls posts and engagement from Reddit, X, YouTube,…

@mvanhorn@mvanhornInstall Skill

Questions about dataset-curation.

Which coding agents can use dataset-curation?
dataset-curation installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.