1. Overview
The official Hugging Face pages by default mainly display "downloads over the past 30 days". This skill uses underlying API extension parameters to allow large language models to retrieve, for any public model or dataset, theall-time total downloads (downloadsAllTime), as well as to retrieve a Space's running hardware, number of likes, and status, and to aggregate and query data for all models under an organization.
This skill provides a reliable Bash script (hf_stats.sh), with built-in error handling, timeout mechanisms, and number formatting.
2. Core Capabilities & Usage
This skill provides a ready-to-use Bash script hf_stats.sh. When you need to query Hugging Face data,you mustcall this script directly.
Script path
<path_to_skill>/hf_stats.sh
Scenario A: Query a model or dataset (Model / Dataset)
When you need to query detailed download data for a model or dataset:
# 查询模型
<path_to_skill>/hf_stats.sh model <repo_id>
# 查询数据集
<path_to_skill>/hf_stats.sh dataset <repo_id>
Returned data includes: repo ID, author, creation time, downloads over the last 30 days, all-time total downloads, and number of likes.
Scenario B: Query a Space (Space)
When you need to learn about a Space's popularity and runtime environment:
<path_to_skill>/hf_stats.sh space <repo_id>
Returned data includes: repo ID, running status, hardware specification (e.g., T4 medium), SDK type (e.g., Gradio), and number of likes.
Scenario C: Query an organization (Organization)
When you need to aggregate and query statistics for all models under an organization:
<path_to_skill>/hf_stats.sh org <org_name>
Returned data includes: the total number of models in the organization, total downloads over the last 30 days, total likes, and the top 20 popular models sorted in descending order by downloads.
3. Workflow
- Intent recognition: Trigger this skill when the user asks "what is the total download count of a certain model", "when was this model created", "what hardware is this Space running on", or "how many models does this organization have in total".
- Extract parameters: Extract the target repo's
repo_idand type (model,dataset,space,org)。 - Execute the tool: Use the
Bashtool to run thehf_stats.shscript in this skill's directory. - Parse and reply:
- Organize the formatted results returned by the script into natural language.
- Emphasizeall-time total downloads, as this is the data users care about most and is relatively difficult to obtain directly on the web page.
- Mention the Space'shardware specificationand SDK, to help users evaluate its runtime performance.
- If the query is about a Space's visit count, you must clarify to the user: "Hugging Face does not officially disclose real-time visit count data for Spaces; currently, the number of likes and hardware specification are used to evaluate its popularity and resource investment."
4. Limitations
- The Hugging Face API only provides two snapshots: "the past 30 days" and "all-time total". It cannot directly trace back a historical trend line chart for any arbitrary date.
- Organization queries are limited by API aggregation and cannot directly obtain an organization-level cumulative "all-time total downloads" value; only the cumulative value for the last 30 days is shown.
- If a query encounters a 404, remind the user to check whether the ID is correct or whether the repository is private.