Scan the npm registry to discover recently 🔥 Pi Agent packages (extension / skill / theme / prompt template), compute trend scores, and display a summary, helping users track the latest developments in the pi ecosystem.
Output two independent rankings:
- Mainstream ranking - Sorted in descending order by monthly downloads over the past 30 days (
monthly), reflecting the most commonly used packages in the ecosystem today - Emerging ranking - Sorted in descending order by growth score (
growth × ln(weekly+1)), reflecting packages that are rapidly rising
Quick start
Run one command to get both the mainstream ranking and the emerging ranking as two Markdown tables (LLM-friendly). When no arguments are passed, the Top 30 of each are shown.
uv run --script scripts/pi_trending.py
AI display step: After obtaining the tables output by the script, the AI should automatically take the English description in the "One-line introduction" columntranslate it into Chinese and condense it to within 20 characters, then present it to the user. Descriptions that fail to translate keep the original text.
Example script output (the description is the original English text; before displaying, translate the "One-line introduction" column according to the above rules):
# 🔥 Pi Agent 最新热门包 (2026-06-17)
## 主流榜
| # | 包名 | 作者 | 月下载量 | 一句话介绍 |
|---|------|------|---------|------------|
| 1 | `@pi/core` | user | 12,345 | A core framework for building pi extensions |
> Top 30 · 按月下载量排序
## 新锐榜
| # | 包名 | 作者 | 趋势分 | 一句话介绍 |
|---|------|------|--------|------------|
| 1 | `pi-context-map` | dev | 9 | Professional context profiler for Pi |
Ranking explanation
Data source: npm registry (npm packages containing the pi-package keyword). Search strategy:sort=popularity collect 500 candidate packages from the npm search API sorted by downloads. Core types:extension · skill · theme · prompt(automatically identified via npm keywords).
Mainstream ranking
Sorted in descending order by downloads.monthly(monthly downloads over the past 30 days returned by the search API), with zero extra API cost. Reflectsthe most commonly used packages today, suitable for answering "what is everyone using".
Emerging ranking
Sorted in descending order by growth score, reflectinggrowth speedrather than absolute popularity. The algorithm uses only the weekly/monthly two fields returned by the search API:
recency = weekly / monthly # 本周在月度总量中的占比
growth = (recency - 7/30) / (1 - 7/30) # 归一化到 0~1,7/30 为均匀分布基线
score = growth × ln(weekly + 1) # 增速 × 信誉权重
recency ≤ 7/30(this week's share not higher than the uniform distribution baseline) score 0 and are not included in the ranking- Candidate threshold:
weekly ≥ 100, below which packages do not enter the emerging ranking candidate pool (to avoid low-base noise)
Score magnitude reference (at the weekly scale of the pi ecosystem,growth ≤ 1 × ln(weekly+1) the upper limit is about 11):
| Trend score | Meaning |
|---|---|
| ≥8 | 🚀 This week's share far exceeds the baseline, explosive growth |
| ≥3 | 🔥 Clearly above the baseline, rising rapidly |
| >0 | 📈 Slightly above the baseline, moderate growth |
| 0 | Not included in the ranking (recency ≤ 7/30 or weekly < 100) |
⚠️ Notes:
- New packages
weeklyhave a low hourly trend score (ln(weekly+1)items are small), which does not mean there is no growth - Mature and stable large packages (such as core frameworks) rank high in the mainstream ranking, but their trend score in the emerging ranking may not be high
- Trend scorereflects growth speed; it is recommended to evaluate it together with the
weekly_downloadsin the JSON output (--json) - The same package can appear in both rankings at the same time (they do not conflict)
CLI reference
uv run --script scripts/pi_trending.py [选项]
| Option | Effect | Default |
|---|---|---|
--type <extension|skill|theme|prompt> |
Filter the candidate pool by type; both rankings show only that type | all |
--max N |
Set the number of entries for both the mainstream ranking and the emerging ranking at the same time | 30 |
--mainstream-max N |
Set only the number of entries for the mainstream ranking (overrides --max) |
Same as --max |
--rising-max N |
Only set the number of rising-star list entries (overrides --max); set 0 to read only the mainstream list |
Same as --max |
--json |
JSON output (including the list_type field to distinguish mainstream/rising), can be piped to jq |
off |
--verbose |
Output API request progress, pagination, candidate count, etc. to stderr | off |
JSON pipeline example:
# 只读主流榜包名
uv run --script scripts/pi_trending.py --json | jq '.[] | select(.list_type == "mainstream") | .name'
# 只读新锐榜包名
uv run --script scripts/pi_trending.py --json | jq '.[] | select(.list_type == "rising") | .name'
Next steps
The package names in the trend table are npm packages, so you can use npm/gh directly to trace details and changes.
View package details:npm view <包名> readme(including the @scope/ prefix).
Install(by package type):
- pi-extension ->
bunx pi extension install <name> - pi-skill ->
bunx skills add <name>orbunx skills add <gh-repo> - pi-theme ->
bunx pi theme install <name>or refer to the topic installation guide - prompt-template ->
bunx pi prompt install <name>or write to the prompt-templates directory
Check recent changes(packages rising fast in the trend table are often worth digging into): use npm view <包名> time --json to see the release cadence,npm view <包名> repository to find the repository, then use gh release view / gh api repos/<owner>/<repo>/commits to see release notes and commits. Key analysis points:
- Density of release dates -> signal of development activity
- Version number jumps (e.g., 1.x -> 2.0) -> major refactor or production hardening
- Dig into a specific version number ->
npm view <包名> readmesee the changelog section of the README
Script location
scripts/pi_trending.py - a uv-based PEP 723 single-file script that automatically manages dependencies.