{
  "$type": "site.standard.document",
  "content": {
    "$type": "site.subgraph.content.markdown",
    "body": "\nOn April 1st, 2026, Anthropic shipped a tamagotchi-style terminal pet called **Buddy** as an easter egg inside Claude Code. Type `/buddy` and a little ASCII creature hatches next to your input line. It watches your conversations, drops comments in speech bubbles, and has its own name, personality, and stats. Delightful.\n\nYour buddy is **deterministic**, generated from a hash of your account UUID. You don't get to pick your species, rarity, or stats. You get what you get.\n\nI got a Common turtle.\n\nBaseline stats, no hat, no shimmer. A slow, unremarkable cretin assigned to me by the cold math of a hash function. People online are showing off Legendary Shiny Dragons with maxed-out chaos stats and tiny duck hats. Something had to be done.\n\nSo I brute-forced the generation algorithm and built a tool to hunt for better seeds.\n\n## The Generation Pipeline\n\n```mermaid\nflowchart LR\n    A[accountUuid] --> B[\"+ salt 'friend-2026-401'\"]\n    B --> C[Wyhash → u32]\n    C --> D[Mulberry32 PRNG]\n    D --> E[rarity]\n    D --> F[species]\n    D --> G[eyes]\n    D --> H[hat]\n    D --> I[shiny]\n    D --> J[stats]\n```\n\nThe pipeline reads `oauthAccount.accountUuid` from `~/.claude.json`, concatenates it with the salt `\"friend-2026-401\"`, hashes it with **Wyhash** (`Bun.hash()`) truncated to u32, seeds a **Mulberry32** PRNG, and rolls traits sequentially.\n\nSame UUID in, same buddy out. Reinstalling changes nothing. Physical traits regenerate from the hash every launch. Only the name and personality persist locally.\n\nThe pipeline only cares about the UUID string. Swap it in the config for one that hashes to better traits and you get a different buddy. Auth tokens live separately, so login is unaffected.\n\n## Species\n\n18 species, uniformly distributed. Dragons, capybaras, axolotls, ghosts, geese, etc. Assignment is purely a function of the hash.\n\n## Rarity\n\nWeighted probabilities with a separate shiny roll:\n\n| Rarity    | Probability | Stat Floor | Features                          |\n|-----------|-------------|------------|-----------------------------------|\n| Common    | 60%         | 5          | Basic appearance, no hat          |\n| Uncommon  | 25%         | 15         | Unlocks hat accessories           |\n| Rare      | 10%         | 25         | More accessory options            |\n| Epic      | 4%          | 35         | Exclusive accessories, high stats |\n| Legendary | 1%          | 50         | Top-tier accessories, max stats   |\n\nEvery buddy has an independent **1% shiny chance**, adding iridescent shimmer and particle effects regardless of rarity.\n\nCombined probabilities:\n\n| Combination                          | Probability     |\n|--------------------------------------|-----------------|\n| Legendary                            | 1/100           |\n| Shiny                                | 1/100           |\n| Legendary + Shiny                    | 1/10,000        |\n| Specific Species + Legendary         | ~1/1,800        |\n| Specific Species + Legendary + Shiny | ~1/180,000      |\n\n## Appearance\n\n6 eye styles: `· ✦ × ◉ @ °`\n\n8 hats, gated by rarity. Common buddies get nothing. Uncommon unlocks crowns, top hats, and propellers. Rare adds halos and wizard hats. Epic gets beanies. Legendary gets the tiny duck.\n\n## Stats\n\n5 attributes shape the buddy's personality and interaction style, ranked here by coding utility:\n\n| Rank | Stat      | Why                                     |\n|------|-----------|-----------------------------------------|\n| 1    | Debugging | The whole point of a buddy              |\n| 2    | Wisdom    | Pattern recognition, architecture sense |\n| 3    | Patience  | Long sessions, complex problems         |\n| 4    | Chaos     | Creative solutions, lateral thinking    |\n| 5    | Snark     | Fun but least useful                    |\n\nA high-chaos goose with max snark will roast your bugs. A patient owl with high wisdom offers constructive advice. The species-attribute combination drives the entire interaction personality.\n\nEvery buddy has one **peak** attribute (highest) and one **dump** attribute (lowest). The rest distribute randomly. Total points scale with rarity. A Legendary buddy's dump stat is higher than a Common buddy's peak.\n\nThe formulas for a Legendary (stat floor 50):\n\n| Type   | Formula                          | Range  |\n|--------|----------------------------------|--------|\n| Peak   | min(100, floor(50 + 50 + rand × 30)) | 100    |\n| Normal | floor(50 + rand × 40)           | 50–89  |\n| Dump   | max(1, floor(50 − 10 + rand × 15))  | 40–54  |\n\nTheoretical max BST is **421**: peak at 100, three normals at 89, dump at 54. Getting there requires every random roll to land at its absolute ceiling. Three normals at 89 each need rand in [0.975, 1.0), roughly 2.5% per roll. The dump at 54 needs rand in [14/15, 1.0), about 6.7%. Combined with the 1% legendary roll and the right peak/dump assignment, the odds of a perfect 421 land around 1 in 6 billion. Within u32 space, but barely.\n\nThe ideal 421: debugging as peak (100), snark as dump (54), wisdom/patience/chaos all at 89.\n\n## Interaction Model\n\nBuddies work in two modes.\n\n**Passive**: the buddy watches your conversation with Claude and chimes in via speech bubble at key moments. Hit a tricky bug and it might encourage you or mock you, depending on its stats.\n\n**Active**: mention the buddy by name and its bubble responds directly. Claude steps aside.\n\nResponse style is attribute-driven. High snark delivers witty roasts. High patience offers comfort. High chaos is unpredictable. The buddy's system prompt is injected at generation:\n\n```\nA small {species} named {name} sits beside the user's input box\nand occasionally comments in a speech bubble. You're not {name} —\nit's a separate watcher.\n```\n\nClaude treats the buddy as an independent entity, yielding when the user addresses it directly.\n\n## The Mulberry32 PRNG\n\n```typescript\nclass Mulberry32 {\n  constructor(seed: number) { this.state = seed >>> 0; }\n  nextU32(): number {\n    this.state = (this.state + 0x6d2b79f5) >>> 0;\n    let t = (this.state ^ (this.state >>> 15)) >>> 0;\n    t = Math.imul(t, 1 | this.state) >>> 0;\n    t = (t + (Math.imul((t ^ (t >>> 7)) >>> 0, 61 | t) >>> 0)) ^ t;\n    return (t ^ (t >>> 14)) >>> 0;\n  }\n  nextF64(): number { return this.nextU32() / 4294967296; }\n}\n```\n\nPure bitwise math. Millions of evaluations per second.\n\n## buddydex\n\nThree interfaces, one shared engine. A Bun workspace monorepo with a CLI, a web UI, and a Claude Code plugin.\n\n## CLI\n\nRuns directly with `bunx buddydex` or installs globally via `bun add -g buddydex`.\n\nHunt for buddies matching your criteria:\n\n```bash\nbuddydex hunt --species dragon --rarity legendary\nbuddydex hunt --rarity legendary --perfect 70\nbuddydex hunt --shiny --tries 50000000\n```\n\nFilters include `--species`, `--rarity`, `--shiny`, `--min-stat chaos:90`, `--min-total 400`, and `--perfect` (every stat above a threshold). Default search space is 1M UUIDs.\n\nInject a result into `~/.claude.json`:\n\n```bash\nbuddydex inject <seed>\nbuddydex inject <seed> --preview\n```\n\nFirst injection backs up the original UUID. `buddydex restore` reverses everything.\n\n```bash\nbuddydex show       # current buddy\nbuddydex restore    # restore original from backup\nbuddydex roll <id>  # preview what a UUID produces\n```\n\n## Web UI\n\nLive at [buddydex.fun](https://buddydex.fun). A React + Vite app with the same engine running in a Web Worker. Uses `@zig-wasm/hash`, the same Zig Wyhash compiled to WASM. Results are identical to the CLI.\n\n## Slash Command\n\nRegistered as a Claude Code plugin:\n\n```bash\nclaude plugin add github:iammatthias/buddydex\n```\n\nAdds `/reroll` inside Claude Code. Claude handles argument parsing, search, result presentation, and injection within the conversation.\n\n## Notes\n\n**Bun is required for the CLI.** `Bun.hash()` uses Wyhash. The web UI gets the same results via `@zig-wasm/hash`.\n\n**UUID format is enforced.** The binary's UUID-to-BigInt parser crashes on non-hex input. The brute-forcer generates valid 8-4-4-4-12 format UUIDs only.\n\n**Auth is orthogonal.** `accountUuid` is read only for buddy generation. OAuth tokens handle authentication independently. Swapping the UUID affects nothing else.\n\n**Shared engine.** The `engine` package is an exact port of the deobfuscated binary logic: Wyhash, Mulberry32 PRNG, `rollBones`, and all the constants. Every interface uses it.\n\n## Project Structure\n\nBun workspace monorepo:\n\n```\npackages/\n  engine/    Shared core: Wyhash, Mulberry32, rollBones, constants\n  cli/       CLI tool: hunt, inject, restore, show, roll\n  web/       Web UI: React + Vite + Web Worker\n  plugin/    Claude Code integration: /reroll slash command\n```\n\n---\n\nThe best `/buddy` I have found so far is a `Legendary Snail`. It has as close as you can get to perfect stats, with the exception of `shiny`. \n\n![[at://did:plc:p5xem22ammiafn5kxonaksfa/site.subgraph.media/3mlp5iyrctssw]]\n\n`bunx buddydex inject d4a815e8-f9e4-4f20-84a3-2756508023bf`",
    "references": [
      "at://did:plc:p5xem22ammiafn5kxonaksfa/site.subgraph.media/3mlp5iyrctssw"
    ]
  },
  "description": "I got a Common turtle from Claude Code's deterministic buddy system, so I brute-forced the generation algorithm.",
  "publishedAt": "2026-04-02T13:42:40.175Z",
  "site": "at://did:plc:p5xem22ammiafn5kxonaksfa/site.standard.publication/3mlp3ywhyv2kx",
  "tags": [
    "ai",
    "claude-code",
    "reverse-engineering",
    "tools"
  ],
  "textContent": "On April 1st, 2026, Anthropic shipped a tamagotchi-style terminal pet called Buddy as an easter egg inside Claude Code. Type /buddy and a little ASCII creature hatches next to your input line. It watches your conversations, drops comments in speech bubbles, and has its own name, personality, and stats. Delightful.\n\nYour buddy is deterministic, generated from a hash of your account UUID. You don't get to pick your species, rarity, or stats. You get what you get.\n\nI got a Common turtle.\n\nBaseline stats, no hat, no shimmer. A slow, unremarkable cretin assigned to me by the cold math of a hash function. People online are showing off Legendary Shiny Dragons with maxed-out chaos stats and tiny duck hats. Something had to be done.\n\nSo I brute-forced the generation algorithm and built a tool to hunt for better seeds.\n\nThe Generation Pipeline\n\nflowchart LR A[accountUuid] --> B[\"+ salt 'friend-2026-401'\"] B --> C[Wyhash → u32] C --> D[Mulberry32 PRNG] D --> E[rarity] D --> F[species] D --> G[eyes] D --> H[hat] D --> I[shiny] D --> J[stats]\n\nThe pipeline reads oauthAccount.accountUuid from ~/.claude.json, concatenates it with the salt \"friend-2026-401\", hashes it with Wyhash (Bun.hash()) truncated to u32, seeds a Mulberry32 PRNG, and rolls traits sequentially.\n\nSame UUID in, same buddy out. Reinstalling changes nothing. Physical traits regenerate from the hash every launch. Only the name and personality persist locally.\n\nThe pipeline only cares about the UUID string. Swap it in the config for one that hashes to better traits and you get a different buddy. Auth tokens live separately, so login is unaffected.\n\nSpecies\n\n18 species, uniformly distributed. Dragons, capybaras, axolotls, ghosts, geese, etc. Assignment is purely a function of the hash.\n\nRarity\n\nWeighted probabilities with a separate shiny roll:\n\nRarityProbabilityStat FloorFeaturesCommon60%5Basic appearance, no hatUncommon25%15Unlocks hat accessoriesRare10%25More accessory optionsEpic4%35Exclusive accessories, high statsLegendary1%50Top-tier accessories, max stats\n\nEvery buddy has an independent 1% shiny chance, adding iridescent shimmer and particle effects regardless of rarity.\n\nCombined probabilities:\n\nCombinationProbabilityLegendary1/100Shiny1/100Legendary + Shiny1/10,000Specific Species + Legendary~1/1,800Specific Species + Legendary + Shiny~1/180,000\n\nAppearance\n\n6 eye styles: · ✦ × ◉ @ °\n\n8 hats, gated by rarity. Common buddies get nothing. Uncommon unlocks crowns, top hats, and propellers. Rare adds halos and wizard hats. Epic gets beanies. Legendary gets the tiny duck.\n\nStats\n\n5 attributes shape the buddy's personality and interaction style, ranked here by coding utility:\n\nRankStatWhy1DebuggingThe whole point of a buddy2WisdomPattern recognition, architecture sense3PatienceLong sessions, complex problems4ChaosCreative solutions, lateral thinking5SnarkFun but least useful\n\nA high-chaos goose with max snark will roast your bugs. A patient owl with high wisdom offers constructive advice. The species-attribute combination drives the entire interaction personality.\n\nEvery buddy has one peak attribute (highest) and one dump attribute (lowest). The rest distribute randomly. Total points scale with rarity. A Legendary buddy's dump stat is higher than a Common buddy's peak.\n\nThe formulas for a Legendary (stat floor 50):\n\nTypeFormulaRangePeakmin(100, floor(50 + 50 + rand × 30))100Normalfloor(50 + rand × 40)50–89Dumpmax(1, floor(50 − 10 + rand × 15))40–54\n\nTheoretical max BST is 421: peak at 100, three normals at 89, dump at 54. Getting there requires every random roll to land at its absolute ceiling. Three normals at 89 each need rand in [0.975, 1.0), roughly 2.5% per roll. The dump at 54 needs rand in [14/15, 1.0), about 6.7%. Combined with the 1% legendary roll and the right peak/dump assignment, the odds of a perfect 421 land around 1 in 6 billion. Within u32 space, but barely.\n\nThe ideal 421: debugging as peak (100), snark as dump (54), wisdom/patience/chaos all at 89.\n\nInteraction Model\n\nBuddies work in two modes.\n\nPassive: the buddy watches your conversation with Claude and chimes in via speech bubble at key moments. Hit a tricky bug and it might encourage you or mock you, depending on its stats.\n\nActive: mention the buddy by name and its bubble responds directly. Claude steps aside.\n\nResponse style is attribute-driven. High snark delivers witty roasts. High patience offers comfort. High chaos is unpredictable. The buddy's system prompt is injected at generation:\n\nA small {species} named {name} sits beside the user's input box and occasionally comments in a speech bubble. You're not {name} — it's a separate watcher.\n\nClaude treats the buddy as an independent entity, yielding when the user addresses it directly.\n\nThe Mulberry32 PRNG\n\nclass Mulberry32 { constructor(seed: number) { this.state = seed >>> 0; } nextU32(): number { this.state = (this.state + 0x6d2b79f5) >>> 0; let t = (this.state ^ (this.state >>> 15)) >>> 0; t = Math.imul(t, 1 | this.state) >>> 0; t = (t + (Math.imul((t ^ (t >>> 7)) >>> 0, 61 | t) >>> 0)) ^ t; return (t ^ (t >>> 14)) >>> 0; } nextF64(): number { return this.nextU32() / 4294967296; } }\n\nPure bitwise math. Millions of evaluations per second.\n\nbuddydex\n\nThree interfaces, one shared engine. A Bun workspace monorepo with a CLI, a web UI, and a Claude Code plugin.\n\nCLI\n\nRuns directly with bunx buddydex or installs globally via bun add -g buddydex.\n\nHunt for buddies matching your criteria:\n\nbuddydex hunt --species dragon --rarity legendary buddydex hunt --rarity legendary --perfect 70 buddydex hunt --shiny --tries 50000000\n\nFilters include --species, --rarity, --shiny, --min-stat chaos:90, --min-total 400, and --perfect (every stat above a threshold). Default search space is 1M UUIDs.\n\nInject a result into ~/.claude.json:\n\nbuddydex inject <seed> buddydex inject <seed> --preview\n\nFirst injection backs up the original UUID. buddydex restore reverses everything.\n\nbuddydex show # current buddy buddydex restore # restore original from backup buddydex roll <id> # preview what a UUID produces\n\nWeb UI\n\nLive at buddydex.fun. A React + Vite app with the same engine running in a Web Worker. Uses @zig-wasm/hash, the same Zig Wyhash compiled to WASM. Results are identical to the CLI.\n\nSlash Command\n\nRegistered as a Claude Code plugin:\n\nclaude plugin add github:iammatthias/buddydex\n\nAdds /reroll inside Claude Code. Claude handles argument parsing, search, result presentation, and injection within the conversation.\n\nNotes\n\nBun is required for the CLI. Bun.hash() uses Wyhash. The web UI gets the same results via @zig-wasm/hash.\n\nUUID format is enforced. The binary's UUID-to-BigInt parser crashes on non-hex input. The brute-forcer generates valid 8-4-4-4-12 format UUIDs only.\n\nAuth is orthogonal. accountUuid is read only for buddy generation. OAuth tokens handle authentication independently. Swapping the UUID affects nothing else.\n\nShared engine. The engine package is an exact port of the deobfuscated binary logic: Wyhash, Mulberry32 PRNG, rollBones, and all the constants. Every interface uses it.\n\nProject Structure\n\nBun workspace monorepo:\n\npackages/ engine/ Shared core: Wyhash, Mulberry32, rollBones, constants cli/ CLI tool: hunt, inject, restore, show, roll web/ Web UI: React + Vite + Web Worker plugin/ Claude Code integration: /reroll slash command\n\nThe best /buddy I have found so far is a Legendary Snail. It has as close as you can get to perfect stats, with the exception of shiny.\n\nbunx buddydex inject d4a815e8-f9e4-4f20-84a3-2756508023bf",
  "title": "I Got a Common Turtle"
}