Multi-Format Support - Chat, classification, QA, completion, tabular templates
Export & Push - Save results locally or push to new Hub repos
Quick Start: SQL Queries
# Query a dataset
uv run scripts/sql_manager.py query \
--dataset "cais/mmlu" \
--sql "SELECT * FROM data WHERE subject='nutrition' LIMIT 10"
# Get dataset schema
uv run scripts/sql_manager.py describe --dataset "cais/mmlu"
# Sample random rows
uv run scripts/sql_manager.py sample --dataset "cais/mmlu" --n 5
# Count with filter
uv run scripts/sql_manager.py count --dataset "cais/mmlu" --where "subject='nutrition'"
Transform and Push
# Query and push to new dataset
uv run scripts/sql_manager.py query \
--dataset "cais/mmlu" \
--sql "SELECT * FROM data WHERE subject='nutrition'" \
--push-to "username/mmlu-nutrition-subset" \
--private
# Export to local file
uv run scripts/sql_manager.py export \
--dataset "cais/mmlu" \
--sql "SELECT * FROM data LIMIT 100" \
--output "sample.parquet" \
--format parquet
Create New Datasets
# Initialize repository
uv run scripts/dataset_manager.py init --repo_id "your-username/dataset-name" --private
# Quick setup with template
uv run scripts/dataset_manager.py quick_setup \
--repo_id "your-username/dataset-name" \
--template classification
# Add rows with template validation
uv run scripts/dataset_manager.py add_rows \
--repo_id "your-username/dataset-name" \
--template qa \
--rows_json "$(cat your_qa_data.json)"
Templates
chat - Multi-turn dialogues with tool usage
classification - Text classification with labels
qa - Question-answering pairs
completion - Text completion prompts
tabular - Structured data
Notes
Uses PEP 723 scripts with inline dependency management
DuckDB hf:// protocol provides direct dataset access
Integrates with HF MCP Server for discovery
Source: huggingface/skills
1---2name: huggingface-datasets3description: Hugging Face Datasets4---5# Hugging Face Datasets67Create and manage datasets on Hugging Face Hub with SQL-based querying, transformation, and streaming row updates.89## Prerequisites1011- uv (Python package manager)12- HF_TOKEN environment variable with Write-access token1314## Instructions1516### Core Capabilities17181. **SQL-Based Querying** - Query any HF dataset using DuckDB SQL via `hf://` protocol192. **Dataset Creation** - Initialize repos, configure metadata, stream row updates203. **Multi-Format Support** - Chat, classification, QA, completion, tabular templates214. **Export & Push** - Save results locally or push to new Hub repos2223### Quick Start: SQL Queries2425```bash26# Query a dataset27uv run scripts/sql_manager.py query \28 --dataset "cais/mmlu" \29 --sql "SELECT * FROM data WHERE subject='nutrition' LIMIT 10"3031# Get dataset schema32uv run scripts/sql_manager.py describe --dataset "cais/mmlu"3334# Sample random rows35uv run scripts/sql_manager.py sample --dataset "cais/mmlu" --n 53637# Count with filter38uv run scripts/sql_manager.py count --dataset "cais/mmlu" --where "subject='nutrition'"39```4041### Transform and Push4243```bash44# Query and push to new dataset45uv run scripts/sql_manager.py query \46 --dataset "cais/mmlu" \47 --sql "SELECT * FROM data WHERE subject='nutrition'" \48 --push-to "username/mmlu-nutrition-subset" \49 --private5051# Export to local file52uv run scripts/sql_manager.py export \53 --dataset "cais/mmlu" \54 --sql "SELECT * FROM data LIMIT 100" \55 --output "sample.parquet" \56 --format parquet57```5859### Create New Datasets6061```bash62# Initialize repository63uv run scripts/dataset_manager.py init --repo_id "your-username/dataset-name" --private6465# Quick setup with template66uv run scripts/dataset_manager.py quick_setup \67 --repo_id "your-username/dataset-name" \68 --template classification6970# Add rows with template validation71uv run scripts/dataset_manager.py add_rows \72 --repo_id "your-username/dataset-name" \73 --template qa \74 --rows_json "$(cat your_qa_data.json)"75```7677### Templates7879- `chat` - Multi-turn dialogues with tool usage80- `classification` - Text classification with labels81- `qa` - Question-answering pairs82- `completion` - Text completion prompts83- `tabular` - Structured data8485## Notes8687- Uses PEP 723 scripts with inline dependency management88- DuckDB `hf://` protocol provides direct dataset access89- Integrates with HF MCP Server for discovery9091Source: huggingface/skills
Run npx get-skill add mediar-ai/huggingface-datasets in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Hugging Face Datasets It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
mediar-ai (@mediar-ai) published this skill. Their other Agent Skills are listed on their SkillMD profile.