Agent skill · Data & Analytics

add-dataset

Guide for adding a new dataset loader to AReaL. Use when user wants to add a new dataset.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill add-dataset --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 6 KB
Bundled scripts: none
Path: skills/ai-ml/add-dataset/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Add Dataset Add a new dataset loader to AReaL. ## When to Use This skill is triggered when: - User asks "how do I add a dataset?" - User wants to integrate a new dataset - User mentions creating a dataset loader ## Step-by-Step Guide ### Step 1: Create Dataset File Create `areal/dataset/<name>.py`: ```python from datasets import Dataset, load_dataset def get_<name>_sft_dataset( path: str, split: str, tokenizer, max_length: int | None = None, ) -> Dataset: """Load dataset for SFT training. Args: path: Path to dataset (HuggingFace hub or local path) split: Dataset split (train/validation/test) tokenizer: Tokenizer for processing max_length: Maximum sequence length (optional) Returns: HuggingFace Dataset with processed samples """ dataset = load_dataset(path=path, split=split) def process(sample): # Tokenize the full sequence (prompt + response) seq_token = tokenizer.encode( sample["question"] + sample["answer"] + tokenizer.eos_token ) prompt_token = tokenizer.encode(sample["question"]) # Loss mask: 0 for prompt, 1 for response loss_mask = [0] * len(prompt_token) + [1] * (len(seq_token) - len(prompt_token)) return {"input_ids": seq_token, "loss_mask": loss_mask} dataset = dataset.ma

What's inside
Steps it walks through
  1. When to Use
  2. Step-by-Step Guide
  3. Step 1: Create Dataset File
  4. Step 2: Register in init.py
  5. Step 3: Add Config (Optional)
  6. Step 4: Add Tests
  7. Reference Implementations
  8. Required Fields
  9. SFT Dataset
  10. RL Dataset
  11. Common Mistakes
  12. Purpose
  13. How to Update
  14. When Dataset API Changes
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the add-dataset skill do?

Guide for adding a new dataset loader to AReaL. Use when user wants to add a new dataset.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill add-dataset --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going