Skip to content
Back to skills

Huggingface Datasets

ASecurity

Create and manage datasets on Hugging Face Hub with SQL-based querying, transformation, and streaming row updates.

  • 7 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 3, 2026
datapythonbashsql

Works with

  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 3, 2026

npx -y skills add mediar-ai/skillhubz --skill huggingface-datasets --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Huggingface Datasets?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Huggingface Datasets
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mediar-ai-huggingface-datasets/badge)](https://www.skillsdirectory.com/skills/mediar-ai-huggingface-datasets)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Hugging Face Datasets

Create and manage datasets on Hugging Face Hub with SQL-based querying, transformation, and streaming row updates.

## Prerequisites

- uv (Python package manager)
- HF_TOKEN environment variable with Write-access token

## Instructions

### Core Capabilities

1. **SQL-Based Querying** - Query any HF dataset using DuckDB SQL via `hf://` protocol
2. **Dataset Creation** - Initialize repos, configure metadata, stream row updates
3. **Multi-Format Support** - Chat, classification, QA, completion, tabular templates
4. **Export & Push** - Save results locally or push to new Hub repos

### Quick Start: SQL Queries

```bash
# 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

```bash
# 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

```bash
# 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

Files in this skill

  • manifest.json355 B
  • skill.md2.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in data →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.