Agent skill

Add Dataset

by areal-project in areal-project/AReaL

Guide for adding a new dataset loader to AReaL. An agent skill from areal-project/AReaL.

Apache-2.0Auto-check passedAI & LLM Engineering

Install Add Dataset

skills CLI
$ npx skills add areal-project/AReaL --skill add-dataset -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install areal-project/AReaL add-dataset --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/areal-project/AReaL.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/add-dataset .claude/skills/add-dataset && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-dataset
GitHub stars
5.8k
Token cost
~1.4k tokens
SKILL.md length
141 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
Apache-2.0

At a glance

Guide for adding a new dataset loader to AReaL. An agent skill from areal-project/AReaL.

  • Works in 4 steps: Create Dataset File → Register in init.py → Add Config (Optional) → …
  • User wants to add a new dataset
  • SKILL.md covers When to Use, Step-by-Step Guide, Reference Implementations and Required Fields, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Add Dataset is an agent skill from areal-project/AReaL. Guide for adding a new dataset loader to AReaL. Use when user wants to add a new dataset.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering. The repository describes itself as: The RL Bridge for LLM-based Agent Applications. Made Simple & Flexible. The licence is Apache-2.0.

When your agent uses it

  • User wants to add a new dataset

Example prompts

  • “/add-dataset”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Create Dataset File
  2. Register in init.py
  3. Add Config (Optional)
  4. Add Tests

What it can do on your machine

Read from SKILL.md and the folder at commit 01de0a8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Dataset loads about 1.4k tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 141 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~25
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from areal-project/AReaL at commit 01de0a8, republished under its Apache-2.0 licence (© areal-project). 141 words, ~1,369 tokens.

Download SKILL.mdSave it as .claude/skills/add-dataset/SKILL.md (or your agent's skills folder).
name
add-dataset
description
Guide for adding a new dataset loader to AReaL. Use when user wants to add a new dataset.

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.map(process).remove_columns(["question", "answer"])

    if max_length is not None:
        dataset = dataset.filter(lambda x: len(x["input_ids"]) <= max_length)

    return dataset


def get_<name>_rl_dataset(
    path: str,
    split: str,
    tokenizer,
    max_length: int | None = None,
) -> Dataset:
    """Load dataset for RL training.

    Args:
        path: Path to dataset
        split: Dataset split
        tokenizer: Tokenizer for length filtering
        max_length: Maximum sequence length

    Returns:
        HuggingFace Dataset with prompts and answers for reward computation
    """
    dataset = load_dataset(path=path, split=split)

    def process(sample):
        messages = [
            {
                "role": "user",
                "content": sample["question"],
            }
        ]
        return {"messages": messages, "answer": sample["answer"]}

    dataset = dataset.map(process).remove_columns(["question"])

    if max_length is not None:

        def filter_length(sample):
            content = sample["messages"][0]["content"]
            tokens = tokenizer.encode(content)
            return len(tokens) <= max_length

        dataset = dataset.filter(filter_length)

    return dataset
Step 2: Register in init.py

Update areal/dataset/__init__.py:

python
# Add to VALID_DATASETS
VALID_DATASETS = [
    # ... existing datasets
    "<name>",
]

# Add to _get_custom_dataset function
def _get_custom_dataset(name: str, ...):
    # ... existing code
    elif name == "<name>":
        from areal.dataset.<name> import get_<name>_sft_dataset, get_<name>_rl_dataset
        if dataset_type == "sft":
            return get_<name>_sft_dataset(path, split, max_length, tokenizer)
        else:
            return get_<name>_rl_dataset(path, split, max_length, tokenizer)
Step 3: Add Config (Optional)

If the dataset needs special configuration, add to areal/api/cli_args.py:

python
@dataclass
class TrainDatasetConfig:
    # ... existing fields
    <name>_specific_field: Optional[str] = None
Step 4: Add Tests

Create tests/test_<name>_dataset.py:

python
import pytest
from areal.dataset.<name> import get_<name>_sft_dataset, get_<name>_rl_dataset

def test_sft_dataset_loads(tokenizer):
    dataset = get_<name>_sft_dataset("path/to/data", split="train", tokenizer=tokenizer)
    assert len(dataset) > 0
    assert "input_ids" in dataset.column_names
    assert "loss_mask" in dataset.column_names

def test_rl_dataset_loads(tokenizer):
    dataset = get_<name>_rl_dataset("path/to/data", split="train", tokenizer=tokenizer)
    assert len(dataset) > 0
    assert "messages" in dataset.column_names
    assert "answer" in dataset.column_names

Reference Implementations

DatasetFileDescription
GSM8Kareal/dataset/gsm8k.pyMath word problems
Geometry3Kareal/dataset/geometry3k.pyGeometry problems
CLEVRareal/dataset/clevr_count_70k.pyVisual counting
HH-RLHFareal/dataset/hhrlhf.pyHelpfulness/Harmlessness
TORLareal/dataset/torl_data.pyTool-use RL

Required Fields

SFT Dataset
python
{
    "messages": [
        {"role": "user", "content": "..."},
        {"role": "assistant", "content": "..."},
    ]
}
RL Dataset
python
{
    "messages": [
        {"role": "user", "content": "..."},
    ],
    "answer": "ground_truth_for_reward",
    # Optional metadata for reward function
}

Common Mistakes

  • Returning List[Dict] instead of HuggingFace Dataset
  • Using Python loops instead of dataset.map()/filter()
  • Missing "messages" field for RL datasets
  • Wrong message format (should be list of dicts with role and content)
  • Not registering in __init__.py

© areal-project, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/add-dataset of areal-project/AReaL.

Open the folder on GitHubat commit 01de0a8

Compare with similar skills

Add Dataset next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Dataset compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Dataset this skillareal-project/AReaL5.8k—~1.4kAutomated safety check: PassApache-2.0
Agent BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT
Add Uint Supportpytorch/pytorch104k2 repos~2.3kAutomated safety check: PassCustom licence
LLM Benchmarking with lm-evaluation-harnessOrchestra-Research/AI-Research-SKILLs13k8 repos~3kAutomated safety check: PassMIT
Segment Anything Model GuideOrchestra-Research/AI-Research-SKILLs13k8 repos~3.3kAutomated safety check: PassMIT
1passwordtrpc-group/trpc-agent-go1.9k14 repos~656Automated safety check: PassApache-2.0

Similar skills

  • Agent Builder

    shareAI-lab/learn-claude-code

    Design and build AI agents for any domain. An agent skill from shareAI-lab/learn-claude-code.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Add Uint Support

    pytorch/pytorch

    Add unsigned integer (uint) type support to PyTorch operators by updating ATDISPATCH macros.

    104k GitHub starsUsed in 2 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • LLM Benchmarking with lm-evaluation-harness

    Orchestra-Research/AI-Research-SKILLs

    Runs lm-evaluation-harness to benchmark language models on academic suites such as MMLU, GSM8K and HumanEval, compare models and track training checkpoints.

    13k GitHub starsUsed in 8 repos~3k tokens
    AI & LLM EngineeringAuto-check passed
  • Segment Anything Model Guide

    Orchestra-Research/AI-Research-SKILLs

    Guide to using Meta's Segment Anything Model for zero-shot image segmentation with point, box or mask prompts, or automatic mask generation.

    13k GitHub starsUsed in 8 repos~3.3k tokens
    AI & LLM EngineeringAuto-check passed
  • 1password

    trpc-group/trpc-agent-go

    Set up and use 1Password CLI (op). An agent skill from trpc-group/trpc-agent-go.

    1.9k GitHub starsUsed in 14 repos~656 tokens
    AI & LLM EngineeringAuto-check passed
  • Planning With Files

    jarrodwatts/claude-code-config

    Transforms workflow to use Manus-style persistent markdown files for planning, progress tracking, and knowledge storage.

    1.1k GitHub starsUsed in 5 repos~967 tokens
    AI & LLM EngineeringAuto-check passed

More from areal-project/AReaL

All 11 skills in this repo
  • Add Archon Model

    areal-project/AReaL

    Guide for adding a new model to the Archon engine. An agent skill from areal-project/AReaL.

    5.8k GitHub stars~4.9k tokensUpdated yesterday
    Auto-check passed
  • Add Reward

    areal-project/AReaL

    Guide for adding a new reward function to AReaL. An agent skill from areal-project/AReaL.

    5.8k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Add Unit Tests

    areal-project/AReaL

    Guide for adding unit tests to AReaL. An agent skill from areal-project/AReaL.

    5.8k GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Add Workflow

    areal-project/AReaL

    Guide for adding a new RolloutWorkflow to AReaL. An agent skill from areal-project/AReaL.

    5.8k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Debug Distributed

    areal-project/AReaL

    Guide for debugging distributed training issues in AReaL. An agent skill from areal-project/AReaL.

    5.8k GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Review PR

    areal-project/AReaL

    Read-only pull request review workflow with risk analysis, targeted checklists, and Codex subagent consultation.

    5.8k GitHub stars~704 tokensUpdated yesterday
    Auto-check passed

Questions about Add Dataset

What does Add Dataset do?

Guide for adding a new dataset loader to AReaL. An agent skill from areal-project/AReaL. Add Dataset is an agent skill from areal-project/AReaL. Guide for adding a new dataset loader to AReaL.

When should I use Add Dataset?

Add Dataset fits situations like: user wants to add a new dataset.

How do I install Add Dataset in Claude Code?

Run `npx skills add areal-project/AReaL --skill add-dataset -a claude-code`. Or copy the skill folder (.agents/skills/add-dataset in areal-project/AReaL) into .claude/skills/add-dataset in your project. Claude Code loads it when a task matches its description.

How do I install Add Dataset in Codex?

Run `npx skills add areal-project/AReaL --skill add-dataset -a codex`. Or copy the skill folder (.agents/skills/add-dataset in areal-project/AReaL) into .agents/skills/add-dataset in your project. Codex loads it when a task matches its description.

Can I use Add Dataset in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add areal-project/AReaL --skill add-dataset -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-dataset, .gemini/skills/add-dataset, .github/skills/add-dataset and .opencode/skills/add-dataset in your project.

What does Add Dataset need to run?

SKILL.md names no scripts, command-line tools or credentials: Add Dataset is instructions for the agent only. Our summary lists: Python 3.

Does Add Dataset access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Add Dataset safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add Dataset use?

Add Dataset is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Dataset use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Dataset?

Skills that share tags, products or a category with Add Dataset: Agent Builder (shareAI-lab/learn-claude-code, 78k stars), Add Uint Support (pytorch/pytorch, 104k stars), LLM Benchmarking with lm-evaluation-harness (Orchestra-Research/AI-Research-SKILLs, 13k stars) and Segment Anything Model Guide (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Dataset?

areal-project (a GitHub organization) maintains it in areal-project/AReaL, which has 5,820 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 9, 2026.

Source: areal-project/AReaL on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.