huggingface-zerogpu

huggingface-zerogpu is a skill for Claude Code from waybarrios/opencode-power-pack. It costs 55 tokens per session (4,164 once invoked), scanned A, a copy of huggingface-zerogpu, MIT.

A development guide for ZeroGPU Hugging Face Spaces, which are Gradio web apps that can temporarily use shared GPUs without dedicated GPU hardware.

In plain words
What is it for?
Use it to implement or debug Gradio apps with the @spaces.GPU decorator, including resource sizing, state handling, and concurrent requests.
Why use it?
It explains the constraints that commonly cause failures, including parallel requests, GPU isolation, quotas, runtime duration, and CUDA package compatibility.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the opencode-power-pack plugin — 54 skills shipped together

Good fit Use it to implement or debug Gradio apps with the @spaces.GPU decorator…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/waybarrios/opencode-power-pack/huggingface-zerogpu
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add waybarrios/opencode-power-pack --skill huggingface-zerogpu
Clone the repo
git clone --depth 1 https://github.com/waybarrios/opencode-power-pack

Made for: Claude Code.

Or install opencode-power-pack, the plugin that ships this one along with the rest of its 54 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for huggingface-zerogpu

README.md
[![agentmods](https://agentmods.dev/badge/skills/waybarrios/opencode-power-pack/huggingface-zerogpu.svg)](https://agentmods.dev/skills/waybarrios/opencode-power-pack/huggingface-zerogpu)
Your own site
<a href="https://agentmods.dev/skills/waybarrios/opencode-power-pack/huggingface-zerogpu"><img src="https://agentmods.dev/badge/skills/waybarrios/opencode-power-pack/huggingface-zerogpu.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,164 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 89% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00055 $0.04164
Opus 5 $0.00028 $0.02082
Sonnet 5 $0.00011 $0.00833
Haiku 4.5 $0.00006 $0.00416

Measured 2d ago against content hash 3bfa552d3bdb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

huggingface-zerogpu scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

89% identical to huggingface-zerogpu — 7 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/huggingface-zerogpu/SKILL.md · 291 lines

How it starts

The opening of the file, as written. The whole thing — 291 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 When choosing duration values, debugging illegal duration vs quota exceeded errors, or explaining why default 60s blocks short tasks
references/cuda-and-deps.md When installing CUDA-dependent packages (e.g. flash-attn), pinning torch side-cars, or reading wheel filename tags

Hardware

ZeroGPU exposes two GPU sizes that map to a fraction of the backing card:

size Slice of backing GPU Quota cost
large (default) Half 1x
xlarge Full 2x

Default large gives half a physical GPU, so memory bandwidth and compute are significantly lower than the full card's specs. Use xlarge only when the workload genuinely needs the extra memory or compute.

Backing GPU changes without notice. ZeroGPU has already migrated across GPU generations several times; older write-ups may name A100 or H200, but those are outdated. For the current backing GPU and exact per-size VRAM, always check the ZeroGPU docs before sizing workloads.

Read the full file on GitHub · 291 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed 3bfa552d3bdb
  2. 7d ago First seen · 291 lines · 55 tokens per session scan A 436361e62d91

Subscribe to this mod's changes

huggingface-zerogpu is a skill published in the GitHub repository waybarrios/opencode-power-pack (490 stars, last pushed 4d ago), licensed MIT. It adds 55 tokens to every session and 4,164 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to huggingface-zerogpu, differing in 7 lines, and is treated as a copy.

Related

Other skills, from other repositories

review-loop

Run the adversarial verification loop — implement, then hand the change to a fresh checker that did not write it, fix what it finds, and re-dispatch until APPROVE. Use before claiming any behavioural change is done, and on requests like "review loop", "adversarial review", "independent review", "get this verified"…

sangrokjung/claude-forge · 100 tokens

ln-22-codebase-auditor

Audits cross-cutting code health, security, delivery, and maintainability when no specialist audit is primary. Not for a single delivery review.

levnikolaevich/claude-code-skills · 38 tokens

dx-audit

Audits libraries, CLIs, and SDKs using 38 rules for public contracts, package exports, piped output, errors, and configuration. Use when asked to "audit my CLI", "review my SDK", "make this agent-friendly", or diagnose package type resolution. For agentic product trust use ax-audit; for docs use docs-writing.

mblode/agent-skills · 76 tokens

silent-failure-hunter

Audits error-handling code in a pull request for silent failures, broad catch blocks, unjustified fallbacks, and unactionable error messages. Surfaces hidden failures users would otherwise hit in production. Use when reviewing PRs that add or modify try/catch, error callbacks, or fallback logic.

jasmedia/cc-pr-reviewer · 67 tokens

bugfix

Fix a bug with xReview peer review. Codex is the developer, a peer LLM agent reviews your work. Use when: /bugfix, fix a bug with review.

tonychen15/xReview · 40 tokens

error-audit

Audit code for silent error swallowing, fallbacks to degraded alternatives, backwards compatibility shims, and UI that fails to show errors to the user. Finds and fixes all occurrences in the specified scope.

markmdev/meridian · 43 tokens