huggingface-spaces

huggingface-spaces is a skill for Codex from PracticalSwan/agent-skills. It costs 106 tokens per session (5,074 once invoked), scanned B, original, MIT.

A guide to building and hosting apps on Hugging Face Spaces, a service where applications are stored as repositories and made available online.

In plain words
What is it for?
Use it to create, deploy, maintain, and debug Gradio, Docker, or static applications on Hugging Face Spaces.
Why use it?
It helps choose a supported app format and investigate problems with deployment, model loading, hardware, or storage.

Skill for Codex

Written for Codex: reads ~/.codex or $CODEX_HOME. Also seen: mentions Claude Code; mentions Codex.

Good fit Use it to create, deploy, maintain, and debug Gradio, Docker, or static applications on Hugging Face Spaces.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/practicalswan/agent-skills/huggingface-spaces
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 PracticalSwan/agent-skills --skill huggingface-spaces
Clone the repo
git clone --depth 1 https://github.com/PracticalSwan/agent-skills

Made for: Codex.

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-spaces

README.md
[![agentmods](https://agentmods.dev/badge/skills/practicalswan/agent-skills/huggingface-spaces/github.svg)](https://agentmods.dev/skills/practicalswan/agent-skills/huggingface-spaces)
Your own site
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/huggingface-spaces"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/huggingface-spaces/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for huggingface-spaces

Your own site · 80×15
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/huggingface-spaces"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/huggingface-spaces.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,074 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.00106 $0.05074
Opus 5 $0.00053 $0.02537
Sonnet 5 $0.00021 $0.01015
Haiku 4.5 $0.00011 $0.00507

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

Security

Grade B, and why

huggingface-spaces scanned grade B with 1 finding 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 3d 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.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

**B. Logs clean post-boot?** Read the run log to confirm startup finished without warnings or silent fallbacks:
huggingface-spaces/SKILL.md · 301 lines

How it starts

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

Hugging Face Spaces

Hugging Face Spaces host machine-learning applications. There are 1M+ today; each Space is a git repo. This skill covers creating, building, debugging, and maintaining them.

0. Getting ready

Before anything else:

  1. Check whether the hf CLI is installed (Get-Command hf on Windows or command -v hf on POSIX). If it is absent, use the official Python SDK or browser workflow; do not install a runtime implicitly.
  2. Check the user is logged in: hf auth whoami. If not, ask the user to run hf auth login locally and complete its browser/OAuth flow, or configure an approved secret manager. Never request or accept a token value in chat or pass a literal token in a command argument.
  3. Note whoami's canPay and isPro flags — they gate hardware choices below. A free (isPro=False) account can only host Static Spaces and up to 2 ZeroGPU Spaces.

The optional hf-cli skill teaches every hf command. Load it only when the hf runtime is already installed and the user explicitly authorizes adding that skill; this catalog omits it because the laptop has no hf command.

1. What a Space is

A Space is a git repo with three possible SDKs:

  • Gradio — most Spaces. Python, fast iteration, supports ZeroGPU.
  • Docker — arbitrary container. Use when you need a non-Python stack or a pre-built template (Streamlit, Argilla, Shiny, etc. — full list at https://huggingface.co/docs/hub/spaces-sdks-docker). Does not support ZeroGPU.
  • Static — plain HTML, or a React/Svelte/Vue project built at deploy time. Use for in-browser ML (transformers.js / WebGPU / WebAssembly / onnxruntime-web), project pages, interactive reports, or Spaces that orchestrate other Spaces. No hardware needed.

Hardware tiers

Static Spaces are free for everyone and need no hardware. Gradio and Docker Spaces run on compute and require a paid plan to create — PRO for personal accounts, Team or Enterprise for organizations — with one exception: free personal accounts in good standing (verified email, account older than 30 days) can host up to 2 ZeroGPU Spaces.

Read the full file on GitHub · 301 lines

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. 3d ago Changed 63f7690a7993
  2. 4d ago Changed 7271fe4984a9
  3. 7d ago First seen · 301 lines · 106 tokens per session scan B 9eacdb9403dc

Subscribe to this mod's changes

huggingface-spaces is a skill published in the GitHub repository PracticalSwan/agent-skills (14 stars, last pushed 3d ago), licensed MIT. It adds 106 tokens to every session and 5,074 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

huggingface

Use when running open models or working on the Hugging Face platform — the Inference Providers router or InferenceClient, Hub repos via the hf CLI, a dedicated Inference Endpoint with scale-to-zero, a Gradio Space with ZeroGPU, picking an open model by task/license/size, or loading one locally with transformers. NOT…

ericrisco/rsc-harness · 131 tokens

hugging-face-model-trainer

This skill should be used when users want to train or fine-tune language models using TRL (Transformer Reinforcement Learning) on Hugging Face Jobs infrastructure. Covers SFT, DPO, GRPO and reward modeling training methods, plus GGUF conversion for local deployment. Includes guidance on the TRL Jobs package, UV…

synthetic-sciences/openscience · 131 tokens

tensorrt-llm

High-throughput LLM inference on NVIDIA GPUs.

NousResearch/hermes-agent · 18 tokens

google-cloud-solution-guided-gke-ai-migration

Guides the migration of existing AI workloads (Cloud Run, Gemini API, Gemini Enterprise Agent Platform) to self-hosted GKE inference using gcloud and kubectl. Use when the user has an existing AI inference workload (on Cloud Run, the Gemini API, Gemini Enterprise Agent Platform, or a custom VM) and wants to move it to…

google/skills · 157 tokens

agent-platform-tuning

Agent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outside Agent Platform, model deployment to endpoints (use agent-platform-deploy), or managing serving endpoints (use agent-platform-endpoint-management).

google/skills · 64 tokens

gke-inference

Deploys and optimizes AI/ML inference workloads on GKE, using GPUs, TPUs, and model servers. Use when deploying GKE inference servers, configuring GKE GPU resources for inference, or deploying LLMs on GKE. Don't use for generic batch jobs or HPC task queues (use gke-batch-hpc instead).

google/skills · 74 tokens