hugging-face-cli

hugging-face-cli is a skill for Claude Code, Codex from patchy631/ai-engineering-hub. It costs 68 tokens per session (1,809 once invoked), scanned A, original, MIT.

A command-line guide for Hugging Face Hub, a service for sharing machine-learning models, datasets, and apps. It covers downloading, uploading, repository management, and cloud jobs.

In plain words
What is it for?
Use it to sign in, download or upload repositories, create repositories and tags, manage the local cache, inspect Hub resources, and run GPU jobs.
Why use it?
It provides the commands needed to manage Hugging Face files and compute from a terminal.

Skill for Claude CodeCodex

Part of the hugging-face-skills plugin — 8 skills, 1 agent, 1 plugin shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/patchy631/ai-engineering-hub/hugging-face-cli
Any agent
npx skills add patchy631/ai-engineering-hub --skill hugging-face-cli
Clone the repo
git clone --depth 1 https://github.com/patchy631/ai-engineering-hub

Made for: Claude Code, Codex.

Or install hugging-face-skills, the plugin that ships this one along with the rest of its 8 skills, 1 agent, 1 plugin.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hugging-face-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/patchy631/ai-engineering-hub/hugging-face-cli.svg)](https://agentmods.dev/skills/patchy631/ai-engineering-hub/hugging-face-cli)
Your own site
<a href="https://agentmods.dev/skills/patchy631/ai-engineering-hub/hugging-face-cli"><img src="https://agentmods.dev/badge/skills/patchy631/ai-engineering-hub/hugging-face-cli.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,809 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00068 $0.01809
Opus 5 $0.00034 $0.00905
Sonnet 5 $0.00014 $0.00362
Haiku 4.5 $0.00007 $0.00181

Measured 3d ago against content hash 0ee5649dc4db, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hugging-face-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

hugging-face-skills/skills/hugging-face-cli/SKILL.md · 187 lines

How it starts

The opening of the file, as written. The whole thing — 187 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Quick Command Reference

Task Command
Login hf auth login
Download model hf download <repo_id>
Download to folder hf download <repo_id> --local-dir ./path
Upload folder hf upload <repo_id> . .
Create repo hf repo create <name>
Create tag hf repo tag create <repo_id> <tag>
Delete files hf repo-files delete <repo_id> <files>
List cache hf cache ls
Remove from cache hf cache rm <repo_or_revision>
List models hf models ls
Get model info hf models info <model_id>
List datasets hf datasets ls
Get dataset info hf datasets info <dataset_id>
List spaces hf spaces ls
Get space info hf spaces info <space_id>
List endpoints hf endpoints ls
Run GPU job hf jobs run --flavor a10g-small <image> <cmd>
Environment info hf env

Core Commands

Authentication

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

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

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

Read the full file on GitHub · 187 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 187 lines · 68 tokens per session scan A 0ee5649dc4db

Subscribe to this mod's changes

hugging-face-cli is a skill published in the GitHub repository patchy631/ai-engineering-hub (37,278 stars, last pushed 7d ago), licensed MIT. It adds 68 tokens to every session and 1,809 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

dstack-prototyping

Use with the dstack skill for model-serving work when the image, serving command, resources, backend/fleet choice, or service behavior is not proven. Guides task-first prototyping on real hardware, choosing fleets/backends that can reuse idle instances and caches, checking vLLM/SGLang sources, and verifying the final…

dstackai/dstack · 80 tokens

autocontext-creator

Use when an agent needs to CREATE knowledge with Autocontext - run a scenario or plain-language task through the improvement loop, judge or improve a single output, and inspect what the run produced. Host-agnostic; requires only the autoctx CLI.

greyhaven-ai/autocontext · 57 tokens

dstack-presets

Create and manage dstack presets: a toolkit that streamlines model inference optimization with agents, and a portable preset format. Use together with the dstack skill, and only when the user explicitly asks to create a preset or manage existing presets, not for deploying or serving a model.

dstackai/dstack · 61 tokens

langchain-dev-guide

LangChain / LangGraph engineering pitfalls and verified fixes. Covers DeepAgents, structured output, OpenAI-compatible model integration (including Chinese provider adapters: DeepSeek, Qwen, GLM, etc.), middleware, streaming, multi-agent orchestration, and other common development issues. Use when hitting unexpected…

ob-labs/agentseek · 81 tokens

guardrails-developer-create-guardrails

Helps developers create a NeMo Guardrails configuration for an LLM application. Use when users want to build, scaffold, configure, test, or iterate on input, output, retrieval, dialog, execution, Colang, or catalog-based guardrails. Trigger keywords - create guardrails, build guardrails, scaffold config, write rails…

NVIDIA-NeMo/Guardrails · 101 tokens

guardrails-developer-guide

Routes NVIDIA NeMo Guardrails library product-usage questions to the canonical documentation. Use when users ask how to install, configure, integrate, evaluate, observe, deploy, troubleshoot, or use the NVIDIA NeMo Guardrails library. Trigger keywords - install guardrails, configure rails, guardrail catalog, Colang…

NVIDIA-NeMo/Guardrails · 92 tokens