Agent skill

Hugging Face CLI

by agent-skills-hub in agent-skills-hub/agent-skills-hub

Execute Hugging Face Hub operations using the hf CLI. An agent skill from agent-skills-hub/agent-skills-hub.

MITAuto-check passedAI & LLM Engineering

Install Hugging Face CLI

skills CLI
$ npx skills add agent-skills-hub/agent-skills-hub --skill hugging-face-cli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install agent-skills-hub/agent-skills-hub hugging-face-cli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/agent-skills-hub/agent-skills-hub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/hugging-face-cli .claude/skills/hugging-face-cli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hugging-face-cli
GitHub stars
112
Used in
1 other repo
Token cost
~2k tokens
SKILL.md length
268 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

Execute Hugging Face Hub operations using the hf CLI. An agent skill from agent-skills-hub/agent-skills-hub.

  • The user needs to download models/datasets/spaces
  • SKILL.md covers When to Use This Skill, Quick Command Reference, Core Commands and Common Patterns, plus 2 more sections
  • Calls hf; needs HF_TOKEN
  • Upload files to Hub repositories

What it does

Hugging Face CLI is an agent skill from agent-skills-hub/agent-skills-hub. Execute Hugging Face Hub operations using the hf CLI. Use when the user needs to download models/datasets/spaces, upload files to Hub repositories, create repos, manage local cache, or run compute jobs on HF infrastructure. Covers authentication, file transfers, repository creation, cache operations, and cloud compute.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Model hubs and datasets. It works with Hugging Face. The repository describes itself as: Agent Skills Hub is a global library of AI agent skills that work across OpenClaw, Claude Code, Gemini, Cursor, Antigravity, and more. The licence is MIT.

When your agent uses it

  • The user needs to download models/datasets/spaces
  • Upload files to Hub repositories
  • Manage local cache
  • Run compute jobs on HF infrastructure

Example prompts

  • “/hugging-face-cli”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit efc0b96. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • hf

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • HF_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Hugging Face CLI loads about 2k tokens when it runs. Until then it costs about 85 tokens; SKILL.md has 268 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~85
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from agent-skills-hub/agent-skills-hub at commit efc0b96, republished under its MIT licence (© agent-skills-hub). 268 words, ~1,954 tokens.

Download SKILL.mdSave it as .claude/skills/hugging-face-cli/SKILL.md (or your agent's skills folder).
name
hugging-face-cli
description
Execute Hugging Face Hub operations using the `hf` CLI. Use when the user needs to download models/datasets/spaces, upload files to Hub repositories, create repos, manage local cache, or run compute jobs on HF infrastructure. Covers authentication, file transfers, repository creation, cache operations, and cloud compute.
source
https://github.com/huggingface/skills/tree/main/skills/hugging-face-cli
risk
safe

Hugging Face CLI

The hf CLI provides direct terminal access to the Hugging Face Hub for downloading, uploading, and managing repositories, cache, and compute resources.

When to Use This Skill

Use this skill when:

  • User needs to download models, datasets, or spaces
  • Uploading files to Hub repositories
  • Creating Hugging Face repositories
  • Managing local cache
  • Running compute jobs on HF infrastructure
  • Working with Hugging Face Hub authentication

Quick Command Reference

TaskCommand
Loginhf auth login
Download modelhf download <repo_id>
Download to folderhf download <repo_id> --local-dir ./path
Upload folderhf upload <repo_id> . .
Create repohf repo create <name>
Create taghf repo tag create <repo_id> <tag>
Delete fileshf repo-files delete <repo_id> <files>
List cachehf cache ls
Remove from cachehf cache rm <repo_or_revision>
List modelshf models ls
Get model infohf models info <model_id>
List datasetshf datasets ls
Get dataset infohf datasets info <dataset_id>
List spaceshf spaces ls
Get space infohf spaces info <space_id>
List endpointshf endpoints ls
Run GPU jobhf jobs run --flavor a10g-small <image> <cmd>
Environment infohf env

Core Commands

Authentication
bash
hf auth login                    # Interactive login
hf auth login --token $HF_TOKEN  # Non-interactive
hf auth whoami                   # Check current user
hf auth list                     # List stored tokens
hf auth switch                   # Switch between tokens
hf auth logout                   # Log out
Download
bash
hf download <repo_id>                              # Full repo to cache
hf download <repo_id> file.safetensors             # Specific file
hf download <repo_id> --local-dir ./models         # To local directory
hf download <repo_id> --include "*.safetensors"    # Filter by pattern
hf download <repo_id> --repo-type dataset          # Dataset
hf download <repo_id> --revision v1.0              # Specific version
Upload
bash
hf upload <repo_id> . .                            # Current dir to root
hf upload <repo_id> ./models /weights              # Folder to path
hf upload <repo_id> model.safetensors              # Single file
hf upload <repo_id> . . --repo-type dataset        # Dataset
hf upload <repo_id> . . --create-pr                # Create PR
hf upload <repo_id> . . --commit-message="msg"     # Custom message
Repository Management
bash
hf repo create <name>                              # Create model repo
hf repo create <name> --repo-type dataset          # Create dataset
hf repo create <name> --private                    # Private repo
hf repo create <name> --repo-type space --space_sdk gradio  # Gradio space
hf repo delete <repo_id>                           # Delete repo
hf repo move <from_id> <to_id>                     # Move repo to new namespace
hf repo settings <repo_id> --private true          # Update repo settings
hf repo list --repo-type model                     # List repos
hf repo branch create <repo_id> release-v1         # Create branch
hf repo branch delete <repo_id> release-v1         # Delete branch
hf repo tag create <repo_id> v1.0                  # Create tag
hf repo tag list <repo_id>                         # List tags
hf repo tag delete <repo_id> v1.0                  # Delete tag
Delete Files from Repo
bash
hf repo-files delete <repo_id> folder/             # Delete folder
hf repo-files delete <repo_id> "*.txt"             # Delete with pattern
Cache Management
bash
hf cache ls                      # List cached repos
hf cache ls --revisions          # Include individual revisions
hf cache rm model/gpt2           # Remove cached repo
hf cache rm <revision_hash>      # Remove cached revision
hf cache prune                   # Remove detached revisions
hf cache verify gpt2             # Verify checksums from cache
Browse Hub
bash
# Models
hf models ls                                        # List top trending models
hf models ls --search "MiniMax" --author MiniMaxAI  # Search models
hf models ls --filter "text-generation" --limit 20  # Filter by task
hf models info MiniMaxAI/MiniMax-M2.1               # Get model info

# Datasets
hf datasets ls                                      # List top trending datasets
hf datasets ls --search "finepdfs" --sort downloads # Search datasets
hf datasets info HuggingFaceFW/finepdfs             # Get dataset info

# Spaces
hf spaces ls                                        # List top trending spaces
hf spaces ls --filter "3d" --limit 10               # Filter by 3D modeling spaces
hf spaces info enzostvs/deepsite                    # Get space info
Jobs (Cloud Compute)
bash
hf jobs run python:3.12 python script.py           # Run on CPU
hf jobs run --flavor a10g-small <image> <cmd>      # Run on GPU
hf jobs run --secrets HF_TOKEN <image> <cmd>       # With HF token
hf jobs ps                                         # List jobs
hf jobs logs <job_id>                              # View logs
hf jobs cancel <job_id>                            # Cancel job
Inference Endpoints
bash
hf endpoints ls                                     # List endpoints
hf endpoints deploy my-endpoint \
  --repo openai/gpt-oss-120b \
  --framework vllm \
  --accelerator gpu \
  --instance-size x4 \
  --instance-type nvidia-a10g \
  --region us-east-1 \
  --vendor aws
hf endpoints describe my-endpoint                   # Show endpoint details
hf endpoints pause my-endpoint                      # Pause endpoint
hf endpoints resume my-endpoint                     # Resume endpoint
hf endpoints scale-to-zero my-endpoint              # Scale to zero
hf endpoints delete my-endpoint --yes               # Delete endpoint

GPU Flavors: cpu-basic, cpu-upgrade, cpu-xl, t4-small, t4-medium, l4x1, l4x4, l40sx1, l40sx4, l40sx8, a10g-small, a10g-large, a10g-largex2, a10g-largex4, a100-large, h100, h100x8

Common Patterns

Download and Use Model Locally
bash
# Download to local directory for deployment
hf download meta-llama/Llama-3.2-1B-Instruct --local-dir ./model

# Or use cache and get path
MODEL_PATH=$(hf download meta-llama/Llama-3.2-1B-Instruct --quiet)
Publish Model/Dataset
bash
hf repo create my-username/my-model --private
hf upload my-username/my-model ./output . --commit-message="Initial release"
hf repo tag create my-username/my-model v1.0
Sync Space with Local
bash
hf upload my-username/my-space . . --repo-type space \
  --exclude="logs/*" --delete="*" --commit-message="Sync"
Check Cache Usage
bash
hf cache ls                      # See all cached repos and sizes
hf cache rm model/gpt2           # Remove a repo from cache

Key Options

  • --repo-type: model (default), dataset, space
  • --revision: Branch, tag, or commit hash
  • --token: Override authentication
  • --quiet: Output only essential info (paths/URLs)

References

© agent-skills-hub, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/hugging-face-cli of agent-skills-hub/agent-skills-hub.

Open the folder on GitHubat commit efc0b96

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in agent-skills-hub/agent-skills-hub, which our catalogue first saw on October 9, 2026.

Compare with similar skills

Hugging Face CLI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Hugging Face CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hugging Face CLI this skillagent-skills-hub/agent-skills-hub1121 repos~2kAutomated safety check: PassMIT
LLM Benchmarking with lm-evaluation-harnessOrchestra-Research/AI-Research-SKILLs13k8 repos~3kAutomated safety check: PassMIT
SageMaker Serving Image Selectionhuggingface/skills11k1 repos~4.6kAutomated safety check: PassApache-2.0
Hugging Face Local Model Evalshuggingface/skills11k2 repos~1.6kAutomated safety check: PassApache-2.0
Upload Post Imagehuggingface/blog3.5k—~1.1kAutomated safety check: PassNone
Esmfold2JimLiu/science-skills2284 repos~2.5kAutomated safety check: PassApache-2.0

Similar skills

  • LLM Benchmarking with lm-evaluation-harness

    Orchestra-Research/AI-Research-SKILLs

    Runs lm-evaluation-harness to benchmark language models on academic suites such as MMLU, GSM8K and HumanEval, compare models and track training checkpoints.

    13k GitHub starsUsed in 8 repos~3k tokens
    AI & LLM EngineeringAuto-check passed
  • Official

    Chooses the right serving container and current image URI for deploying a Hugging Face model to a SageMaker endpoint, preferring Hugging Face images over generic ones.

    11k GitHub starsUsed in 1 repo~4.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Official

    Runs evaluations of Hugging Face Hub models on local hardware with inspect-ai or lighteval, and helps choose between vLLM, Transformers and accelerate backends.

    11k GitHub starsUsed in 2 repos~1.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Upload Post Image

    huggingface/blog

    Official

    A skill your agent uses when adding or migrating non-thumbnail images for a Hugging Face Blog post.

    3.5k GitHub stars~1.1k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Esmfold2

    JimLiu/science-skills

    Biohub ESMFold2 / ESMFold2-Fast all-atom co-folding (Candido et al.

    228 GitHub starsUsed in 4 repos~2.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Add Archon Model

    areal-project/AReaL

    Guide for adding a new model to the Archon engine. An agent skill from areal-project/AReaL.

    5.8k GitHub stars~4.9k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from agent-skills-hub/agent-skills-hub

All 19 skills in this repo
  • Open Notebook

    agent-skills-hub/agent-skills-hub

    Drives a self-hosted Open Notebook instance to organize sources into notebooks, chat with documents, generate notes and multi-speaker podcasts, and search across material.

    112 GitHub starsUsed in 3 repos~2.6k tokens
    Auto-check passed
  • Timesfm Forecasting

    agent-skills-hub/agent-skills-hub

    Zero-shot time series forecasting with Google's TimesFM foundation model.

    112 GitHub starsUsed in 1 repo~7.8k tokens
    Auto-check: notes
  • Pyzotero

    agent-skills-hub/agent-skills-hub

    Interact with Zotero reference management libraries using the pyzotero Python client.

    112 GitHub starsUsed in 4 repos~1.1k tokens
    Auto-check: notes
  • Alpha Vantage

    agent-skills-hub/agent-skills-hub

    Access real-time and historical stock market data, forex rates, cryptocurrency prices, commodities, economic indicators, and 50+ technical indicators via the Alpha Vantage API.

    112 GitHub starsUsed in 2 repos~1.6k tokens
    Auto-check passed
  • Build Sdf Liquid Glass

    agent-skills-hub/agent-skills-hub

    Build lightweight SDF/canvas displacement glass with Vaso. An agent skill from agent-skills-hub/agent-skills-hub.

    112 GitHub stars~674 tokensUpdated 8 days ago
    Auto-check passed
  • Edgartools

    agent-skills-hub/agent-skills-hub

    Python library for accessing, analyzing, and extracting data from SEC EDGAR filings.

    112 GitHub starsUsed in 2 repos~1.4k tokens
    Auto-check passed

Works with

Questions about Hugging Face CLI

What does Hugging Face CLI do?

Execute Hugging Face Hub operations using the hf CLI. An agent skill from agent-skills-hub/agent-skills-hub. Hugging Face CLI is an agent skill from agent-skills-hub/agent-skills-hub. Execute Hugging Face Hub operations using the hf CLI.

When should I use Hugging Face CLI?

Hugging Face CLI fits situations like: the user needs to download models/datasets/spaces; upload files to Hub repositories; manage local cache; run compute jobs on HF infrastructure.

How do I install Hugging Face CLI in Claude Code?

Run `npx skills add agent-skills-hub/agent-skills-hub --skill hugging-face-cli -a claude-code`. Or copy the skill folder (skills/hugging-face-cli in agent-skills-hub/agent-skills-hub) into .claude/skills/hugging-face-cli in your project. Claude Code loads it when a task matches its description.

How do I install Hugging Face CLI in Codex?

Run `npx skills add agent-skills-hub/agent-skills-hub --skill hugging-face-cli -a codex`. Or copy the skill folder (skills/hugging-face-cli in agent-skills-hub/agent-skills-hub) into .agents/skills/hugging-face-cli in your project. Codex loads it when a task matches its description.

Can I use Hugging Face CLI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add agent-skills-hub/agent-skills-hub --skill hugging-face-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hugging-face-cli, .gemini/skills/hugging-face-cli, .github/skills/hugging-face-cli and .opencode/skills/hugging-face-cli in your project.

What does Hugging Face CLI need to run?

Going by SKILL.md and its folder, Hugging Face CLI needs the command-line tools its instructions call (hf) and credentials named HF_TOKEN. Our summary lists: Python 3.

Does Hugging Face CLI access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Hugging Face CLI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Hugging Face CLI use?

Hugging Face CLI is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hugging Face CLI use?

About 2k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Hugging Face CLI?

Skills that share tags, products or a category with Hugging Face CLI: LLM Benchmarking with lm-evaluation-harness (Orchestra-Research/AI-Research-SKILLs, 13k stars), SageMaker Serving Image Selection (huggingface/skills, 11k stars), Hugging Face Local Model Evals (huggingface/skills, 11k stars) and Upload Post Image (huggingface/blog, 3.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hugging Face CLI?

agent-skills-hub (a GitHub organization) maintains it in agent-skills-hub/agent-skills-hub, which has 112 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 2, 2026.

Source: agent-skills-hub/agent-skills-hub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.