# /huggingface-spaces: Build and debug Hugging Face Spaces the agent can verify

Source: https://trendhub.net/skills/huggingface-skills/huggingface-spaces
Skill folder: https://github.com/huggingface/skills/tree/main/skills/huggingface-spaces
Pack: Hugging Face Skills (https://trendhub.net/skills/huggingface-skills)
Works with: Claude Code, Gemini CLI

The Spaces skill takes the agent from login checks to a working Space: searching for an existing demo, choosing between Gradio, Docker and Static SDKs, picking hardware your plan allows, writing the README frontmatter and requirements, pushing files, and proving the app works by calling its API and checking the output and logs.

## When to use it

- You want to host a model demo on Hugging Face and are unsure which SDK or hardware fits your account.
- You need to port an existing Gradio demo onto ZeroGPU.
- Your Space builds or shows RUNNING but returns errors or wrong output.

## How it works

1. **Check account limits**: The agent verifies the hf CLI and login and reads the whoami flags that decide which hardware your account may use.
2. **Look for prior art**: It searches existing Spaces for the model or task and reads their app and requirements files before choosing an approach.
3. **Create and build**: It creates the Space with the right SDK, flavour and visibility, keeps secrets out of visible env vars, and follows the ZeroGPU import and loading rules.
4. **Iterate on the live Space**: It pushes with the space repo type and uses hot-reload or targeted uploads, rebuilding only when dependencies or frontmatter change.
5. **Verify for real**: It checks runtime state, reads logs for silent fallbacks, calls the endpoint with the Gradio client and inspects the returned file.

## What it steers the agent away from

- Accidentally uploading to a model repo because the Space repo type was left out.
- Pinning gradio, spaces or huggingface_hub in requirements and breaking the runtime.
- Declaring success from a RUNNING status alone.

## What it can touch

It creates and updates Space repos, secrets, variables and volumes under your account, and can attach paid hardware or storage if you confirm.

## Pairs well with

- `/hf-cli`
- `/huggingface-gradio`
- `/huggingface-zerogpu`

## Questions

### Can I host a Gradio Space on a free account?

The skill says free personal accounts in good standing can host up to two ZeroGPU Spaces; other Gradio or Docker hardware needs a paid plan, while Static Spaces are free.

### What if I need a GPU I cannot pay for?

It suggests creating a Static Space, pushing the app there and applying for a community grant, or using Inference Providers instead of hosting the model.
