通过 GitHub 公开 API 抓取用户所有 starred 仓库,按大类自动分组,生成标准化中文 Markdown 报告文件。
text
github-stars-analyzer/
├── SKILL.md ← 本文件
├── scripts/
│ └── fetch_stars.py ← 抓取 + 报告生成脚本
└── assets/
└── template.md ← 标准化报告模板(说明格式规范)
从用户消息中提取 GitHub 用户名,支持以下格式:
https://github.com/USERNAME?tab=starshttps://github.com/USERNAME@USERNAME将脚本复制到工作目录后执行:
bash
cp /path/to/skill/scripts/fetch_stars.py /home/claude/fetch_stars.py
python3 /home/claude/fetch_stars.py USERNAME --output /home/claude/USERNAME_github_stars.md
可选参数:
--token <PAT>:GitHub Personal Access Token,将 API 限额从 60次/小时 提升至 5000次/小时--output <路径>:指定输出文件路径,默认为 <username>_github_stars.mdbash
cp /home/claude/USERNAME_github_stars.md /mnt/user-data/outputs/USERNAME_github_stars.md
然后使用 present_files 工具将文件提供给用户。
脚本按仓库 topics 和语言自动划分以下大类(优先级从上到下匹配):
大类匹配关键词(topics / 语言)🤖 人工智能与机器学习ai, ml, machine-learning, deep-learning, llm, nlp, neural-network, gpt, pytorch, tensorflow🛠️ 开发工具与效率cli, tool, productivity, devtools, vscode, vim, ide, automation, workflow🌐 前端与界面frontend, react, vue, angular, css, html, ui, design, javascript, typescript⚙️ 后端与框架backend, api, rest, graphql, microservice, server, django, flask, fastapi, go, rust📦 基础设施与运维devops, docker, kubernetes, ci-cd, cloud, aws, infra, terraform, nginx🗄️ 数据库与数据database, sql, nosql, redis, postgres, mongodb, data, analytics, etl🔒 安全与隐私security, hacking, pentest, crypto, privacy, auth, vulnerability📚 学习资源与文档awesome, tutorial, learning, course, book, guide, roadmap, cheatsheet🎮 游戏与创意game, graphics, animation, art, creative, shader🐍 Python 生态语言为 Python 且未命中以上类别其他未匹配任何类别的仓库
详见 assets/template.md,生成报告时严格遵循该模板的结构和中文命名规范。
--token完成后告知用户:
python3 fetch_stars.py <用户名>--token 参数