技能 hugging-face-cli
🤗

hugging-face-cli

安全 ⚙️ 外部命令🌐 网络访问

Управление Hugging Face Hub из терминала

Работа с моделями ИИ и наборами данных на Hugging Face Hub требует использования множества инструментов и ручных действий. Этот навык оптимизирует рабочий процесс, обеспечивая прямой доступ через CLI для загрузки, выгрузки и управления ресурсами машинного обучения с помощью унифицированных команд.

支持: Claude Codex Code(CC)
📊 71 充足
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“hugging-face-cli”。 Download a model to local directory

预期结果:

Model meta-llama/Llama-3.2-1B-Instruct downloaded successfully to ./models directory. Total size: 2.1 GB across 15 files.

正在使用“hugging-face-cli”。 List cached repositories

预期结果:

Cached repositories: gpt2 (1.2 GB), bert-base-uncased (440 MB), t5-base (890 MB). Total cache usage: 2.53 GB.

安全审计

安全
v1 • 2/25/2026

Static analysis detected 76 patterns in documentation content, but all are false positives. The skill file is markdown documentation showing usage examples for the official Hugging Face hf CLI tool, not executable code. No actual security risks exist - external command patterns are CLI documentation examples, network references are URLs in documentation, and cryptographic warnings do not match any actual crypto implementations.

1
已扫描文件
199
分析行数
2
发现项
1
审计总数

风险因素

⚙️ 外部命令 (3)
🌐 网络访问 (1)
审计者: claude

质量评分

38
架构
100
可维护性
87
内容
32
社区
100
安全
91
规范符合性

你能构建什么

Развертывание моделей ML-инженером

Загрузка предварительно обученных моделей из Hugging Face Hub для локального развертывания и обслуживания вывода.

Управление наборами данных исследователя

Загрузка экспериментальных наборов данных в частные репозитории и совместное использование с коллегами через версионные релизы.

Оптимизация кэша разработчика

Управление локальным кэшем моделей для оптимизации хранилища и быстрого доступа к часто используемым моделям для разработки.

试试这些提示

Загрузка модели
Download the model meta-llama/Llama-3.2-1B-Instruct to my local models directory.
Загрузка файлов в Hub
Upload my trained model from the ./output folder to my Hugging Face repository with the commit message 'Initial model release'.
Поиск наборов данных
Find datasets related to text classification with high download counts and show me their details.
Управление кэшем и запуск вычислительной задачи
Check my current cache usage, remove unused models, then run a GPU job to process my dataset using the specified image and command.

最佳实践

  • Always use the --quiet flag when you only need the download path for scripting purposes
  • Create private repositories for sensitive models and datasets before uploading proprietary content
  • Use commit messages that clearly describe changes when uploading model updates
  • Regularly prune detached cache revisions to free up disk space

避免

  • Do not upload files containing API keys, credentials, or sensitive configuration data to public repositories
  • Avoid downloading entire large models without checking available disk space first
  • Do not share your HF_TOKEN in command history or commit messages
  • Avoid running compute jobs without estimating costs using the --flavor option

常见问题

Как выполнить аутентификацию в Hugging Face Hub?
Run hf auth login for interactive authentication, or use hf auth login --token YOUR_TOKEN for non-interactive login with a personal access token from your Hugging Face account settings.
Где хранятся загруженные модели?
Models are stored in the Hugging Face cache directory by default. Use the --local-dir option to specify a custom download location, or run hf cache ls to see cached items.
Можно ли загружать файлы в репозиторий другого пользователя?
You can only upload to repositories you own or have write access to. For contributing to other projects, use the --create-pr flag to submit a pull request instead.
Как управлять большими файлами моделей?
Use the --include flag to download only specific file types like *.safetensors. For uploads, consider using Git LFS which the hf CLI handles automatically for large files.
Какие опции GPU доступны для вычислительных задач?
Available flavors range from CPU-basic to H100 GPUs. Use --flavor with values like t4-small, l4x1, a10g-small, or a100-large depending on your compute requirements and budget.
Как проверить статус аутентификации?
Run hf auth whoami to see your current logged-in user, or hf auth list to see all stored authentication tokens on your system.

开发者详情

文件结构

📄 SKILL.md