Skip to content

Hugging Face Hub CLI

Lets the agent run the hf command to download, upload and manage Hugging Face models, datasets and spaces

Stars
11,253
Licence
Apache-2.0
Files
1 file

What it does

Once installed, the agent knows how to use the official hf command-line tool for the Hugging Face Hub, a popular site for sharing AI models, datasets and demo apps. Instead of guessing commands, it can log you in, download or upload files, sync folders with storage buckets, manage the local cache, and organize collections or jobs, using the current hf syntax rather than the deprecated huggingface-cli. The skill is mostly a command reference that tells the agent which commands and options exist.

Great for

  • ML engineers and data scientists who move models and datasets to and from the Hugging Face Hub
  • Developers who want an agent to handle Hub logins, repos, and file transfers without memorizing CLI flags
  • Teams migrating scripts from the deprecated huggingface-cli to hf

Skip it if

  • People who do not use Hugging Face at all, since the skill only covers the Hub ecosystem
  • Anyone who wants the agent to upload to a public repo without review, because upload and delete commands can change or publish files on your account
  • Users without the hf CLI installed, who must first run the install script from the skill

Try asking

  • “Download only the safetensors files from a model repo into ./models using hf download”
  • “Sync my local checkpoints folder with a Hugging Face bucket, showing a dry run first”
  • “Show which Hugging Face account I'm logged in as and list my stored tokens”
  • “Create a private collection called Eval Results and add these model IDs to it”
Step-by-step guide: how to use Hugging Face Hub CLIInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the Apache-2.0 licence and an attribution note.

    hf-cli.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip hf-cli.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip hf-cli.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Run hf auth whoami and use --dry-run on uploads, deletes and syncs before making real changes
  • Keep tokens out of chat: use hf auth login in your own terminal rather than pasting a token into the conversation
  • Review the install script at hf.co/cli/install.sh before piping it to bash

What's inside

  • SKILL.md

Redistributed unmodified from huggingface/skills under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.