← 返回 Skills 市场
tsukisama9292

Huggingface

作者 Xuan-You Lin · GitHub ↗ · v1.0.2
cross-platform ✓ 安全检测通过
881
总下载
1
收藏
12
当前安装
3
版本数
在 OpenClaw 中安装
/install huggingface
功能描述
Manage models, datasets, Spaces, and repositories using Hugging Face CLI (hf). Supports authentication, upload, download, Space creation, and more.
使用说明 (SKILL.md)

Hugging Face CLI Skill

Use Hugging Face Hub CLI (hf) for various operations.

Environment Variables

Core Features

1. Authentication Management (hf auth)

# Check login status
hf auth whoami

# List all tokens
hf auth list

# Login
hf auth login

# Logout
hf auth logout

# Switch token
hf auth switch

2. Model Management (hf models)

# List models (supports sorting and filtering)
hf models ls --sort downloads --limit 10
hf models ls --search "llama"

# Get model info
hf models info meta-llama/Llama-3.2-1B-Instruct

3. Dataset Management (hf datasets)

# List datasets
hf datasets ls --limit 10
hf datasets ls --search "imagenet"

# Get dataset info
hf datasets info HuggingFaceFW/fineweb

4. Spaces Management (hf spaces)

# List Spaces
hf spaces ls --limit 10

# Get Space info
hf spaces info username/repo-name

# Hot-reload (experimental, for Gradio 6.1+)
hf spaces hot-reload username/repo-name app.py
hf spaces hot-reload username/repo-name -f ./local/app.py

5. Repository Management (hf repos)

# Create new repository
hf repos create my-model --type model
hf repos create my-dataset --type dataset
hf repos create my-space --type space

# Delete repository
hf repos delete username/repo-name

# Set as private
hf repos settings username/repo-name --private

# Manage branches
hf repos branch create username/repo-name feature-branch
hf repos branch delete username/repo-name feature-branch

# Manage tags
hf repos tag create username/repo-name v1.0
hf repos tag delete username/repo-name v1.0

# Move repository to another namespace
hf repos move old-namespace/my-model new-namespace/my-model

6. Download Files (hf download)

# Download entire model
hf download meta-llama/Llama-3.2-1B-Instruct

# Download specific files
hf download meta-llama/Llama-3.2-1B-Instruct config.json tokenizer.json

# Download with glob patterns
hf download meta-llama/Llama-3.2-1B-Instruct --include "*.safetensors"
hf download meta-llama/Llama-3.2-1B-Instruct --include "*.json" --exclude "*.bin"

# Download to local directory
hf download meta-llama/Llama-3.2-1B-Instruct --local-dir ./models/llama

# Download dataset
hf download HuggingFaceM4/FineVision --repo-type dataset

7. Upload Files (hf upload)

# Upload entire directory
hf upload my-cool-model . .

# Upload single file
hf upload username/my-model ./models/model.safetensors

# Upload to dataset
hf upload username/my-dataset ./data /train --repo-type dataset

# With commit message
hf upload username/my-model ./models . --commit-message="Epoch 34/50" --commit-description="Val accuracy: 68%"

# Create Pull Request
hf upload bigcode/the-stack . . --repo-type dataset --create-pr

# Create private repository
hf upload username/my-private-model . . --private

8. Collection Management (hf collections)

# Create collection
hf collections create "My Models"

# Add item to collection
hf collections add-item username/my-collection moonshotai/kimi-k2 model

# List collections
hf collections ls

# Get collection info
hf collections info username/my-collection

# Update collection
hf collections update username/my-collection --title "New Title"

# Update collection item
hf collections update-item username/my-collection ITEM_OBJECT_ID --note "Updated note"

# Delete item
hf collections delete-item username/my-collection ITEM_OBJECT_ID

# Delete collection
hf collections delete username/my-collection

Usage Examples

Example 1: Download and Upload Model

# Download model
hf download meta-llama/Llama-3.2-1B-Instruct --local-dir ./llama-model

# Upload to your repository
hf upload username/my-llama ./llama-model .

Example 2: Manage Space

# Create Space
hf repos create my-app --type space

# Upload code
hf upload username/my-app ./app.py

# Hot-reload for development
hf spaces hot-reload username/my-app app.py

Example 3: Batch Operations

# Download all safetensors files
hf download meta-llama/Llama-3.2-1B-Instruct --include "*.safetensors"

# Upload and create PR
hf upload username/model . . --create-pr --commit-message="Update model"

Notes

  1. Token Management: Ensure HF_TOKEN environment variable is set, or use --token parameter
  2. Large File Upload: For large folders, consider using hf upload-large-folder
  3. Space Hot-Reload: Only works with Gradio 6.1+, experimental feature
  4. Free Space Limits:
    • Free fixed vCPU: 2
    • RAM: 16GB
    • No persistent storage (use external storage or HF Datasets)

Resources

安全使用建议
This skill is an instruction-only helper for the official Hugging Face CLI and appears coherent. Before installing or using it: ensure the 'hf' binary on your system is the official CLI (installed from Hugging Face docs or a trusted package manager), do not paste a high-privilege HF_TOKEN into shared environments, prefer a scoped/minimal token for automation, and be careful with destructive commands (hf repos delete, hf repos move, hf upload with overwrite) since they operate on your account. Because the skill contains no code, the security depends on the installed 'hf' binary and the token you provide—verify those before use.
功能分析
Type: OpenClaw Skill Name: huggingface Version: 1.0.2 The OpenClaw AgentSkills skill bundle for Hugging Face CLI (hf) is benign. It clearly defines its purpose as managing Hugging Face resources using the official `hf` command-line tool. The `SKILL.md` documentation accurately describes standard `hf` commands for authentication, model/dataset/space management, and file upload/download. It correctly declares dependencies on the `hf` binary and the `HF_TOKEN` environment variable. There is no evidence of prompt injection attempts, malicious command execution (e.g., `curl|bash`), unauthorized data exfiltration, persistence mechanisms, or obfuscation. All demonstrated actions are legitimate operations for interacting with Hugging Face Hub.
能力评估
Purpose & Capability
Name/description match the requirements: it needs the 'hf' CLI and HF_TOKEN to manage models, datasets, Spaces, and repos. Requesting the Hugging Face token and the hf binary is expected for this functionality.
Instruction Scope
SKILL.md only contains hf CLI commands and examples for uploading/downloading/managing repos, Spaces, collections, and tokens. It does not instruct the agent to read unrelated system files, other env vars, or to contact endpoints outside Hugging Face.
Install Mechanism
No install spec and no code files — the skill is instruction-only, which minimizes on-disk execution risk. It assumes the hf CLI is already installed by the user/environment.
Credentials
The only required environment variable is HF_TOKEN, which is appropriate for a CLI that authenticates to Hugging Face. Note: HF_TOKEN is sensitive (it can grant access to your account); using a least-privilege token or a separate token for automation is recommended.
Persistence & Privilege
The skill is not always-enabled and uses default invocation settings. It does not request persistent installation or modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install huggingface
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /huggingface 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
- Updated internal metadata in _meta.json. - No user-facing or functional changes.
v1.0.1
- Maintenance release with no user-facing feature or documentation changes - Updated metadata in _meta.json; no impact on skill usage or behavior
v1.0.0
- Initial release of Hugging Face CLI skill. - Manage models, datasets, Spaces, and repositories via the `hf` command-line interface. - Supports authentication, uploads, downloads, repository and collection management, and Space hot-reloading. - Requires `hf` binary and `HF_TOKEN` environment variable.
元数据
Slug huggingface
版本 1.0.2
许可证
累计安装 12
当前安装数 12
历史版本数 3
常见问题

Huggingface 是什么?

Manage models, datasets, Spaces, and repositories using Hugging Face CLI (hf). Supports authentication, upload, download, Space creation, and more. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 881 次。

如何安装 Huggingface?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install huggingface」即可一键安装,无需额外配置。

Huggingface 是免费的吗?

是的,Huggingface 完全免费(开源免费),可自由下载、安装和使用。

Huggingface 支持哪些平台?

Huggingface 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Huggingface?

由 Xuan-You Lin(@tsukisama9292)开发并维护,当前版本 v1.0.2。

💬 留言讨论