deploy-hf

A deployment guide for publishing an OpenEnv environment to Hugging Face Spaces, a service for hosting and sharing machine-learning applications.

In plain words
What is it for?
Use it to deploy a new environment, push changes to an existing Space, or update a hosted environment after adding features.
Why use it?
It removes guesswork around choosing the environment, repository, required files, and credentials before deployment.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/huggingface/openenv/deploy-hf
Any agent
npx skills add huggingface/OpenEnv --skill deploy-hf
Clone the repo
git clone --depth 1 https://github.com/huggingface/OpenEnv

Made for: Claude Code, Codex.

Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,706 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00032 $0.01706
Opus 5 $0.00016 $0.00853
Sonnet 5 $0.00006 $0.00341
Haiku 4.5 $0.00003 $0.00171

Measured yesterday against content hash 2a56ced432e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

deploy-hf scanned grade A 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 yesterday.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl https://<username>-<space-name>.hf.space/health
.claude/skills/deploy-hf/SKILL.md · 220 lines

How it starts

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

Deploy to Hugging Face Spaces

Deploy an OpenEnv environment to Hugging Face Spaces using the OpenEnv CLI.

When to Use This Skill

  • User asks to "deploy to Hugging Face"
  • User says "push to Hugging Face Spaces"
  • User wants to update an existing space
  • After implementing new features that need to be tested in production

Prerequisites

Before deploying, ensure:

  1. The environment has an openenv.yaml file
  2. The environment has a server/Dockerfile
  3. You have Hugging Face credentials configured (automatic via huggingface-cli)

Instructions

1. Identify the Environment

Determine which environment to deploy:

  • If user specifies: use that environment (e.g., "carla_env", "browser_env")
  • If in environment directory: use current directory
  • Otherwise: ask the user

2. Determine the Repository ID

Repository ID format: username/space-name

  • If user provides full ID: use it (e.g., "sergiopaniego/carla-env-real-updated")
  • If user provides only space name: construct ID with their username
  • Check openenv.yaml for default repo-id
  • Otherwise: ask the user

3. Pre-Deployment Setup

IMPORTANT: Always run from the project root directory.

Before deploying, ensure OpenEnv is installed:

cd /path/to/OpenEnv  # Navigate to project root if needed
uv pip install -e .

If this fails with "does not appear to be a Python project", you're not in the project root.

4. Run the Deployment Command

Execute the deployment:

PYTHONPATH=src uv run python -m openenv.cli push <environment-dir> --repo-id <username/space-name>

Parameters:

  • <environment-dir>: Path to environment (e.g., envs/carla_env)
  • --repo-id: Hugging Face Spaces repository ID (e.g., sergiopaniego/carla-env-real-updated)

Optional flags:

  • --private: Deploy as a private space
  • --no-interface: Disable the web interface (deploy API-only)
  • --base-image <image>: Override the base Docker image
  • --hardware <hw> / -H <hw>: Request Hugging Face Space hardware (e.g. t4-medium, a10g-small, cpu-basic)

Read the full file on GitHub · 220 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. yesterday First seen · 220 lines · 32 tokens per session scan A 2a56ced432e9

Subscribe to this mod's changes

deploy-hf is a skill published in the GitHub repository huggingface/OpenEnv (2,531 stars, last pushed 4d ago), licensed BSD-3-Clause. It adds 32 tokens to every session and 1,706 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

huggingface-spaces

Build, deploy, and maintain applications on Hugging Face Spaces — Gradio / Docker / Static SDKs, ZeroGPU and dedicated hardware, model loading, debugging, buckets, inference providers, community grants. Use whenever the user asks to create or host an app on Hugging Face, port code onto ZeroGPU, fix a Space that won't…

huggingface/skills · 106 tokens

cloud-architect

Designs cloud architectures, creates migration plans, generates cost optimization recommendations, and produces disaster recovery strategies across AWS, Azure, and GCP. Use when designing cloud architectures, planning migrations, or optimizing multi-cloud deployments. Invoke for Well-Architected Framework, cost…

Jeffallan/claude-skills · 71 tokens

kagent-dev

Development guide for kagent's v1alpha3 Harness and AgentTemplate CRDs, AgentInstance gRPC control plane, upstream A2A integration, Substrate runtime provisioning, tests, generation, and PR workflow. Use for any implementation, debugging, review, or CI task in the kagent repository.

kagent-dev/kagent · 65 tokens

timoni

Use when deploying applications to Kubernetes with Timoni. Covers installing and upgrading module instances from OCI registries, composing multi-app deployments with bundles, injecting values from clusters or CI with runtimes, targeting multiple clusters, and authoring, testing, signing and publishing modules with CUE.

stefanprodan/timoni · 59 tokens

azmon-mirroredcatalogs-operations-cli

Brings Azure Monitor, Application Insights, and Log Analytics telemetry into Fabric as Eventhouse external delta tables and correlates it with business data. Use to onboard observability data, judge whether latency or availability affected revenue, or build a Real-Time dashboard and Operations Agent over it.

microsoft/skills-for-fabric · 66 tokens

durable-objects

Create and review Cloudflare Durable Objects. Use when building stateful coordination (chat rooms, multiplayer games, booking systems), implementing RPC methods, SQLite storage, alarms, WebSockets, or reviewing DO code for best practices. Covers Workers integration, wrangler config, and testing with Vitest. Biases…

cloudflare/skills · 76 tokens