Agent skill · Documentation

huggingface-zerogpu

AI demos and GPU compute with Gradio Spaces and Hugging Face Spaces ZeroGPU. Use when writing or reviewing code that uses `@spaces.GPU`, configuring `python_version` or `requirements.txt` for a ZeroGPU Space, or handling ZeroGPU-specific code constraints — pickle-based process isolation, `gr.State` semantics across the worker boundary, no `torch.compile` (use AoTI instead), CUDA wheel-only builds (no `nvcc` at build or runtime), large vs xlarge sizing, and dynamic duration callables. Make sure to use this skill whenever the user mentions ZeroGPU, `@spaces.GPU`, or the `spaces` Python package,

Wayner Barrios443★ · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add waybarrios/opencode-power-pack --skill huggingface-zerogpu --agent claude-code

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

Facts
Files in the skill folder: 5
SKILL.md size: 18 KB
Bundled scripts: none
Path: skills/huggingface-zerogpu/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 443
Language: JavaScript
Read our review of the source →

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

From the SKILL.md

# Hugging Face ZeroGPU Rules and patterns for ML demos on Hugging Face Spaces with **ZeroGPU** hardware. Covers `@spaces.GPU`, duration and quota tuning, process isolation, the CUDA availability model, concurrency safety, and CUDA build constraints. ## Scope This skill is for **Gradio SDK Spaces using ZeroGPU hardware**. Docker and Static Spaces cannot schedule onto ZeroGPU, and Streamlit apps now run as Docker Spaces — so this skill applies only to Gradio. For general Gradio coding (components, layouts, event listeners), see the `huggingface-gradio` skill in this repo. The authoritative ZeroGPU docs live at https://huggingface.co/docs/hub/spaces-zerogpu — refer to them for the current backing GPU, runtime version lists, and tier thresholds, all of which change over time. ## Reference Files | Reference | When to read | |-----------|--------------| | `references/concurrency.md` | Always read alongside SKILL.md when writing ZeroGPU code — handlers run in parallel by default | | `references/how-zerogpu-works.md` | When reasoning about cold-starts, worker reuse, why module-scope warmup does not carry to requests, or why returning CUDA tensors hangs | | `references/how-quota-works.md` |

What's inside
Steps it walks through
  1. Scope
  2. Reference Files
  3. Hardware
  4. Basic Pattern
  5. CUDA Availability Model
  6. Device selection idiom still works
  7. Eager loading is the right default
  8. Local Development: Just Install spaces
  9. Anti-pattern
  10. Do this instead
  11. Duration and Quota
  12. Dynamic duration for variable workloads
  13. Process Isolation and Pickle
  14. gr.State semantics across the boundary
Ships with 4 files
  • references/concurrency.md
  • references/cuda-and-deps.md
  • references/how-quota-works.md
  • references/how-zerogpu-works.md
Commands it runs
uv export --no-hashes --no-dev --no-emit-package spaces -o requirements.txt
More from opencode-power-pack
All skills →
About this skill
What does the huggingface-zerogpu skill do?

AI demos and GPU compute with Gradio Spaces and Hugging Face Spaces ZeroGPU. Use when writing or reviewing code that uses `@spaces.GPU`, configuring `python_version` or `requirements.txt` for a ZeroGPU Space, or handling ZeroGPU-specific code constraints — pickle-based process isolation, `gr.State` semantics across the worker boundary, no `torch.compile` (use AoTI instead), CUDA wheel-only builds (no `nvcc` at build or runtime), large vs xlarge sizing, and dynamic duration callables. Make sure to use this skill whenever the user mentions ZeroGPU, `@spaces.GPU`, or the `spaces` Python package,

How do I install it?

Run `npx skills add waybarrios/opencode-power-pack --skill huggingface-zerogpu --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 waybarrios/opencode-power-pack, a repository with 443 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