Skip to content
Furina-he
Back to Writing

Zero-503 Static SVG Systems: 14 Semantic Tokens and GitHub Actions Without External Servers

Architecture notes behind GitSkins: replacing brittle hosted stat APIs with 242 deterministic Light & Dark SVGs, an 846px Bento grid, stdlib Python live widgets, and an AI Agent SKILL.

GitSkins 5 min read

Visit enough developer GitHub profiles and you quickly run into broken badges and 503 Service Unavailable placeholders. Hosted dynamic stat APIs fail whenever shared quotas exhaust or serverless functions cold-start—and mixing badges from five different services produces clashing typography, radii, and broken dark-mode palettes.

GitSkins reframes GitHub Profiles and Repo READMEs as deterministic, zero-runtime design systems.

One 14-Token Contract Across 11 Light & Dark Skins

GitSkins ships 11 sharply differentiated aesthetic systems—including Swiss-Bauhaus Pixel Poster, Architectural Blueprint CAD, Tactile Industrial Synth, Seal Ink Monograph, and Risograph Overprint.

Instead of hand-coding 22 bespoke variants for every new widget, every skin folder under themes/<id>/ implements the same 14 semantic token contract in meta.json and emits paired Light and Dark SVGs:

  • GitHub switches automatically via native <picture> + prefers-color-scheme, requiring zero client runtime.
  • scripts/build_all.py deterministically builds and verifies 242 core SVGs across all 11 skins and syncs them directly into the Cloudflare-hosted web studio (gitskins.blessc.com).
  • Profile Skins, Repo Skins, 12 static DIY Bento widgets (W01–W12), and 10 live data widgets (L01–L10) all inherit the active theme’s tokens seamlessly.

Taming README Layout With an Exact 846px 4-Column Grid

Every GitSkins widget snaps to an exact 846px four-column Bento grid (204 / 418 / 632 / 846px widths with a uniform 160px row height).

Fixing the geometry yields two major benefits:

  1. Pixel parity from studio to GitHub — whatever Bento composition you assemble in the zero-backend live studio exports cleanly into a ready-to-push ZIP without wrap glitches.
  2. Reliable AI coding agent generation — paired with skill/gitskins/SKILL.md and per-theme PROMPT.md specifications, Claude Code, Codex, Cursor, and Antigravity can generate compliant SVGs without coordinate drift or text overlap.

Zero-503 Live Widgets Using Python Stdlib Only

Keeping live metrics fresh without relying on a third-party server means moving generation directly into the user’s own GitHub Actions workflow:

GitHub Actions (scheduled every 6 hours)
  -> scripts/generate_live_widgets.py (Python stdlib only + built-in GITHUB_TOKEN)
  -> Fetches commit rhythm, streaks, 3D contribution skyline, RSS, or weather
  -> Emits XML-validated assets/live-*-{light,dark}.svg
  -> Commits back only when actual diffs exist

There is no external backend to rate-limit, no third-party Python package tree to break, and zero hosting cost.

Zero-Dependency CLI & Safety Validator

For developers and automation pipelines working directly from the terminal, cli/gitskins.mjs runs on plain Node 18+ with zero npm dependencies:

  • list enumerates all 11 skins, 22 widgets, and Repo Skin modules;
  • init auto-detects the current git remote and scaffolds README markup, SVGs, and workflow YAML;
  • validate enforces strict XML well-formedness, zero <script> tags, and prefers-reduced-motion compliance.

Putting visual craft inside deterministic engineering guardrails turns a README from a fragile collage into a durable artifact.