{"id":"e9474bb3-d873-415b-ba52-b4b9ae1cc491","slug":"name2face","kind":"skill","name":"name2face","summary":"Give any name, username or ID a cute SVG face that never changes. One Python file, no Node, no API.","owner":"Dodai0419","repoUrl":"https://github.com/Dodai0419/name2face","license":"MIT","licenseTier":"permissive","trust":"community","stars":0,"match":null,"fewStars":true,"format":"skill","createdAt":"2026-10-28T04:41:44.000Z","addedAt":"2026-10-30T03:59:07.231Z","logoUrl":"https://avatars.githubusercontent.com/u/130151547?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["developer-tools","design-media","files-documents"],"tags":["avatar","claude-code","codex","generative-art","python","svg","claude-code-plugin"],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-30T06:01:22.235Z","sample":false,"url":"https://conduits.dev/tools/name2face","language":"Python","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"<div align=\"center\">\n\n# name2face\n\n**Give any name, username or ID a cute SVG face that never changes. One Python file, no Node, no API.**\n\nA stdlib-only Python port of [Blobz](https://github.com/lirena00/blobz) avatars: the same name and palette give the **same SVG, byte for byte**, so your Python backend and your React frontend draw the same face.\n\nWorks with **Claude Code** and **Codex**.\n\n![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg) ![Status: prototype](https://img.shields.io/badge/status-prototype-orange.svg)\n\n![24 avatars generated from 24 names by name2face](docs/gallery.png)\n\n<sub>Real output of `python demo.py` (`docs/gallery.svg`, rasterized for this page). Every face comes from the name under it.</sub>\n\n</div>\n\n## Quick start\n```bash\ngit clone https://github.com/Dodai0419/name2face && cd name2face\npython name2face.py \"ada lovelace\" > ada.svg\n```\n```\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 80 80\" width=\"80\" height=\"80\" role=\"img\" aria-label=\"Blob avatar for ada lovelace\">...\n```\nNo `pip install`: it only uses the Python standard library.\n\n## Gallery\n\n**One name, six palettes** (`--bg` / `--body`), `--frame circle`:\n\n![ada lovelace in six palettes](docs/palettes.svg)\n\n**Three frames** for the same name:\n\n![grace hopper with circle, rounded and square frames](docs/frames.svg)\n\n| You want | Command |\n|---|---|\n| One SVG on stdout | `python name2face.py \"ada lovelace\" > ada.svg` |\n| A file per user | `python name2face.py alice bob carol -o avatars/` → `avatars/alice.svg`, ... |\n| A page to eyeball them | `python name2face.py alice bob carol --html faces.html` |\n| Your brand colours | `python name2face.py alice --bg \"#0b1830\" --body \"#18a6d3\"` |\n| A round frame | `python name2face.py alice --frame circle` (`rounded` is default, `square` too) |\n| From Python | `from name2face import avatar; svg = avatar(\"user@example.com\")` |\n\n## The problem\n- New users get a grey silhouette, or you pay an image API to draw something friendlier.\n- The nice avatar libraries are npm packages, so a Django, Flask or FastAPI backend, a static-site build or an email template has to start Node to get the same face.\n- Storing a generated PNG per user means storage, cache invalidation and a migration when you change colours.\n\n## The solution\n| Idea | Fixes |\n|---|---|\n| **Name → hash → 11 features** (shape, eyes, look, mouth, brows, gap, tilt, shift, face angle, mirror) with cyrb53 + mulberry32, exactly like Blobz | The same face everywhere, nothing stored |\n| **One stdlib Python file** that writes the SVG string directly | No Node, no npm, no image API |\n| **Byte-identical to `@blobz/avatar-core`** | Frontend (React) and backend (Python) agree on every user's face |\n\n## Use with Claude Code\n```bash\n/plugin marketplace add Dodai0419/name2face\n/plugin install name2face@name2face\n```\nThen ask: *\"give every user in seed.json a default avatar under static/avatars\"*.\n\n## Use with Codex (ChatGPT)\n```bash\ngit clone https://github.com/Dodai0419/name2face && cp -r name2face/skills/* ~/.codex/skills/\n```\nOr copy `AGENTS.md` into your project root.\n\n## Same output as upstream\nChecked against `@blobz/avatar-core` (lirena00/blobz commit `8b492ed`, run with Node 24 straight from `src/avatar.ts`):\n\n| Check | Result |\n|---|---|\n| Upstream's own test digests (`Janaki`, `Blobz <Admin>`, the all-features custom case) | same SHA-256 |\n| 20,012 names: 13 edge cases (unicode, CJK, emoji, `&<>\"`, 200 chars, spaces, mixed case) + 20,000 random, across 4 palettes (one dark) and 3 frames | **20,012 / 20,012 byte-identical** |\n| Every value of every feature, forced through `overrides`, × 6 eye styles × 2 palettes | **1,356 / 1,356 byte-identical** |\n\n`tests/golden.jsonl` keeps 29 upstream SVGs that together hit every feature value, frame and palette, and the test suite compares against them.\n\nNot ported: upstream's `createCustomAvatar` editor API (pick features by name). `overrides` with feature indexes covers the same faces.\n\n## Benchmarks\nWindows 11, Python 3.11.1, Node 24.20.0, both called in-process on a busy machine; 5 alternating runs of 5,000 names each.\n\n| | `@blobz/avatar-core` (TypeScript) | name2face (Python) |\n|---|---|---|\n| lines (non-blank) | 896 (`src/avatar.ts`, library only) | **298** (library + CLI + HTML gallery) |\n| file size | 28.7 KB | **20.0 KB** |\n| runtime dependencies | Node.js (or a bundler) | **none** (Python stdlib) |\n| time per avatar | 128–197 µs | 191–266 µs |\n| one avatar from a cold process | 362–641 ms (`node one.mjs`) | 389–527 ms (`python name2face.py ada`) |\n\nThe port is about as fast as the original (a bit slower per avatar, similar cold start). Its gain is that it is a third of the code and runs where Python already is. Reproduce: `python -m unittest -q`, and time `name2face.avatar()` with `time.perf_counter`.\n\n## Inspired by\n- [lirena00/blobz](https://github.com/lirena00/blobz) (MIT): the avatar design, shapes, hash, random generator and SVG layout, ported line by line from `packages/avatar-core/src/avatar.ts`.\n\n## Roadmap\n- [ ] `--png` output through an optional rasterizer\n- [ ] Feature names (`--eyes wink --mouth grin`) like upstream's custom avatar API\n- [ ] A tiny Flask/FastAPI route example\n\n## License\nMIT. Includes the copyright notice of the upstream project.\n"}