Skip to content
◆ GitHub Stats Card/README.md·~/projects/github-stats-card
● Web tool

GitHub Stats Card

role year 2026

A GitHub profile card that shows your streak, languages and a status based on how long since your last push. A dynamic SVG for your README.

Make your own card
TypeScriptBunVercelGitHub GraphQL APIAdobe Illustrator

I kept seeing stats cards on other people's GitHub profiles, and I got curious if I could make my own version. So I did. It was just a little fun project to see if I could, and to add something to my own profile.

The stats card: a 6-day streak on the left, C++ and JavaScript as main and recent languages with 4256 total and 148 past-month contributions in the middle, and a pixel-art goblin with the status Full-on Goblin Mode on the right.
My card on a good day. The goblin shows up when I've pushed in the last two hours.

Illustrator first, code second

I drew the card in Adobe Illustrator first and exported it as an SVG. The rest was code. Each piece of text that changes keeps an id from the design (role_name, streak_count, lang_main), and the server swaps the text inside each one with a regex:

src/services/svg.ts
1const setText = (id: string, text: string | number) => {
2 const regex = new RegExp(`(<text[^>]*id="${id}"[^>]*>)[\s\S]*?(<\/text>)`, "g");
3 svg = svg.replace(regex, `$1${text}$2`);
4};

All six status icons live in the same SVG. A small <style> block gets appended at the end that hides every icon except the one for your current status. The pixel font (Press Start 2P) is embedded in the file too, because a linked font didn't show up on phones.

The status

The status is the fun part. It looks at how many hours since your last push:

  • 2 hours or less: Full-on Goblin Mode. "Writing code faster than I can think."
  • 12 hours: Productive Human
  • 24 hours: Touching Grass. "Outside... what is that bright light?"
  • 48 hours: Caffeine Critical. "System shutting down. Send coffee."
  • A week: Hibernating
  • Longer: Ancient One. "Last seen eons ago..."

Next to it the card shows your current streak, total contributions, contributions in the past 30 days, a main language from your top repository, and a recent one: whatever language takes up the most bytes across the repos you pushed to in the last 30 days.

Anyone can make one

At first it only worked for me. Then I opened it up, in case anyone else found it fun too. Type a username on the site, or point an image at the API:

https://github-stats-card-chi.vercel.app/api/card?username=YOUR_USERNAME

My own card uses my token. Everyone else's goes through a shared fallback token with GitHub's 5,000 requests an hour, and every card is cached for 5 minutes so that limit lasts.

gotcha

Without a token the card falls back to GitHub's public REST API at 60 requests an hour. That still gets the status and the recent language, but commits and streak show 0, since the contribution calendar only comes from the GraphQL API.

It does what I wanted. It's on my profile and I'm not planning anything extra.