11 / 11
github-profile-cards
Open source · 2026
Self-hosted GitHub stats and languages cards on Cloudflare Workers: private work counts as totals, and no repository name ever appears.
- B- → B+GitHub grade once private work counted
- 100%Mutation score on 15 critical modules
- 313Automated tests

Overview
The problem
Most of my work lives in private client repositories, so public stats cards counted about a fifth of it. Then the public github-readme-stats instance went down, and my cards turned into broken images. I wanted a profile that shows how much I really ship, without revealing a client or repository name.
The fix
A small Cloudflare Worker that runs on the free plan. A cron job fetches the numbers every 6 hours with two read-only tokens, validates them, renders light and dark cards, and stores them in KV. Requests only read what’s stored, so there’s nothing to rate-limit. The cards show public, private and total counts, never names.
Anyone can deploy their own copy with a Deploy to Cloudflare button and two tokens.
The result
The cards are live on my GitHub profile, and my grade went from B- to B+ once private work counted. Version 1.0.0 is public, and the Deploy button was tested end to end on a separate Cloudflare account. The tests cover critical behaviour, with a mutation score of 100% on 15 critical modules.
Architecture
- RefreshA cron trigger every 6 hours fetches the numbers with two read-only GitHub tokens
- ValidationNew data replaces the old only if it passes; a sudden drop is held back until it repeats
- StorageLight and dark SVGs, rendered ahead of time and kept in Workers KV
- DeliveryRequests only read KV, with a placeholder card if it’s ever empty, never a broken image
Key decision
Render the cards ahead of time and store totals only. Requests never reach GitHub, so the cards can’t hit a rate limit, and no repository name ever enters the stored data.
