star-history-chart
为任意GitHub仓库的README添加自托管的“随时间变化的星标数”图表。GitHub现在将星标者端点限制为仓库自身的管理员/协作者,因此第三方实时服务(star-history免费版、starchart.cc)对所有人返回“需要身份验证”。此技能在仓库内生成静态、主题感知的SVG,并通过GitHub Action使用仓库自身的GITHUB_TOKEN每周自动刷新。适用于README中的星标图表损坏、显示“需要身份验证”,或你希望星标历史永不中断的情况。
机器翻译查看英文原文
Add a self-hosted "Stargazers over time" chart to any GitHub repo's README. GitHub now restricts the stargazers endpoint to a repo's own admins/collaborators, so third-party live services (star-history free tier, starchart.cc) return "Requires authentication" for everyone. This generates a static, theme-aware SVG in-repo and auto-refreshes it weekly with a GitHub Action using the repo's own GITHUB_TOKEN. Use when the star chart in a README is broken, shows "Requires authentication", or you want a star history that never breaks.
适用对象:软件开发与测试。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- Star History Chart (self-hosted, never breaks)
- Why this exists
- What this skill sets up
- Workflow
- Step 1: Copy the script and workflow into the repo
- Step 2: Generate the SVG once, locally
- Step 3: Add it to the README
- Step 4: Commit
Add a "Stargazers over time" chart that renders from a static SVG committed to the repo and refreshes itself weekly — no external chart service, no broken images. GitHub now restricts the /stargazers endpoint to a repository's own admins and collaborators. Unauthenticated requests return {"message":"Requires authentication"}, which breaks every third-party live-chart service (star-history.com free tier, starchart.cc, etc.) for all repos. The only reliable fix is to generate the chart yourself with an authenticated token and commit a static image. Inside GitHub Actions, the repo's own GITHUBTOKEN can read its own stargazers, so the whole thing runs with zero secrets to configure. 1. scripts/generatestarhistory.py — fetches stargazers (authenticated), renders a clean, light/dark-adaptive SVG. 2. .github/workflows/star-history.yml — weekly cron + manual trigger that regenerates and commits docs/star-history.svg. 3. A README section pointing at the local SVG. The script needs the requests package: pip install requests. It resolves the repo from STARHISTORYREPO, then GITHUBREPOSITORY (set automatically in Actions), then the origin git remote — so no edits are required for it to work in
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- davila7/claude-code-templates
- 源文件
- cli-tool/components/skills/git/star-history-chart/SKILL.md
- 固定版本
- 21be197f100a12b8d0dd9a211cc244c8179f84d3
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:davila7/claude-code-templates · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T15:01:39.502Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。