Star History Chart (self-hosted, never breaks)
SkillSecuritystar-history-chart is a skill that lets an AI agent 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 and collaborators, so third-party live services return "Requires authentication" for everyone. This skill generates a static chart instead, so the README keeps showing star growth without depending on those services.
Use Star History Chart (self-hosted, never breaks) in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Star History Chart (self-hosted, never breaks) and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Star History Chart (self-hosted, never breaks) skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Have a GitHub repository with a README and access to its stargazers data as an admin or collaborator.
What your AI can do with it
- Generate a static stargazers-over-time chart for a GitHub repo
- Insert the chart into the repo's README
- Work around the restricted stargazers endpoint
- Replace third-party live star history services
- Self-host the chart so it does not need authentication
Getting started
- Have a GitHub repository with a README and access to its stargazers data as an admin or collaborator.
- Add the star-history-chart skill to your agent's available skills.
- Ask the agent to generate a star history chart for the repository.
- Let the agent insert the resulting static chart into the README.
What this skill tells your AI
The instructions your AI receives, as published by davila7/claude-code-templates in cli-tool/components/skills/git/star-history-chart/SKILL.md and read by ahel’s review.
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
scripts/generate_star_history.py— fetches stargazers (authenticated), renders a clean, light/dark-adaptive SVG..github/workflows/star-history.yml— weekly cron + manual trigger that regenerates and commitsdocs/star-history.svg.- 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
requestspackage:pip install requests. It resolves the repo fromSTAR_HISTORY_REPO, thenGITHUB_REPOSITORY(set automatically in Actions), then theorigingit 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
[](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(defaultdocs/star-history.svg). - Different repo — set
STAR_HISTORY_REPO=owner/name. - Colors / size — edit the
.line,.area,.dotCSS andWIDTH/HEIGHTconstants near the top ofgenerate_star_history.py. The chart is theme-aware via aprefers-color-scheme: darkblock, so it looks right in both GitHub light and dark modes. - Refresh cadence — edit the
cronexpression 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
requestsplus the Python standard library.
Signals
- GitHub stars
- 32k
- Forks
- 4k
- Last commit
- Oct 2026
ahel review
K1binfo
installs-packagesK1binfo
installs-packages (in assets/star-history.yml)
Automated review, not a security audit. Ruleset v1+k2.
Questions
- Why do third-party star history services show "Requires authentication"?
- GitHub restricts the stargazers endpoint to a repo's own admins and collaborators, so live services like star-history free tier and starchart.cc cannot read it for public visitors.
- How does this skill avoid that problem?
- It generates a static chart instead of calling the live endpoint, so the README shows star history without needing authentication.
- What kind of tool is star-history-chart?
- It is a skill for an AI agent, used to add a self-hosted stargazers-over-time chart to a GitHub repo's README.
- Does the chart update on its own?
- The skill produces a static chart, so it reflects the data at the time it is generated rather than updating live.
Advanced
- Item type
- skill
- Key
star-history-chart- Source
- github.com/davila7/claude-code-templates
github.com/davila7/claude-code-templates
Related picks
Skill · wshobson
The pick for Pythonpython-pro
Skill · jeffallan
The pick for Pythoncron-manager
Skill · countbot-ai
The pick for Croncron-packs
Skill · profbernardoj
The pick for Crongithub-actions
Skill · tddworks
The pick for GitHub Actionsgithub-actions-docs
Skill · devantler-tech
The pick for GitHub Actions