hf-cli
Skill by huggingface
Runs the Hugging Face Hub CLI (`hf`) to download, upload and manage models, datasets, spaces, buckets, repos, jobs and Inference Endpoints. Built for developers and ML teams who work on the Hugging Face Hub.
Install hf-cli
Built from the published package, never by AI.
git clone --depth 1 https://github.com/huggingface/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/hf-cli ~/.claude/skills/hf-cliRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/huggingface/skills /tmp/skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/skills/skills/hf-cli ~/.gemini/antigravity-cli/skills/hf-cliAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
hf-cli is an agent skill that tells an AI assistant how to use the `hf` command line tool from Hugging Face. The source says `hf` replaces the deprecated `huggingface-cli`. The skill covers downloading and uploading files, authentication, the local cache, buckets, repos, discussions and pull requests, collections, datasets, papers, jobs, webhooks and Inference Endpoints. It is generated with huggingface_hub v2.4.0 and installs with a curl script.
The skill is aimed at developers, researchers and ML teams who work with the Hugging Face Hub. It also covers cloud storage needs such as training checkpoints, data pipelines and agent traces. The source says it should be used even when the user does not ask for a CLI command. Most commands accept a format option with auto, human, agent, json or quiet output.
Written from the project's SKILL.md and checked against it.
What it can do
- hf downloadDownload files from the Hub with include and exclude filters, revisions and local directories.
- hf uploadUpload a file or folder to the Hub, with commit messages and an option to create a pull request.
- hf authLog in, log out, switch and list access tokens, and check which account is logged in.
- hf bucketsCreate, list, sync, move, remove and delete buckets, and change their visibility.
- hf cacheList, prune, remove and verify repositories stored in the local cache.
- hf discussionsList, create, comment on, merge, close and reopen discussions and pull requests.
- hf endpointsDeploy, list and delete Hugging Face Inference Endpoints, including from the Model Catalog.
- hf datasetsList datasets, read dataset cards, list parquet files and run raw SQL queries with DuckDB.
What you need
- A Hugging Face account and access token from huggingface.co/settings/tokens
- curl to run the install script
Try asking
- Download the config and weights for a model repo from the Hub
- Create a private bucket and sync my training checkpoints to it
- List open pull requests on my model repo and summarize them
Good to know
- Deleting an Inference Endpoint is permanent, according to the source.
- The command list is tied to huggingface_hub v2.4.0 and may change on regeneration.
Security check
C- Downloads a script from the internet and runs itIn
skills/hf-cli/SKILL.md:curl -LsSf https://hf.co/cli/install.sh | bash
Checked automatically: skills/hf-cli/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md33 KB
Alternatives to hf-cli
All alternatives →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
Compare with agent-reproduce-align, google_contacts or m06-error-handling
hf-cli: common questions
Does this replace huggingface-cli?
Yes. The source says the `hf` command replaces the deprecated `huggingface-cli` command.
Where are the authentication commands?
All auth commands now sit under `hf auth`, for example `hf auth whoami`.
Can it manage Hugging Face Buckets?
Yes. The source lists commands to create, list, sync, move, remove and delete buckets and to change their visibility.
How do I install hf-cli?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is hf-cli free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is hf-cli safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade C (downloads a script from the internet and runs it). Review the code before you install. How grades work.
What are alternatives to hf-cli?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
