Back to articles
I Reverse-Engineered Claude Code's /buddy System and Got a Legendary Cat — Here's How to Reroll Yours
How-ToTools

I Reverse-Engineered Claude Code's /buddy System and Got a Legendary Cat — Here's How to Reroll Yours

via Dev.to Tutorialithiria894

Claude Code recently shipped /buddy — a companion that lives in your terminal and reacts to your code. You get one companion, seeded from your identity. No rerolls. No trades. I got an Epic Cactus named "Thornquake". I wanted a Legendary Cat. So I dug into the source code, figured out exactly how it works, and got my Legendary Cat. The Algorithm Your buddy is 100% deterministic . Same identity = same buddy, every single time. There's no RNG at hatch time. Here's what happens under the hood: identity + "friend-2026-401" → FNV-1a hash → Mulberry32 PRNG seed The PRNG is then consumed in order: Rarity — weighted roll (common 60%, uncommon 25%, rare 10%, epic 4%, legendary 1%) Species — uniform pick from 18 options (duck, cat, dragon, axolotl, chonk, etc.) Eye style, hat, shiny (1% chance), stats (DEBUGGING, PATIENCE, CHAOS, WISDOM, SNARK) The identity that seeds everything comes from: oauthAccount ?. accountUuid ?? userID ?? " anon " This one line is where most people get stuck. The Trap:

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
4 views

Related Articles