一键导入
npm-downloads
Get download statistics for an npm package over time. Use when the user asks for package download counts, popularity metrics, or usage statistics.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Get download statistics for an npm package over time. Use when the user asks for package download counts, popularity metrics, or usage statistics.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user needs help with path queries, JSON transformations, schema validation, or safe JSON editing workflows. Triggered by questions about JSON operations, data extraction, file merging, or validation strategies.
Scan project dependencies for known vulnerabilities. Automatically detect and parse package files (package.json, requirements.txt, Gemfile, go.mod, pom.xml) and check all dependencies against the CVE database. Use when you want to audit a project for security vulnerabilities, check if dependencies have known CVEs, or generate a vulnerability report for compliance.
Search for Common Vulnerabilities and Exposures (CVEs) by ID (e.g., CVE-2024-1086) or by product name (e.g., OpenSSL, Apache Tomcat). Get detailed vulnerability information including severity scores, affected software versions, and references. Use when the user wants to look up CVE information, check if a product has known vulnerabilities, or research security issues.
Validate a JSON file against the schema referenced in its $schema property. Use when the user asks to check JSON against its own schema, validate self-describing JSON, auto-validate JSON files, or verify JSON with embedded schema reference.
Validate JSON data against a JSON Schema. Use when the user asks to validate JSON against a schema, check if JSON conforms to a schema, test JSON data validity, or verify JSON structure matches a schema definition.
Validate that a JSON Schema is well-formed and conforms to the JSON Schema specification. Use when the user asks to check if a schema is valid, verify schema syntax, validate schema structure, or check a JSON Schema file for errors.
| name | npm-downloads |
| description | Get download statistics for an npm package over time. Use when the user asks for package download counts, popularity metrics, or usage statistics. |
Retrieve download statistics for an npm package over a specified time period.
npx tsx scripts/downloads.ts <package-name> [options]
| Argument | Required | Description |
|---|---|---|
package-name | Yes | The exact package name (case-sensitive) |
| Option | Description |
|---|---|
--period=PERIOD | Time period: last-week, last-month, last-year (default: last-month) |
--no-cache | Bypass cache and fetch fresh data from API |
Downloads for react (last-month)
--------------------------------
Period: 2023-10-01 to 2023-10-31 (31 days)
Total downloads: 15,234,567
Average per day: 491,438
Peak day: 2023-10-15 (678,234 downloads)
npx tsx scripts/downloads.ts <package-name> [options]
Options:
--period=PERIOD - Time period: last-week, last-month, last-year (default: last-month)--no-cache - Bypass cache and fetch fresh data from APIRun from the npm-registry plugin directory: ~/.claude/plugins/cache/npm-registry/
GET https://api.npmjs.org/downloads/range/{period}:{package}
| Parameter | Required | Description |
|---|---|---|
period | Yes | Time period: last-week, last-month, last-year, or date range (YYYY-MM-DD:YYYY-MM-DD) |
package | Yes | The exact package name (case-sensitive) |
Last week:
https://api.npmjs.org/downloads/range/last-week:react
Last month:
https://api.npmjs.org/downloads/range/last-month:react
Last year:
https://api.npmjs.org/downloads/range/last-year:react
Custom date range:
https://api.npmjs.org/downloads/range/2023-01-01:2023-12-31:react
{
"downloads": [
{
"downloads": 1234567,
"day": "2023-10-01"
}
],
"start": "2023-10-01",
"end": "2023-10-31",
"package": "react"
}
| last-month | Past 30 days |
| last-year | Past 365 days |
| YYYY-MM-DD:YYYY-MM-DD | Custom date range |
Custom date ranges must be in ISO 8601 format (YYYY-MM-DD).
The data can show:
Download statistics are cached for 24 hours. Historical download data doesn't change, so the cache provides the same data with better performance.
Use the --no-cache flag to bypass the cache.
npm-info to get package metadata alongside download statsnpm-search to discover packages with high download countsPackage not found: Download stats are only available for published packages. Use npm-exists to verify the package exists first.
Invalid period: Ensure the period format is correct. Date ranges must use colons to separate dates from the package name.
No data: Very new packages may not have download statistics yet. Statistics are typically available within 24-48 hours of first publish.