/hf-publisher-tools:explainer-spacefrom hf-publisher-tools
Build and publish a Hugging Face Space that explains and demos one of the user's models, one dataset, or a group of related datasets (a family, versions, or the stages of one pipeline). Covers the design step, a template library (ONNX classifier demo, dataset/group explorer), local testing, deploy, linking from the cards, and filing it in a collection. Use when the user says "make a Space for the model", "HF space explainer for <model/dataset>", "demo space", "a Space that shows these datasets together".
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.
Read when SKILL.md points to them.
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 explainer-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.
Templates: look in <data folder>/templates/<name>/ first. A folder there wins over the built-in skills/explainer-space/templates/<name>/ of the same name. Built-ins are read from the plugin, never copied into the data folder; copy a template only into the project you are building.
The result is a public Gradio Space that a stranger can understand in 30 seconds. It says what the thing is and why it exists, lets them try it or browse it, and gives honest numbers and limits.
config.json (id2label, max length), any threshold/config JSON, the file list (is there an ONNX or int8 build?), and the training code in the subject's GitHub repo (the exact input format). Pull test-split rows for examples.splits and size from https://datasets-server.huggingface.co/{splits,size,statistics}?dataset=<id>, and how the datasets relate (find the generator repo if there is one). For a group, also ask: is this a version series, the stages of one pipeline, or siblings on one subject? That decides the About text.<repo>/space/. If none exists, keep the source in the Space repo alone.Decide what the visitor needs to do: type an input, compare cases, browse rows, compare datasets. Then pick from templates/README.md:
| Subject | Template |
|---|---|
| text or text-pair classifier with ONNX | onnx-pair-classifier |
| one dataset, or a group of datasets | dataset-explorer (a group gets an overview tab automatically) |
| a page with no live inference (task explainer, diagram, prior art across several models) | static HTML, see create-space |
| anything else | design it; reuse parts; add it to the library after |
Fixed in every Space:
cpu-basic) unless the user asks for hardware. For a model, prefer the int8 ONNX build. For data, use the viewer API rather than downloading.HF_PUB_NAME_STYLE. Reuse the model or dataset name (a Space and a model can share an id), e.g. <owner>/<Model-Name>. For a group, name the family: <Subject>-Datasets.SP=<scratchpad>; uv venv -q $SP/venv && . $SP/venv/bin/activate
uv pip install -q -r <repo>/space/requirements.txt "gradio==5.49.1"
cd <repo>/space && python -c "import app; ..." # call the handlers directly on the examples
Every example must give the expected label, and every dataset/split must load or show a clean viewer message. Gradio does not pull in requests or pandas for you, so list them.
Launch check (stdout is buffered, so poll the port, not the log):
(timeout 60 python app.py > run.log 2>&1 &); until curl -so /dev/null localhost:7860; do sleep 1; done
python -c "from gradio_client import Client; print(Client('http://127.0.0.1:7860').view_api(return_format='dict')['named_endpoints'].keys())"
The Space README.md frontmatter sets sdk: gradio, sdk_version, app_file, license, short_description (60 characters max), and models:/datasets: so the Hub links them both ways.
S="${CLAUDE_PLUGIN_ROOT}/scripts/hf-hub.py"
python3 "$S" create space <owner>/<Name> public # hf repo create needs --space-sdk (hyphen), not --space_sdk
hf upload <owner>/<Name> <repo>/space . --repo-type space --exclude "__pycache__/*" --commit-message "..."
hf upload to a missing Space id creates it public without asking. Run create first so visibility is a decision.
Wait for python3 "$S" space-status <id> to reach stage RUNNING, with an until-loop of 10 s steps (builds take 1–3 minutes). *_ERROR means read the build logs on the Space page. Then verify the live Space: gradio_client.Client("<owner>/<Name>").predict(..., api_name="/<handler>") on one known example. RUNNING alone is not proof that it works.
A public Space for a public model or dataset needs no extra confirmation: the user asking for it is the approval. A public Space that shows a private dataset publishes its rows, so confirm that first.
**Try it:** [explainer and live demo Space](https://huggingface.co/spaces/<id>) line near the top, and upload just README.md.space/ row in the README contents table with the redeploy command.collections skill. Add the Space to the collection that holds its model or dataset, and add the dataset there too if it's missing.A worked example is the built-in onnx-pair-classifier template: an explainer Space for a task-break classifier, built in about 15 minutes with its model and dataset linked both ways.
Reads profile.env, explainer-space.md and templates/ from the data folder. Writes nothing there; Space source is written into the project you are building.
templates/README.md (opens in a new tab)templates/dataset-explorer/README.md (opens in a new tab)templates/dataset-explorer/app.py (opens in a new tab)templates/dataset-explorer/explainer.md (opens in a new tab)templates/dataset-explorer/requirements.txt (opens in a new tab)templates/dataset-explorer/space.json (opens in a new tab)templates/onnx-pair-classifier/README.md (opens in a new tab)templates/onnx-pair-classifier/app.py (opens in a new tab)templates/onnx-pair-classifier/examples.json (opens in a new tab)templates/onnx-pair-classifier/requirements.txt (opens in a new tab)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".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