/hf-publisher-tools:create-spacefrom hf-publisher-tools
Create and publish a Hugging Face Space (static HTML, Gradio or Docker), public or private, under the user's account or an org; deploy its files, wait until it runs, verify it live, check status or restart it, and file it in a collection. Use when the user says "make a Space", "create an HF space for…", "put this page on Hugging Face", "deploy to a Space", "is the Space up", "restart the Space". For a demo/explainer of one model or dataset, explainer-space has templates and builds on this.
Ships in hf-publisher-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Find the data folder (see shared/settings.md: $HF_PUB_HOME, $CLAUDE_USER_DATA/hf-publisher-tools/, then ~/.claude-user-data/hf-publisher-tools/). Read profile.env and create-space.md there if they exist. They win over the defaults below, and comments in profile.env are instructions. With no profile, use the defaults below and offer setup at the end.
create-model: the user's named owner, else HF_PUB_DEFAULT_OWNER; visibility HF_PUB_DEFAULT_VISIBILITY (default private; asking for a public page is the approval); name per HF_PUB_NAME_STYLE (default: as given).| Need | SDK | Notes |
|---|---|---|
| A page: explainer, docs, diagram, results, links. No server code | static | index.html at the root (or app_file). No build, live in seconds, free, never sleeps. Can't be restarted (400 "Can't restart a static Space") |
| Interactive inference or a data browser in Python | gradio | pin sdk_version (the plugin's templates use 5.49.1); runs on cpu-basic unless the user asks for hardware; sleeps when idle |
| Anything else (custom server, non-Python) | docker | app_port in the frontmatter (default 7860) |
<repo>/space/, or a descriptive folder such as explainer/ when space/ is taken), deployed as-is. A Space with no subject repo keeps its source on the Hub alone.README.md)---
title: Paragraph Inference for ASR
emoji: 📝 # must be a pictographic emoji: "¶" fails validate-yaml with 400
colorFrom: blue # red, yellow, green, blue, indigo, purple, pink, gray
colorTo: gray
sdk: static # or gradio (+ sdk_version, app_file: app.py) / docker (+ app_port)
app_file: index.html
pinned: false
license: mit
models: [owner/Model] # links the Space from the model and dataset pages
datasets: [owner/Dataset]
short_description: … # 60 characters max
---
The Hub validates this on upload (/api/validate-yaml), so a bad field fails the whole upload
before anything is committed.
S="${CLAUDE_PLUGIN_ROOT}/scripts/hf-hub.py"
python3 "$S" create space <owner>/<Name> public --sdk static # or gradio / docker; 409 = exists
hf upload <owner>/<Name> <folder> . --repo-type space --exclude "__pycache__/*" --commit-message "..."
python3 "$S" space-status <owner>/<Name> # repeat until stage is RUNNING
create before uploading. hf upload to a missing id creates it public without asking.hf CLI: uv run --with huggingface_hub python -c "from huggingface_hub import HfApi; HfApi().upload_folder(repo_id=..., repo_type='space', folder_path=...)".$HF_TOKEN, else ~/.cache/huggingface/token; if neither, see the comments in profile.env.Wait on space-status with an until-loop in 10 s steps. Static is RUNNING almost at once; Gradio
and Docker builds take 1–3 minutes. BUILD_ERROR / RUNTIME_ERROR puts the reason in error,
and the full logs are on the Space page. space-restart <id> restarts it, and --factory
rebuilds it from scratch. Use those after changing a secret, or when it's stuck.
RUNNING only means it started.
https://<owner>-<name>.static.hf.space/ (lower-case) and check for real
content, for example the <h1>. Render it if layout matters: google-chrome --headless --screenshot=… --window-size=1000,3000 file://<folder>/index.html, then look at the image.gradio_client.Client("<owner>/<Name>", token=...).predict(..., api_name="/<handler>") on a
known example. If the app shows files it got from snapshot_download / hf_hub_download (images,
audio), the call must return a file, not raise InvalidPathError: Gradio refuses to serve paths in the
HF hub cache unless demo.launch(allowed_paths=[huggingface_hub.constants.HF_HUB_CACHE]). Missed on
a real annotation Space: it ran with no runs, then every image errored once the first run landed.curl the endpoint the app serves.**Try it:** or **Explainer:** line on the model or dataset card, plus a row in the subject repo's README (if there is one) listing the folder and the redeploy command.collections skill. collection-find on its model shows which collection to use;
collection-item … --position 0 puts an explainer first.explainer-space (template library, local testing).Reads profile.env and create-space.md from the data folder. Writes nothing.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
21 skills in this plugin
/access-requestsReview and decide access requests on your gated Hugging Face models and datasets. Lists every gated repo under your owners with pending requests and their form answers, shows them with a neutral reading (or against your own acceptance policy), and accepts or rejects only the users you name. Also gives a history of requests over the last N days. Use when asked who has requested access, to check, approve or reject access requests, or after a release./audio-parquet-standardiseStandardise a user's Hugging Face audio datasets on parquet. Find their audio datasets from the latest hub-inventory export, check each one's file layout, and convert any that still hold loose audio files (wav/flac/mp3, audiofolder layouts, ad-hoc folders) into parquet shards with an embedded Audio column. Verify each against its source, remove the loose files, and repeat until none are left. Use when the user says "convert my audio datasets to parquet", "standardise audio datasets", "any audio datasets still loose files?", "parquet sweep", or after a new audio dataset is published as individual files./collectionsKeep a user's Hugging Face collections current: list an owner's collections, find models, datasets and Spaces that are in none of them, find which collections hold a repo, create a collection, add, remove, annotate or reorder items, rename or re-describe a collection, change its visibility, delete it. Works for the user and every org they belong to. Use after creating or publishing any Hub repo, or on "update the collections", "add it to a collection", "what isn't in a collection", "which collection is X in", "take X out of", "rename the collection", "reorder", "delete the collection"./complementary-pluginsList and install plugins that complement hf-publisher-tools: data-utils. Use on "what goes with this plugin", "related plugins"./contact-supportEmail Hugging Face support about the Hub account, an org, a repo or billing. Use when the user says "email HF support", "contact Hugging Face", "ask HF to unlock/delete/rename this DOI repo", "HF billing question", or when a Hub action is blocked and only staff can do it (DOI-locked delete, rename or visibility change; account or org problems; stuck Space; storage or quota)./create-datasetCreate a Hugging Face dataset repository, public or private, under the user's account or one of their organisations. Use when the user says "create a private dataset", "make a public dataset repo on HF", "new dataset under <org>", "set up a dataset on Hugging Face for X".hf-publisher-tools@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin hf-publisher-tools