Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Run workloads on Hugging Face Jobs with managed CPUs, GPUs, TPUs, secrets, and Hub persistence.
.claude/skills/hugging-face-jobs/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-17 | ✗→✓ | ▲ Improved | 357% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 528% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 251% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 526% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 519% | 0% |
Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
Use this skill when users want to:
Before starting any job, verify:
hf_whoami()When tokens are required:
How to provide tokens:
python# hf_jobs MCP tool — $HF_TOKEN is auto-replaced with real token: {"secrets": {"HF_TOKEN": "$HF_TOKEN"}} # HfApi().run_uv_job() — MUST pass actual token: from huggingface_hub import get_token secrets={"HF_TOKEN": get_token()}
⚠️ CRITICAL: The $HF_TOKEN placeholder is ONLY auto-replaced by the hf_jobs MCP tool. When using HfApi().run_uv_job(), you MUST pass the real token via get_token(). Passing the literal string "$HF_TOKEN" results in a 9-character invalid token and 401 errors.
What are HF Tokens?
hf auth loginToken Types:
Always Required:
Not Required:
pythonhf_jobs("uv", { "script": "your_script.py", "secrets": {"HF_TOKEN": "$HF_TOKEN"} # ✅ Automatic replacement })
How it works:
$HF_TOKEN is a placeholder that gets replaced with your actual tokenhf auth login)Benefits:
pythonhf_jobs("uv", { "script": "your_script.py", "secrets": {"HF_TOKEN": "hf_abc123..."} # ⚠️ Hardcoded token })
When to use:
Security concerns:
pythonhf_jobs("uv", { "script": "your_script.py", "env": {"HF_TOKEN": "hf_abc123..."} # ⚠️ Less secure than secrets })
Difference from secrets:
env variables are visible in job logssecrets are encrypted server-sidesecrets for tokensIn your Python script, tokens are available as environment variables:
python# /// script # dependencies = ["huggingface-hub"] # /// import os from huggingface_hub import HfApi # Token is automatically available if passed via secrets token = os.environ.get("HF_TOKEN") # Use with Hub API api = HfApi(token=token) # Or let huggingface_hub auto-detect api = HfApi() # Automatically uses HF_TOKEN env var
Best practices:
os.environ.get("HF_TOKEN") to accesshuggingface_hub auto-detect when possibleCheck if you're logged in:
pythonfrom huggingface_hub import whoami user_info = whoami() # Returns your username if authenticated
Verify token in job:
pythonimport os assert "HF_TOKEN" in os.environ, "HF_TOKEN not found!" token = os.environ["HF_TOKEN"] print(f"Token starts with: {token[:7]}...") # Should start with "hf_"
Error: 401 Unauthorized
secrets={"HF_TOKEN": "$HF_TOKEN"} to job confighf_whoami() works locallyError: 403 Forbidden
Error: Token not found in environment
secrets not passed or wrong key namesecrets={"HF_TOKEN": "$HF_TOKEN"} (not env)os.environ.get("HF_TOKEN")Error: Repository access denied
$HF_TOKEN placeholder or environment variablespython# Example: Push results to Hub hf_jobs("uv", { "script": """ # /// script # dependencies = ["huggingface-hub", "datasets"] # /// import os from huggingface_hub import HfApi from datasets import Dataset # Verify token is available assert "HF_TOKEN" in os.environ, "HF_TOKEN required!" # Use token for Hub operations api = HfApi(token=os.environ["HF_TOKEN"]) # Create and push dataset data = {"text": ["Hello", "World"]} dataset = Dataset.from_dict(data) dataset.push_to_hub("username/my-dataset", token=os.environ["HF_TOKEN"]) print("✅ Dataset pushed successfully!") """, "flavor": "cpu-basic", "timeout": "30m", "secrets": {"HF_TOKEN": "$HF_TOKEN"} # ✅ Token provided securely })
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-17 | fail→pass | 11,231 | 5,426 | -52% | 1 | 1 | 0% | 2,240 | 10,235 | +357% | 0 | 0 | — |
case-01 | fail→fail | 17,741 | 25,056 | +41% | 1 | 1 | 0% | 3,644 | 11,460 | +214% | 0 | 0 | — |
case-02 | fail→fail | 16,050 | 14,186 | -12% | 1 | 1 | 0% | 3,169 | 9,940 | +214% | 0 | 0 | — |
case-03 | fail→fail | 6,835 | 7,228 | +6% | 1 | 1 | 0% | 1,243 | 9,492 | +664% | 0 | 0 | — |
case-04 | pass→fail | 17,172 | 10,581 | -38% | 1 | 1 | 0% | 3,724 | 11,297 | +203% | 0 | 0 | — |
case-05 | pass→pass | 9,937 | 12,613 | +27% | 1 | 1 | 0% | 2,089 | 11,620 | +456% | 0 | 0 | — |
case-06 | pass→pass | 13,648 | 11,190 | -18% | 1 | 1 | 0% | 2,630 | 11,484 | +337% | 0 | 0 | — |
case-07 | pass→pass | 8,722 | 13,768 | +58% | 1 | 1 | 0% | 1,462 | 9,964 | +582% | 0 | 0 | — |
case-08 | fail→pass | 9,137 | 5,608 | -39% | 1 | 1 | 0% | 1,612 | 10,128 | +528% | 0 | 0 | — |
case-09 | fail→pass | 15,964 | 7,849 | -51% | 1 | 1 | 0% | 3,017 | 10,599 | +251% | 0 | 0 | — |
case-10 | pass→pass | 9,454 | 36,925 | +291% | 1 | 1 | 0% | 1,513 | 10,452 | +591% | 0 | 0 | — |
case-11 | fail→pass | 16,108 | 6,401 | -60% | 1 | 1 | 0% | 1,639 | 10,265 | +526% | 0 | 0 | — |
case-12 | fail→pass | 29,111 | 6,241 | -79% | 1 | 1 | 0% | 1,687 | 10,446 | +519% | 0 | 0 | — |
case-13 | pass→pass | 10,652 | 7,126 | -33% | 1 | 1 | 0% | 1,999 | 10,435 | +422% | 0 | 0 | — |
case-14 | pass→pass | 9,434 | 4,596 | -51% | 1 | 1 | 0% | 1,727 | 10,009 | +480% | 0 | 0 | — |
case-15 | fail→pass | 16,796 | 8,336 | -50% | 1 | 1 | 0% | 3,071 | 10,633 | +246% | 0 | 0 | — |
case-16 | fail→pass | 17,134 | 5,192 | -70% | 1 | 1 | 0% | 2,742 | 10,070 | +267% | 0 | 0 | — |
case-18 | fail→pass | 6,140 | 3,807 | -38% | 1 | 1 | 0% | 1,030 | 9,796 | +851% | 0 | 0 | — |
case-19 | fail→pass | 11,745 | 5,362 | -54% | 1 | 1 | 0% | 2,196 | 10,167 | +363% | 0 | 0 | — |
case-20 | fail→pass | 9,282 | 4,781 | -48% | 1 | 1 | 0% | 1,595 | 10,044 | +530% | 0 | 0 | — |
case-21 | fail→pass | 9,215 | 4,982 | -46% | 1 | 1 | 0% | 1,779 | 9,975 | +461% | 0 | 0 | — |
case-22 | fail→pass | 10,278 | 4,490 | -56% | 1 | 1 | 0% | 2,106 | 10,070 | +378% | 0 | 0 | — |
case-23 | pass→pass | 13,652 | 3,980 | -71% | 1 | 1 | 0% | 2,524 | 9,885 | +292% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 19 counted toward the lift figure. The other 4 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +48 percentage points is the difference between those two pass rates over the 19 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
The publisher has shipped newer versions since this run, so these numbers describe v2, not the version currently listed.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 7/28/2026 | +32% |
Other measured skills in the registry, with their headline benchmark lift.