dataset-builder

dataset-builder is a skill for Claude Code, Codex from khalilbenaz/claude-skills-collection. It costs 72 tokens per session (2,259 once invoked), scanned A, original, MIT.

A guide for building and maintaining datasets used to train machine-learning models. It covers collecting, cleaning, labeling, augmenting, splitting, versioning, documenting, and checking data quality.

In plain words
What is it for?
Defining data schemas, preparing classification or other ML datasets, choosing storage formats, balancing classes, creating train and test splits, and writing dataset documentation.
Why use it?
It helps prevent unreliable training data, unclear labels, data leakage, and poorly recorded dataset changes. It also highlights privacy and consent checks before collecting data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/collect.py --source api --date 2026-06-24.

Good fit Defining data schemas, preparing classification or other ML datasets, choosing storage formats, balancing classes, creating train and test splits, and writing dataset documentation.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/khalilbenaz/claude-skills-collection
agentmods
npx agentmods add skills/khalilbenaz/claude-skills-collection/dataset-builder

Made for: Claude Code, Codex.

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 dataset-builder

README.md
[![agentmods](https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/dataset-builder/github.svg)](https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/dataset-builder)
Your own site
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/dataset-builder"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/dataset-builder/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 dataset-builder

Your own site · 80×15
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/dataset-builder"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/dataset-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,259 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.00072 $0.02259
Opus 5 $0.00036 $0.01130
Sonnet 5 $0.00014 $0.00452
Haiku 4.5 $0.00007 $0.00226

Measured 12d ago against content hash 732c20098892, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

dataset-builder 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 12d ago.

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.

ai-ml-skills/dataset-builder/SKILL.md · 273 lines

How it starts

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

Dataset Builder

Guide opérationnel pour construire, curate et maintenir des datasets ML de production.


Étape 1 — Cadrer les besoins

Question Décision
Tâche ML ? Classif / régression / détection / génération
Volume minimum viable ? Règle empirique : ≥ 1 000 exemples/classe pour classif tabulaire, ≥ 10 k images pour CNN
Déséquilibre acceptable ? Ratio max 1:10 sans traitement ; au-delà → SMOTE/oversampling
Contraintes légales ? RGPD / consentement / droit à l'oubli à vérifier avant collecte

Fixer un schéma de données dès le départ :

# Exemple de schéma avec Pydantic
from pydantic import BaseModel, Field
from typing import Literal

class Sample(BaseModel):
    text: str = Field(min_length=10)
    label: Literal["positive", "negative", "neutral"]
    source: str
    collected_at: str  # ISO 8601

Étape 2 — Collecter les données brutes

Choisir le format de stockage selon le cas d'usage :

Format Quand l'utiliser
Parquet Données tabulaires, requêtes analytiques, > 100 k lignes
JSONL Texte, NLP, LLM fine-tuning
TFRecord / WebDataset Images/audio à grande échelle, streaming
CSV Prototypage, petits datasets (< 50 k lignes)

Collecter avec provenance :

# Exemple : snapshot DVC d'une source API
dvc run -n collect_api \
  -d scripts/collect.py \
  -o data/raw/samples.jsonl \
  python scripts/collect.py --source api --date 2026-06-24

Déduplication à la collecte (texte) :

import hashlib, json

seen = set()
with open("data/raw/samples.jsonl", "w") as out:
    for record in raw_records:
        h = hashlib.md5(record["text"].encode()).hexdigest()
        if h not in seen:
            seen.add(h)
            out.write(json.dumps(record, ensure_ascii=False) + "\n")

Étape 3 — Nettoyer et prétraiter

Pipeline type avec Pandas + Pandera :

import pandas as pd
import pandera as pa

schema = pa.DataFrameSchema({
    "text": pa.Column(str, pa.Check(lambda s: s.str.len() > 10)),
    "label": pa.Column(str, pa.Check.isin(["positive", "negative", "neutral"])),
})

df = pd.read_parquet("data/raw/samples.parquet")
df = df.drop_duplicates(subset=["text"])
df = df.dropna(subset=["label"])
df = schema.validate(df)  # lève une exception si non-conforme
df.to_parquet("data/clean/samples.parquet", index=False)

Read the full file on GitHub · 273 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. 12d ago First seen · 273 lines · 72 tokens per session scan A 732c20098892

Subscribe to this mod's changes

dataset-builder is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 18d ago), licensed MIT. It adds 72 tokens to every session and 2,259 once invoked, about $0.0004 per session on Opus 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

Other skills, from other repositories