HF Spaces for Openclaw

A comprehensive integration for generating high-quality AI media content via HuggingFace Spaces and Inference Providers.

gary149
v1.0.2
Feb 17, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install hf-spaces

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install hf-spaces using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is HF Spaces?

The HF Spaces skill provides a robust framework for AI agents to interact with the vast ecosystem of HuggingFace. By utilizing Openclaw Skills, developers can programmatically generate images, videos, audio, and text through either direct MCP tools or custom Python scripts. This skill serves as a bridge to the Gradio ecosystem, allowing for complex media generation tasks to be handled with minimal configuration.

Whether you need to batch generate hundreds of assets or chain multiple specialized models together (such as image-to-video pipelines), this skill offers the flexibility required for modern AI development. It leverages the gradio_client and huggingface_hub libraries to ensure high performance and broad compatibility across thousands of available models.

HF Spaces Use Cases

  • Rapid generation of marketing assets including images and short-form videos.
  • Creating text-to-speech narrations for automated content creation pipelines.
  • Automated image-to-video conversion for dynamic media processing.
  • Batch processing of AI generation tasks to increase workflow efficiency.
  • Discovering and testing new AI models via semantic search directly within an agent environment.

How HF Spaces Works

  1. The agent identifies a generation requirement such as image or video creation.
  2. It checks for available MCP tools specialized for the task to execute them directly.
  3. If specialized tools aren't present, it performs a semantic search on HuggingFace to find the best-performing Space.
  4. The skill initializes a Gradio client to connect to the selected Space or Inference Provider.
  5. Parameters like prompts, resolution, and seeds are passed to the model's API endpoint.
  6. The skill handles the resulting file paths or data streams, saving the output to the local environment.

HF Spaces Setup

To start using this capability within Openclaw Skills, initialize your environment and install the necessary dependencies:

uv init && uv add gradio_client huggingface_hub

For authenticated access to ZeroGPU or private models, verify your HuggingFace token:

python3 -c "from huggingface_hub import get_token; t = get_token(); print('HF token found' if t else 'NO TOKEN')"

Ensure the HF_TOKEN environment variable is set for seamless authentication during automated runs.

HF Spaces Data Schema & Taxonomy

The skill manages data primarily through API response objects and local file system paths. The typical structure includes:

Attribute Description
api_name The specific endpoint path, often /predict or /generate
client_id The unique identifier for the HuggingFace Space (e.g., owner/space-name)
result_dict A dictionary containing file paths and metadata for generated assets
output_path The local system path where the generated media is stored

HF Spaces Advanced Features

  • Support for chained workflows where the output of one Space serves as the input for another.
  • Direct integration with Inference Providers like fal-ai and Replicate for low-latency production needs.
  • Automatic parsing of OpenAPI specs for Gradio Spaces to discover hidden API capabilities.
  • Fine-grained authentication handling for ZeroGPU and enterprise-tier HuggingFace models.
  • Semantic search capabilities to dynamically find models based on natural language descriptions.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*