hugging-face-cli

hugging-face-cli is a skill for Claude Code, Codex from synthetic-sciences/openscience. It costs 68 tokens per session (1,929 once invoked), scanned A, a copy of hugging-face-cli, Apache-2.0.

A command-line tool for managing repositories on the Hugging Face Hub, a service that hosts AI models, datasets, and applications. It can also manage local caches and run jobs on Hugging Face infrastructure.

In plain words
What is it for?
Use it to download or upload files, create repositories, inspect models and datasets, manage cached files, and start compute jobs.
Why use it?
It lets you handle Hugging Face resources from a terminal instead of relying on separate manual steps.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to download or upload files, create repositories, inspect models and datasets, manage cached files, and start compute jobs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/synthetic-sciences/openscience/hugging-face-cli
About the project

synthetic-sciences/openscience is an AI workbench that carries out scientific research by reading papers, forming hypotheses, writing and running code, conducting experiments, analyzing results, and preparing reports. Researchers use it for work in machine learning, biology, physics, and chemistry with remote or local models. Catalogue add-ons extend its scientific workflows through skills and instructions.

synthetic-sciences/openscience · 3,518 stars · on GitHub · openscience.sh

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.

Any agent
npx skills add synthetic-sciences/openscience --skill hugging-face-cli
Clone the repo
git clone --depth 1 https://github.com/synthetic-sciences/openscience

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 hugging-face-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/synthetic-sciences/openscience/hugging-face-cli.svg)](https://agentmods.dev/skills/synthetic-sciences/openscience/hugging-face-cli)
Your own site
<a href="https://agentmods.dev/skills/synthetic-sciences/openscience/hugging-face-cli"><img src="https://agentmods.dev/badge/skills/synthetic-sciences/openscience/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,929 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 86% copy Near-identical to another mod 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.1 $0.00068 $0.01929
Opus 5 $0.00034 $0.00964
Sonnet 5 $0.00014 $0.00386
Haiku 4.5 $0.00007 $0.00193

Measured 5d ago against content hash 6755c7257869, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 5d 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

This is a copy

86% identical to hugging-face-cli — 390 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

backend/cli/skills/llm-tools/hugging-face-cli/SKILL.md · 205 lines

How it starts

The opening of the file, as written. The whole thing — 205 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

Credential Setup

HuggingFace token is auto-injected by openscience when connected via the dashboard.

# Verify credentials
[ -n "$HF_TOKEN" ] && echo "HF_TOKEN set" || echo "NOT SET"

If not set: add your Hugging Face token in Customize → Tools or export HF_TOKEN locally.

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

Read the full file on GitHub · 205 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. 5d ago First seen · 205 lines · 68 tokens per session scan A 6755c7257869

Subscribe to this mod's changes

hugging-face-cli is a skill published in the GitHub repository synthetic-sciences/openscience (3,518 stars, last pushed today), licensed Apache-2.0. It adds 68 tokens to every session and 1,929 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to hugging-face-cli, differing in 390 lines, and is treated as a copy.

Related

Other skills, from other repositories

huggingface-hub

HuggingFace hf CLI: search/download/upload models, datasets.

StarryCod/cogitum · 20 tokens

system-prompts

Write system prompts, tool docs, and agent definitions. Project tag conventions + RFC 2119 keywords + dense compression. Use when authoring or editing any prompt the model reads.

can1357/oh-my-pi · 40 tokens

tool-prompt-optimization

Optimize the description prompts an AI agent reads to learn its built-in tools (the .md files under prompts/tools/). Two halves: (1) measure how much of a prompt is already inferable from the tool's JSON parameter schema + name, to prune redundancy with evidence; (2) house authoring rules for what belongs in a tool…

can1357/oh-my-pi · 0 tokens

tmux-manual-qa

Run a single manual tmux-based QA scenario for the todo continuation feature against the real CLI (./pi-test.sh) in an interactive TUI. Captures scrollback, asserts deterministic pass/fail count markers, and cleans up test fixtures. Use only for the manual-qa milestone features.

code-yeongyu/senpi · 66 tokens

coding-agent-extension-worker

Implements a single feature in the pi-mono todotools builtin extension work. Use for refactoring, continuation runtime, config resolver, prompt builder, test authoring, golden snapshots, CHANGELOG entries, and harness helpers. Does NOT do manual tmux QA.

code-yeongyu/senpi · 61 tokens

gpt-image-gen

MUST read before generating images. Detailed prompt-crafting guide for gpt-image models, covering tool routing (native imagegeneration server tool vs the generateimage tool), prompt structure from subject to background, verbatim text rendering, anti-patterns, and the revisedprompt feedback loop for iteration.

code-yeongyu/senpi · 63 tokens