hf

hf is a skill for Claude Code, Codex from fmind/dot. It costs 42 tokens per session (783 once invoked), scanned A, original, MIT.

A command-line tool for working with Hugging Face Hub models, datasets, and Spaces, including downloads, uploads, caching, and jobs.

In plain words
What is it for?
Use it to inspect repositories, download models or datasets, manage cached files, create repositories, upload files, and run Hugging Face jobs.
Why use it?
It keeps Hub operations, authentication, and local cache management in one terminal workflow, while adding checks around uploads and paid jobs.

Skill for Claude CodeCodex

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/fmind/dot/hf
Any agent
npx skills add fmind/dot --skill hf
Clone the repo
git clone --depth 1 https://github.com/fmind/dot

Made for: Claude Code, Codex.

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 hf

README.md
[![agentmods](https://agentmods.dev/badge/skills/fmind/dot/hf.svg)](https://agentmods.dev/skills/fmind/dot/hf)
Your own site
<a href="https://agentmods.dev/skills/fmind/dot/hf"><img src="https://agentmods.dev/badge/skills/fmind/dot/hf.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 783 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.00042 $0.00783
Opus 5 $0.00021 $0.00392
Sonnet 5 $0.00008 $0.00157
Haiku 4.5 $0.00004 $0.00078

Measured yesterday against content hash 8b6bae80f690, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hf 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 yesterday.

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.

skills/hf/SKILL.md · 52 lines

How it starts

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

Hugging Face CLI

Use hf for Hub operations from the shell. The CLI generates its own command skill from the installed version; this skill owns authentication, cache hygiene, and the authority boundary around uploads and paid jobs.

Workflow

  1. Resolve the account: hf auth whoami; log in with hf auth login or pass HF_TOKEN through the environment. Never run hf auth token in a transcript or log.

  2. Read before writing: hf models info <repo-id>, hf models card <repo-id>, hf models ls --sort downloads --limit 10, and the datasets and spaces twins answer most questions without a download.

  3. Download into an ignored directory: gated repositories need the license accepted on the website first.

    hf download <repo-id> --local-dir models/<name>
    hf download <owner>/<dataset> --repo-type dataset --local-dir data/<name>
    
  4. Keep the cache under control: hf cache ls, hf cache prune, hf cache rm <repo-id>; HF_HOME relocates it (see reclaim-disk).

  5. Upload with authority: hf repos create <repo-id> --private then hf upload <repo-id> <local-path>; confirm repository, visibility, and license before the first push, then verify with hf models info or hf repos ls.

  6. Remote compute with authority: hf jobs run and hf jobs uv run bill by hardware flavor; confirm the flavor and timeout, then watch hf jobs logs and hf jobs ps.

Gotchas

  • Name: hf replaced huggingface-cli; the mise tool is pipx:huggingface_hub.
  • Large transfers: hf download and hf upload resume; hf cache verify checks checksums after an interrupted run.
  • Pin a revision: pass --revision <sha> for reproducible downloads; anything loaded with trust_remote_code is third-party code to review first.

Official Skills

Upstream: huggingface/skills, the same packages the CLI marketplace serves. hf skills add writes the CLI's own skill and hf skills list shows the marketplace; install at project scope (never -g) after reviewing the snapshot (see agent-skills):

Read the full file on GitHub · 52 lines

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. yesterday First seen · 52 lines · 42 tokens per session scan A 8b6bae80f690

Subscribe to this mod's changes

hf is a skill published in the GitHub repository fmind/dot (4 stars, last pushed yesterday), licensed MIT. It adds 42 tokens to every session and 783 once invoked, about $0.0002 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-09-03.