Hugging Face CLI Skill
Lets your AI assistant run Hugging Face Hub operations in the terminal — model downloads, uploads, repo management, cache cleanup, and cloud GPU jobs.
Documentation-only skill with no executable scripts; no covert exfiltration or credential theft. Authentication flows and the --add-to-git-credential side effect are disclosed; destructive commands (repo delete, repo-files delete, cache rm) default to confirmation and support --dry-run. Deducted for missing guidance that destructive operations require explicit user confirmation and no security notes on passing secrets (--secrets HF_TOKEN) to cloud jobs.
Command syntax is internally consistent and corroborated across SKILL.md and both reference files; failure feedback (HF_HUB_DOWNLOAD_TIMEOUT) mentioned. Deducted for: static review cannot execute; no hf CLI version pinning (newer CLI syntax unavailable on older huggingface_hub); no tests or CI evidence covering key paths.
Frontmatter description gives clear triggers (download/upload/repo creation/cache/compute); scope well bounded; three-layer docs aid semantic invocation. Deducted because core function depends entirely on huggingface.co and its cloud services (jobs, endpoints), which are poorly reachable from mainland-China networks with no mirror guidance; no Chinese support.
Good layered documentation (SKILL.md → commands.md → examples.md) with table of contents and quick-reference tables; MIT license clear. Deducted for missing install instructions and version requirements for the hf CLI (hidden dependency assumption), no versioning/changelog, no FAQ or known-limitations section, and only generic repository-level maintenance responsibility.
As an agent skill, the command reference is thorough with directly usable examples (CI/CD patterns, batch scripts), providing real marginal value for agent-driven HF Hub operations. Deducted for: static review cannot verify output correctness; heavy overlap with official docs limits marginal gain; no cost warning for billable operations (jobs/endpoints).
Content traceable to the official huggingface_hub CLI; examples use real repo IDs; facts and examples clearly separated. Deducted for absence of third-party execution evidence and no CI-plus-test coverage of this skill path; corroboration is limited to static comparison against the known command surface, capped at 5 statically.
- The skill depends entirely on huggingface.co and its cloud services (jobs/endpoints), which may be unreachable from mainland-China networks; plan proxy/mirror access accordingly.
- No hf CLI version is pinned; older huggingface_hub releases lack these commands (e.g., hf jobs, hf cache) — install a recent version.
- Includes irreversible commands (repo delete, repo-files delete) and billable operations (GPU jobs, inference endpoints); confirm each before agent execution.
- Exercise care when passing HF_TOKEN and other secrets to cloud jobs; all conclusions are from static reading, nothing was executed.
What does this skill do, and when should you use it?
This skill teaches an assistant to drive Hugging Face's official `hf` command-line tool, covering authentication, downloading and uploading models/datasets/Spaces, repository creation and tagging, local cache management, GPU jobs on HF infrastructure, and inference endpoint deployment. It is organized as a quick-reference table plus categorized command examples, with fuller command references in separate files. It suits developers who interact with the Hugging Face Hub frequently and want an assistant to handle those operations. The skill comes from the patchy631/ai-engineering-hub repository, which is MIT-licensed and bundles 10 skills.
Reads the user's intent about models, datasets, cache, or Hub repositories, then generates and runs hf CLI commands: hf auth login/whoami for authentication; hf download (with --local-dir, --include, --revision) to fetch models or datasets; hf upload (with --create-pr, --commit-message) to publish files; hf repo create/tag/branch/settings for repository management; hf cache ls/rm/prune/verify for local cache operations; hf models/datasets/spaces ls to browse the Hub; hf jobs run to submit CPU/GPU cloud jobs; and hf endpoints deploy/pause/scale-to-zero for inference endpoints.
- A deployment engineer needs to pull a model like meta-llama/Llama-3.2-1B-Instruct into a local directory for offline serving
- A researcher finishing training wants to create a private repo, upload weights, and tag a release version
- A developer whose disk is full of Hugging Face cache wants to list and remove specific cached repos or detached revisions
- An ML practitioner wants to run a script on HF cloud GPUs (e.g., a10g-small flavor) and fetch job logs
- A team needs to deploy, pause, or scale-to-zero an inference endpoint for a model
- A user wants to search trending models, datasets, or Spaces by keyword or task and get details
What are this skill's strengths and limitations?
- Comprehensive coverage: auth, download, upload, repo management, cache, Hub browsing, cloud jobs, and inference endpoints in one skill
- Quick-reference table structure helps the assistant pick correct commands and flags precisely
- Includes real workflow patterns like local-deployment downloads, publish-and-tag, and Space syncing
- MIT licensed, with dedicated reference files for deeper lookup
- Entirely dependent on the `hf` CLI being installed locally; SKILL.md contains no CLI installation steps
- Auth, upload, and delete operations need a valid Hugging Face account/token, and some are irreversible
- README installation and maintenance notes cover the whole 10-skill collection, not this skill individually; no test evidence is provided
- GPU jobs and inference endpoints consume HF cloud resources that may incur costs; the skill gives no pricing details
How do you install this skill?
The skill lives at hugging-face-skills/skills/hugging-face-cli/ inside the ai-engineering-hub monorepo. Copy the whole hugging-face-cli folder into your Agent Skills directory (e.g., ~/.claude/skills/hugging-face-cli/ for Claude Code). SKILL.md documents no dedicated install script or dependency setup; the prerequisite is having the Hugging Face hf CLI installed in your environment. The repo provides no skill-specific installation command.
How do you use this skill?
After installation, trigger it with natural language, e.g., "Download meta-llama/Llama-3.2-1B-Instruct to ./model" or "Create a private repo and upload the weights in ./output." The assistant selects the right hf command from the SKILL.md and executes it. Auth-gated operations require hf auth login first (interactive, or non-interactive with --token $HF_TOKEN). references/commands.md and references/examples.md hold fuller command and workflow documentation.