SuperAPI AI Directory

github-trending-analyzer

Testing & quality

View repository

Updated 10-15 22:39

About this skill

GitHub Trending Analyzer

Provide a comprehensive, categorized summary of the latest trending repositories on GitHub.

Step 0: Ask Output Format

Before doing anything else, ask the user:

Which output format do you want?

  1. 📝 Markdown — Show in conversation + save to Obsidian
  2. 🎨 HTML — Pinterest-style webpage + save to Obsidian
  3. 📝+🎨 Both — Both

(Reply directly with 1/2/3 or md/html/both)

If the user already specified a format in their command arguments (e.g., html, md, both), skip the question and proceed directly. Default to Markdown if no clear preference.

Step 1: Fetch Data

The shell script may fail due to GitHub HTML changes. Use this fallback strategy:

  1. Try the script first: scripts/fetch_trending.sh daily|weekly|monthly
  2. If empty results, fall back to gh api with GitHub Search API:
    • Daily proxy (active high-star repos pushed in last 7 days):
      gh api "search/repositories?q=stars:>1000+pushed:>YYYY-MM-DD&sort=stars&order=desc&per_page=30"
      
    • Weekly (new repos created in last 7 days, sorted by stars):
      gh api "search/repositories?q=created:>YYYY-MM-DD&sort=stars&order=desc&per_page=30"
      
    • Monthly (new repos created in last 30 days, sorted by stars):
      gh api "search/repositories?q=created:>YYYY-MM-DD&sort=stars&order=desc&per_page=30"
      
    • Today's hottest (high-star repos pushed today):
      gh api "search/repositories?q=stars:>5000+pushed:>YYYY-MM-DD&sort=updated&order=desc&per_page=25"
      
    • Brand new (created in last 2 days):
      gh api "search/repositories?q=created:>YYYY-MM-DD&sort=stars&order=desc&per_page=20"
      
  3. Use --jq to extract: full_name, language, stargazers_count, description, created_at

Step 2: Full Inventory & Deduplication

  • List every single project found. Do not omit any.
  • Note projects appearing in multiple spans (e.g., "Daily + Monthly").

Step 3: Deep Categorization (2-Level Hierarchy)

Use a 2-level taxonomy when total projects > 30 — flat single-level becomes a wall of cards. Single-level is fine for < 30 projects.

Method: explicit full_name → (macro, sub) mapping

Keyword-heuristic categorization (if 'skill' in desc and ...) leaves ~20% of projects in a useless "other" bucket. Explicit per-project mapping is 100% coverage and faster to maintain at this scale (≤ 200 projects). See references/hierarchical-classification.md for the canonical pattern.

Recommended 7 macro themes

These are starting points — adjust based on what today's data actually surfaces:

  • 🤖 AI Native dev stack — Skills, AI coding CLI, agent harness, LLM platform, AI workspace, evaluation/observability, MCP/SDK
  • 🎨 Models & creative generation — Large models, multimodal generation, model hardware
  • 🛡️ Security & defense — Defense/threat modeling, supply chain/scanning, OSINT, dual-use vulnerabilities
  • 🛠️ Engineering & productivity — macOS/iOS, terminal, Web, data integration, business/SaaS alternatives
  • 🔬 Research & learning resources — Educational resources, awesome lists, RAG/knowledge systems
  • 🌳 Platforms & classic infrastructure — Frontend frameworks, systems/kernel, general development tools
  • 🌎 Other — Suspicious/Game exploit, no description, game ports

Sub-buckets emerge from the data

Don't pre-fix sub-buckets — let the data shape them. Example from 2026-06-16 run: Skills macro naturally split into 5 subs (创意/媒体, 写作/语言, 工作流/方法论, 研究/学术, 通用集合) once the 19 projects were laid out. Resist over-engineering: 3-7 subs per macro is the sweet spot.

No "other" catch-all

If "其它" exceeds 8 projects, force them into named buckets even if narrow (e.g. ⚠️ 可疑/Game exploit, ❓ 无描述/不明, 🎮 游戏移植). This makes suspicious items more visible, not less.

Step 4: Hyperlinking

Every project MUST include its full GitHub URL: [user/repo](https://github.com/user/repo)

Step 5: Strategic Insights

Identify 3-5 high-level trends. Include a one-sentence "vibe summary" of the day.

Step 6: Output

Based on the user's format choice:

Markdown (option 1)

Output in conversation:

# GitHub Trending 全景分析(YYYY-MM-DD)

## 📅 Part 1:完整热门列表
### 🔴 每日热门(Daily)  — table
### 🟡 每周热门(Weekly) — table
### 🟢 每月热门(Monthly)— table

## 🏗️ Part 2:分类分析
(One table per category)

## 💡 Part 3:战略洞察
(3-5 insights + vibe summary)

HTML (option 2)

Generate a single self-contained HTML file following the design spec in references/pinterest-design.md. Open in browser with open <path>.

For longer reports (≥ 6 macro sections), include a floating mini-TOC as specified in the design doc — fixed right-side panel with scroll-spy and collapsible sub-buckets. Avoid the inline full-width TOC: it eats first-screen real estate.

Both (option 3)

Show Markdown in conversation AND generate the HTML file.

Step 7: Save to Obsidian

After generating, save to the Obsidian vault:

  • Vault path: Read ~/Library/Application Support/obsidian/obsidian.json, pick the accessible vault.
  • Folder: GitHub-Trending/
  • Markdown: GitHub-Trending/YYYY-MM-DD.md with frontmatter:
    ---
    date: YYYY-MM-DD
    type: github-trending
    tags: [github, trending, AI, open-source]
    ---
    
  • HTML: GitHub-Trending/YYYY-MM-DD.html
  • Only save the format(s) the user requested.
  • If the vault is not accessible (permission error), save to the working directory and inform the user.

Language

If the user passes 中文 as argument, output everything in Chinese. Otherwise default to English.