hf-mcp
Use Hugging Face Hub via MCP server tools. Search models, datasets, Spaces, papers. Get repo details, fetch documentation, run…
Build and publish a Gradio demo on Hugging Face Spaces for a user-provided LoRA. Use when someone asks to create, generate, ship, or publish a Space, demo, Gradio app, or playground for a LoRA — including LoRAs for Qwen-Image, Qwen-Image-Edit, LTX-Video, Wan, FLUX, SDXL, or
Claude Code
$ npx -y skills add huggingface/skills --skill huggingface-lora-space-builder --agent claude-code
Codex
$ npx skills add huggingface/skills --skill huggingface-lora-space-builder -a codex -y
Cursor
$ npx skills add huggingface/skills --skill huggingface-lora-space-builder -a cursor -y
Gemini CLI
$ npx skills add huggingface/skills --skill huggingface-lora-space-builder -a gemini-cli -y
GitHub Copilot
$ npx skills add huggingface/skills --skill huggingface-lora-space-builder -a github-copilot -y
OpenCode
$ npx skills add huggingface/skills --skill huggingface-lora-space-builder -a opencode -y
Windsurf
$ npx skills add huggingface/skills --skill huggingface-lora-space-builder -a windsurf -y
name: huggingface-lora-space-builder description: Build and publish a Gradio demo on Hugging Face Spaces for a user-provided LoRA. Use when someone asks to create, generate, ship, or publish a Space, demo, Gradio app, or playground for a LoRA — including LoRAs for Qwen-Image, Qwen-Image-Edit, LTX-Video, Wan, FLUX, SDXL, or other diffusion base models. Also triggers when someone describes a LoRA they trained or hosts on the Hub and wants to share it. Covers picking the right base pipeline and `diffusers` inference recipe, designing a UI tailored to the LoRA's task and inputs (Union/multi-task control, edit, video, image, etc.), respecting model-card recommendations (trigger words, steps, guidance, LoRA scale, example inputs), and shipping to ZeroGPU hardware as a private Space by default.
Build and publish a Gradio demo on Hugging Face Spaces that runs inference with a user-provided LoRA. Use whenever someone asks to create, generate, ship, or publish "a Space", "a demo", "a Gradio app", or "a playground" for a LoRA — whether the base model is Qwen-Image, Qwen-Image-Edit, LTX, or another diffusion model. Also use when someone describes a LoRA they trained or hosts on the Hub and wants to share it. The default target is ZeroGPU hardware and the default inference library is `diffusers` when the base model supports it.
The output is a real, published Space (private by default) that the user can try in the browser, not a local script.
The demo should feel handcrafted for this specific LoRA, not a generic template with the LoRA bolted on. Two LoRAs that share a task can still need different demos: a pose-control video LoRA and an outpainting video LoRA both take video in and produce video out, but the inputs the user provides, the preprocessing, and the controls are completely different. Recognizing that is the central job here.
Concretely, a good demo:
Work through these phases in order. Information gathered in one phase decides the next.
1. Gather the LoRA info needed to pick a pipeline and design a UI. 2. Pick the base pipeline and inference recipe. 3. Design the UI for this specific LoRA's task and inputs. 4. Write `app.py`, `requirements.txt`, and `README.md` together; show all three to the user for one batched approval. 5. Publish the Space (private).
Don't drip-feed questions across multiple turns. Batch them.
---
Required: a LoRA repo on the Hub (e.g. `username/my-lora`).
**First, try to read the repo without a token.** If it succeeds, the repo is public — proceed. If it fails with 401/403, the repo is private/gated and you need an authenticated session to read it. **Don't immediately ask for a token.** Check first whether the user is already authenticated.
from huggingface_hub import HfApi, get_token
cached_token = get_token() # picks up HF_TOKEN env var or cached CLI login
if cached_token:
try:
info = HfApi().whoami(token=cached_token)
username = info["name"]
# info also has fine-grained token scope info if applicable
except Exception:
cached_token = None # token exists but is invalid/expiredThen:
When asking for a token (and only when you actually need to ask):
> I need a Hugging Face access token with **write** scope (to read the LoRA if it's private/gated, and to publish the Space). Create one at https://huggingface.co/settings/tokens. Paste it here.
The same token will be reused for publishing in the final phase, so this is a one-time ask.
**Then read what's in the repo:**
**From the model card, try to determine:**
Hugging Face Skills are definitions for AI/ML tasks like dataset creation, model training, and evaluation.
Use Hugging Face Hub via MCP server tools. Search models, datasets, Spaces, papers. Get repo details, fetch documentation, run…
Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and…
Discover the user's local AWS context (active profile, region, account ID, caller identity) at the start of any AWS task. Use…
Set up an isolated Python environment for SageMaker / AWS work, with the right Python version and current boto3. Use this skill…
Plan and coordinate the deployment of a model to Amazon SageMaker AI. Use this skill whenever the user wants to deploy, host,…
Ensure a usable SageMaker execution role exists before deploying or training. Use this skill whenever about to create a SageMaker…
Internals of the Feast codebase — how each component works, where the key abstractions live, and the data flow through the…
Query and browse evaluation results stored in MLflow. Use when the user wants to look up runs by invocation ID, compare metrics…