Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
davila7 avatar

Star History Chart

  • 29.9k repo stars
  • Updated July 27, 2026
  • davila7/claude-code-templates

A Claude Code skill that adds a self-hosted, auto-refreshing 'stargazers over time' SVG chart to a GitHub README, replacing third-party star-history services that now fail with 'Requires authentication'.

About

star-history-chart is a Claude Code skill from davila7/claude-code-templates that puts a 'Stargazers over time' chart in a GitHub README without relying on any third-party chart service. GitHub now restricts the /stargazers endpoint to a repo's own admins and collaborators, which broke star-history.com's free tier, starchart.cc and every similar live-image service with a 'Requires authentication' error. The skill's fix is structural: a bundled Python script fetches stargazer timestamps with an authenticated token and renders a clean, light/dark-adaptive SVG committed to the repo, and a bundled GitHub Actions workflow regenerates docs/star-history.svg on a weekly cron (plus manual trigger) using the repo's built-in GITHUB_TOKEN - so there are no secrets to configure and nothing external to break. Point the README at the local SVG once and the chart stays live forever.

  • Self-hosted SVG chart - no star-history.com or starchart.cc dependency left to break
  • Weekly GitHub Action refresh using the repo's own GITHUB_TOKEN, zero secrets to configure
  • Light/dark theme-aware SVG rendered from real stargazer timestamps
  • Fixes the 'Requires authentication' breakage after GitHub restricted the stargazers endpoint
  • Bundled Python generator script plus ready-made workflow YAML

Star History Chart by the numbers

  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/davila7/claude-code-templates --skill star-history-chart

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
repo stars29.9k
Last updatedJuly 27, 2026
Repositorydavila7/claude-code-templates

What it does

Fix a broken star-history chart in a README by generating a self-hosted SVG that a weekly GitHub Action refreshes with the repo's own GITHUB_TOKEN.

Who is it for?

Open-source maintainers who want a star-history chart in their README that keeps rendering forever, without depending on star-history.com or starchart.cc.

What you get

A theme-aware docs/star-history.svg committed in-repo and refreshed weekly by a GitHub Action using the repo's own GITHUB_TOKEN - no secrets, no external service.

  • scripts/generate_star_history.py
  • .github/workflows/star-history.yml weekly cron
  • README section pointing at docs/star-history.svg

Files

SKILL.mdMarkdownGitHub ↗

Star History Chart (self-hosted, never breaks)

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.

Why this exists

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 GITHUB_TOKEN can read its own stargazers, so the whole thing runs with zero secrets to configure.

What this skill sets up

1. scripts/generate_star_history.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.

Workflow

Step 1: Copy the script and workflow into the repo

mkdir -p scripts .github/workflows docs
cp skills/git/star-history-chart/scripts/generate_star_history.py scripts/generate_star_history.py
cp skills/git/star-history-chart/assets/star-history.yml .github/workflows/star-history.yml
The script needs the requests package: pip install requests.
It resolves the repo from STAR_HISTORY_REPO, then GITHUB_REPOSITORY
(set automatically in Actions), then the origin git remote — so no edits
are required for it to work in a different repo.

Step 2: Generate the SVG once, locally

Use a token that can read the repo's stargazers (as owner/collaborator). The GitHub CLI provides one:

GITHUB_TOKEN=$(gh auth token) python scripts/generate_star_history.py

This writes docs/star-history.svg. For a repo with many thousands of stars the first run paginates the whole stargazer list and can take a couple of minutes.

Verify it rendered (optional, macOS): qlmanage -t -s 800 -o . docs/star-history.svg

Step 3: Add it to the README

Add or replace the star chart section. Point the image at the local SVG. Set the link target to wherever you want clicks to go (the repo, a docs page, or your own site):

## Stargazers over time
[![Stargazers over time](docs/star-history.svg)](https://github.com/OWNER/REPO/stargazers)

If replacing a broken star-history.com / starchart.cc embed, swap only the image URL to docs/star-history.svg and keep or update the link target.

Step 4: Commit

git add scripts/generate_star_history.py .github/workflows/star-history.yml docs/star-history.svg README.md
git commit -m "feat(readme): self-hosted stargazers chart with weekly auto-refresh"
git push

Step 5: (Optional) Trigger the auto-refresh now

The workflow runs every Monday at 04:00 UTC. To refresh immediately without waiting: GitHub → Actions → "Update Star History" → Run workflow.

Customization

  • Output path — set STAR_HISTORY_OUTPUT (default docs/star-history.svg).
  • Different repo — set STAR_HISTORY_REPO=owner/name.
  • Colors / size — edit the .line, .area, .dot CSS and WIDTH/HEIGHT

constants near the top of generate_star_history.py. The chart is theme-aware via a prefers-color-scheme: dark block, so it looks right in both GitHub light and dark modes.

  • Refresh cadence — edit the cron expression in the workflow.

Notes

  • No secrets to add: the workflow uses the automatic GITHUB_TOKEN.
  • Private repos work too, as long as the token can read the repo.
  • The script uses only requests plus the Python standard library.

Related skills

FAQ

Why did my README star-history chart stop working?

GitHub now limits the /stargazers endpoint to a repo's own admins and collaborators, so unauthenticated third-party chart services return 'Requires authentication' for every repo.

Do I need to configure any secrets?

No. The chart regenerates inside GitHub Actions, where the repo's built-in GITHUB_TOKEN can read its own stargazers - nothing to set up beyond committing the workflow.

How often does the chart update?

A weekly cron in the bundled GitHub Action regenerates and commits docs/star-history.svg; you can also trigger it manually via workflow_dispatch.

Git & Pull Requestsgitdocsdevops

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.