An ultra-smooth, neon-glowing animated SVG snake that devours your GitHub contribution heatmap.
Built with pure SMIL animation — works in <img> tags everywhere.
Everything that makes GitHub Snake stand out from the crowd.
Serpentine Hamiltonian path traverses all 53 × 7 = 371 contribution cells in a boustrophedon pattern.
3-layer SVG filter stack with tight core glow, medium halo, and wide bloom — all animated seamlessly.
Contribution intensity (level 0–4) rendered as colored cells beneath the snake in real-time.
6 tiers from Rookie to Legendary, shown as an animated hexagon badge based on your yearly contributions.
Up to 4 snakes on the same grid, each phase-staggered around the loop with unique colors.
Pure SMIL SVG animation — no JavaScript, no Canvas, works in <img> tags everywhere.
Add this to your GitHub profile README.md (replace YOUR_USERNAME):
| Parameter | Type | Default | Description |
|---|---|---|---|
username |
string | — | GitHub username (single-user mode) |
users |
string | — | Comma-separated usernames, max 4 (multi-user mode) |
theme |
string | dark |
One of dark, neon, tokyo, cyberpunk, ocean |
username and users are mutually exclusive. Use one or the other.
5 handcrafted color palettes. Each theme provides 5 snake colors so multi-user snakes are always visually distinct.
GitHub default palette
Deep black + electric colors
Tokyo Night editor theme
Black + purple/magenta
Deep ocean blues and teals
Your rank is determined by your total GitHub contributions in the last year. It appears as an animated hexagon badge in the top-right of the SVG.
| Tier | Rank | Threshold | Color | Badge |
|---|---|---|---|---|
| 0 | ROOKIE | < 50 | #667788 |
· |
| 1 | BRONZE | ≥ 50 | #cd7f32 |
▲ |
| 2 | SILVER | ≥ 200 | #d0d0d0 |
● |
| 3 | GOLD | ≥ 500 | #ffd700 |
★ |
| 4 | DIAMOND | ≥ 1 000 | #b9f2ff |
◆ |
| 5 | LEGENDARY | ≥ 2 500 | rainbow | ✦ |
LEGENDARY gets a rainbow-animated gradient fill and cycling stroke color on the badge.
Combine up to 4 GitHub profiles into one animated SVG. Each snake gets a unique color, evenly-spaced phase offset, and immediate visibility.
snakeColors array.
api/snake.js
utils/cache.js
lib/scraper.js
lib/snake.js
lib/svg.js
The snake follows a boustrophedon (serpentine) Hamiltonian path through the 53 × 7 contribution grid:
Each snake is rendered as three stacked <path> elements sharing the same grid path:
| Layer | Width | Opacity | Dash |
|---|---|---|---|
| Outer glow | 10 px | 0.09 | 390 4420 |
| Inner glow | 6 px | 0.20 | 260 4550 |
| Snake body | 3 px | 1.00 | 130 4680 |
Lag is implemented with negative SMIL begin offsets so trails are visible from the first frame.
A <circle r="5.5"> follows the path with <animateMotion> + <mpath>, leading the body by exactly SNAKE_LEN / SPEED ≈ 0.811 s.
Two stacked feGaussianBlur passes (stdDeviation 2.5 and 8) create a dramatic flare effect.
stroke-dasharray is set so the pattern period equals the path length (dash + gap = 4810).
Animating stroke-dashoffset from 0 to -4810 over 30 s completes exactly one period → frame-perfect seamless loop.
SourceGraphic on top of the blurred copies creates the classic neon look: bright solid core with a diffuse halo.
Responses are cached in-memory for 30 minutes per username(s) + theme key. Cache is stored in utils/cache.js using a Map with auto-expiry via setTimeout.
Downstream HTTP clients also receive: