Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Huggingface

ASecurity

Manage models, datasets, Spaces, and repositories using Hugging Face CLI (hf). Supports authentication, upload, download, Space creation, and more.

14 stars
0 votes
0 copies
2 views
Added 9/7/2026
businessgobashapidocumentation

Works with

cliapi

Security Analysis

A100/100

Scanned 9/7/2026

$npx -y skills add modbender/skill-library-mcp --skill huggingface --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Huggingface?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Huggingface
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-huggingface/badge)](https://www.skillsdirectory.com/skills/modbender-huggingface)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: huggingface
description: Manage models, datasets, Spaces, and repositories using Hugging Face CLI (hf). Supports authentication, upload, download, Space creation, and more.
metadata: {"openclaw":{"emoji":"🤗","requires":{"bins":["hf"],"env":["HF_TOKEN"]}}}
---

# Hugging Face CLI Skill

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

## Environment Variables

- `HF_TOKEN`: Hugging Face API Token (get from https://huggingface.co/settings/tokens)

## Core Features

### 1. Authentication Management (`hf auth`)

```bash
# 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`)

```bash
# 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`)

```bash
# 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`)

```bash
# 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`)

```bash
# 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`)

```bash
# 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`)

```bash
# 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`)

```bash
# 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
```bash
# 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
```bash
# 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
```bash
# 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

- [Hugging Face CLI Documentation](https://huggingface.co/docs/huggingface_hub/en/guides/cli)
- [Hugging Face Token Settings](https://huggingface.co/settings/tokens)
- [Hugging Face Spaces](https://huggingface.co/spaces)

Attribution

modbendermodbender
View sourceSee grades on GitHubMore from modbender →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Solution Architect

Designs system architecture, component specifications, and technical integration strategy. Use when: designing solutions, system architecture, technology stack, or integration approaches.

192 votes

Akorchak:Venture Assessment

Generate a comprehensive VC investment assessment report for a company

72 votes

Telegram Compose

Compose rich, readable Telegram messages using HTML formatting via direct Telegram API. Use when: (1) Sending any Telegram message beyond a simple one-line reply, (2) Creating structured messages with sections, lists, or status updates, (3) Need formatting unavailable via Clawdbot's Markdown conversion (underline, spoilers, expandable blockquotes, user mentions by ID), (4) Sending alerts, reports, summaries, or notifications to Telegram, (5) Want professional, scannable message formatting wit...

6511 votes

Just Fucking Cancel

Find and cancel unwanted subscriptions by analyzing bank transactions. Detects recurring charges, calculates annual waste, and helps you cancel with direct URLs and browser automation. Use when: 'cancel subscriptions', 'audit subscriptions', 'find recurring charges', 'what am I paying for', 'save money', 'subscription cleanup', 'stop wasting money'. Supports CSV import (Apple Card, Chase, Amex, Citi, Bank of America, Capital One, Mint, Copilot) OR Plaid API for automatic transaction pull. Out...

6511 votes

Stock Analysis

Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management (create, add, remove assets), crypto analysis (Top 20 by market cap), and periodic performance reports (daily/weekly/monthly/quarterly/yearly). 8 analysis dimensions for stocks, 3 for crypto. Use for stock analysis, portfolio tracking, earnings reactions, or crypto monitoring.

6511 votes
View all in business →