github-stars
Installation
SKILL.md
GitHub Star Count Integration
Add live GitHub star counts to websites as social proof. Two patterns depending on traffic level — pick the right one and go.
Decision: Client-Side vs Server-Side
Client-side hook (default) — fetch directly from GitHub API in the browser.
- No API key needed for public repos
- GitHub allows 60 requests/hour per IP (unauthenticated)
- Fine for most sites — each visitor makes their own request
- Star count simply doesn't render if the fetch fails
Server-side caching — proxy through your own API route with a GITHUB_TOKEN.
- Raises the limit to 5,000 requests/hour
- Add
next: { revalidate: 300 }to cache for 5 minutes - Use this for high-traffic pages or when you need the count at build time