webup-buddy-reroll

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Buddy Reroll

伙伴重抽

Brute-force a new
/buddy
companion by finding a userID that hashes to the desired species and rarity.
通过暴力搜索 userID 来获取指定物种和稀有度的
/buddy
伙伴。
ブルートフォースで userID を探索し、指定した種族とレアリティの
/buddy
コンパニオンを取得します。
通过暴力搜索userID来获取哈希后对应指定物种和稀有度的新
/buddy
伙伴。

How It Works / 原理 / 仕組み

工作原理

Claude Code generates companions deterministically:
hash(userID + SALT)
mulberry32
PRNG → rarity, species, eyes, hat, shiny. Same userID = same companion, always.
Claude Code 通过确定性算法生成伙伴:
hash(userID + SALT)
mulberry32
PRNG → 稀有度、物种、眼睛、帽子、闪光。相同 userID 始终生成相同伙伴。
Claude Code はコンパニオンを決定論的に生成します:
hash(userID + SALT)
mulberry32
PRNG → レアリティ、種族、目、帽子、シャイニー。同じ userID は常に同じコンパニオンになります。
To reroll: replace
userID
in
~/.claude.json
, clear
companion
field, restart.
重新抽取:替换
~/.claude.json
中的
userID
,清除
companion
字段,重启即可。
リロール方法:
~/.claude.json
userID
を置換し、
companion
フィールドをクリアして再起動。
Critical: Claude Code is Bun-bundled, so
Bun.hash()
(xxHash64) is the correct hash function. Node.js FNV-1a produces wrong results — the script MUST run under Bun.
Claude Code通过确定性算法生成伙伴:
hash(userID + SALT)
mulberry32
PRNG → 稀有度、物种、眼睛、帽子、闪光。相同userID始终会生成完全相同的伙伴。
重抽方法:替换
~/.claude.json
中的
userID
,清除
companion
字段,重启Claude Code即可。
重要提示:Claude Code是使用Bun打包的,因此
Bun.hash()
(xxHash64)是正确的哈希函数。使用Node.js的FNV-1a会生成错误结果,脚本必须在Bun环境下运行。

Script Directory

脚本目录

Important: All scripts are located in the
scripts/
subdirectory of this skill.
Agent Execution Instructions:
  1. Determine this SKILL.md file's directory path as
    SKILL_DIR
  2. Script path =
    ${SKILL_DIR}/scripts/<script-name>.mjs
  3. Replace all
    ${SKILL_DIR}
    in this document with the actual path
Script Reference:
ScriptPurpose
scripts/reroll.mjs
Brute-force target species+rarity, optionally apply to config
注意:所有脚本都存放在本技能的
scripts/
子目录下。
Agent执行说明:
  1. 将本SKILL.md文件的目录路径设为
    SKILL_DIR
  2. 脚本路径 =
    ${SKILL_DIR}/scripts/<脚本名称>.mjs
  3. 将本文档中所有
    ${SKILL_DIR}
    替换为实际路径
脚本参考:
脚本用途
scripts/reroll.mjs
暴力搜索目标物种+稀有度的userID,可选择直接应用到配置

Prerequisites / 前提条件 / 前提条件

前提条件

  • Claude Code >= 2.1.89 — the
    /buddy
    system was introduced in this version. The script auto-checks and exits if the version is too old.
  • Bun — required for correct hashing. Use
    npx -y bun
    if not installed globally.
  • API users only — This skill does NOT work for Pro/Max Plan subscribers whose
    userID
    is locked to their account. It only works for API users whose
    userID
    in
    ~/.claude.json
    can be freely replaced.
  • Claude Code >= 2.1.89
    /buddy
    系统从此版本引入。脚本会自动检测版本,过低则退出。
  • Bun — 正确哈希所需。未全局安装时可用
    npx -y bun
  • 仅限 API 用户 — 本技能不适用于 Pro/Max 订阅用户(其
    userID
    绑定账户,无法替换)。仅适用于 API 用户,其
    ~/.claude.json
    中的
    userID
    可自由替换。
  • Claude Code >= 2.1.89
    /buddy
    システムはこのバージョンで導入。スクリプトが自動でバージョンチェックします。
  • Bun — 正しいハッシュに必要。グローバル未インストールなら
    npx -y bun
    を使用。
  • API ユーザー限定 — Pro/Max プランのサブスクライバーは
    userID
    がアカウントに紐付けられているため、このスキルは動作しません。
    ~/.claude.json
    userID
    を自由に変更できる API ユーザーのみ対象です。
  • Claude Code >= 2.1.89
    /buddy
    系统从该版本开始引入。脚本会自动检测版本,版本过低则自动退出。
  • Bun — 生成正确哈希的必需依赖。如果没有全局安装,可使用
    npx -y bun
    运行。
  • 仅限API用户 — 本技能不适用于Pro/Max订阅用户,这类用户的
    userID
    与账号绑定无法替换。仅适用于可自由修改
    ~/.claude.json
    userID
    的API用户。

Usage

使用方法

bash
undefined
bash
undefined

Direct (if bun is installed globally)

直接运行(如果已全局安装bun)

bun ${SKILL_DIR}/scripts/reroll.mjs --species dragon --rarity legendary --apply
bun ${SKILL_DIR}/scripts/reroll.mjs --species dragon --rarity legendary --apply

Via npx (works even without global bun install)

通过npx运行(即使未全局安装bun也可使用)

npx -y bun ${SKILL_DIR}/scripts/reroll.mjs --species dragon --rarity legendary --apply
undefined
npx -y bun ${SKILL_DIR}/scripts/reroll.mjs --species dragon --rarity legendary --apply
undefined

Options

可选参数

FlagDefaultDescription
--species <name>
dragon
Target species (see list below)
--rarity <level>
legendary
Minimum rarity: common / uncommon / rare / epic / legendary
--max <n>
1000000
Max brute-force iterations
--apply
offAuto-write result to
~/.claude.json
and clear companion
参数默认值说明
--species <名称>
dragon
目标物种(可参考下方列表)
--rarity <等级>
legendary
最低稀有度:common / uncommon / rare / epic / legendary
--max <次数>
1000000
最大暴力搜索迭代次数
--apply
关闭自动将结果写入
~/.claude.json
并清除companion字段

Species (18)

物种列表(共18种)

duckgooseblobcatdragonoctopus
owlpenguinturtlesnailghostaxolotl
capybaracactusrobotrabbitmushroomchonk
duckgooseblobcatdragonoctopus
owlpenguinturtlesnailghostaxolotl
capybaracactusrobotrabbitmushroomchonk

Rarity Tiers

稀有度等级

RarityStarsChance~Iterations to find
common60%~30
uncommon★★25%~72
rare★★★10%~180
epic★★★★4%~450
legendary★★★★★1%~1800
稀有度星级概率预期搜索迭代次数
common60%~30
uncommon★★25%~72
rare★★★10%~180
epic★★★★4%~450
legendary★★★★★1%~1800

Invocation / 调用方式 / 呼び出し方法

调用方式

This skill can be invoked with or without arguments:
  • No args (
    /webup-buddy-reroll
    ): Prompts the user to choose species and rarity interactively via
    AskUserQuestion
    before running.
  • With args (
    /webup-buddy-reroll dragon legendary
    ): Skips the prompt and locks the choice to the given species and rarity directly.
本技能支持有参数和无参数两种调用方式:
  • 无参数 (
    /webup-buddy-reroll
    ):运行前通过
    AskUserQuestion
    交互式提示用户选择物种和稀有度。
  • 有参数 (
    /webup-buddy-reroll dragon legendary
    ):跳过提示,直接使用指定的物种和稀有度。
引数あり・なし両方で呼び出せます:
  • 引数なし (
    /webup-buddy-reroll
    ):実行前に
    AskUserQuestion
    で種族とレアリティを対話的に選択。
  • 引数あり (
    /webup-buddy-reroll dragon legendary
    ):プロンプトをスキップし、指定した種族とレアリティで直接実行。
本技能支持带参数和不带参数两种调用方式:
  • 无参数 (
    /webup-buddy-reroll
    ):运行前通过
    AskUserQuestion
    交互式提示用户选择物种和稀有度。
  • 带参数 (
    /webup-buddy-reroll dragon legendary
    ):跳过提示,直接使用指定的物种和稀有度运行。

Workflow

工作流程

  1. If no args provided: Use
    AskUserQuestion
    to ask the user to pick a species AND a rarity in a single prompt (two questions):
    • Species question: Present 4 popular options (dragon, cat, axolotl, capybara) as choices. Each option's
      description
      should list the remaining species so the user knows what's available via "Other", e.g. the first option's description: "Or type any of: duck, goose, blob, octopus, owl, penguin, turtle, snail, ghost, cactus, robot, rabbit, mushroom, chonk".
    • Rarity question: Present all 5 tiers (legendary as first/recommended, then epic, rare, uncommon, common).
    • Do NOT skip this step. Always ask even if the user mentioned a species — confirm their choice.
    If args provided: Parse
    <species>
    and
    <rarity>
    from the args. Skip the prompt and proceed directly.
  2. Run the script with
    --apply
    :
    bash
    npx -y bun ${SKILL_DIR}/scripts/reroll.mjs --species <choice> --rarity <choice> --apply
  3. Tell user to restart Claude Code and run
    /buddy
    to hatch the new companion. 告知用户重启 Claude Code 并运行
    /buddy
    来孵化新伙伴。 ユーザーに Claude Code を再起動して
    /buddy
    で新しいコンパニオンを孵化するよう伝える。
  1. 如果未提供参数:使用
    AskUserQuestion
    在同一次提示中向用户询问要选择的物种和稀有度(两个问题):
    • 物种选择问题:提供4个热门选项(dragon、cat、axolotl、capybara)作为选择,每个选项的描述需要列出剩余可选物种,方便用户了解“其他”选项可输入的内容,例如第一个选项的描述可以是:“也可输入以下任意物种:duck, goose, blob, octopus, owl, penguin, turtle, snail, ghost, cactus, robot, rabbit, mushroom, chonk”。
    • 稀有度选择问题:展示全部5个等级(传说级作为首选项/推荐项,然后依次是史诗、稀有、uncommon、普通)。
    • 不要跳过此步骤,即使用户已经提到了想要的物种,也需要确认用户的选择。
    如果提供了参数:从参数中解析
    <species>
    <rarity>
    ,跳过提示直接进入下一步。
  2. --apply
    参数运行脚本:
    bash
    npx -y bun ${SKILL_DIR}/scripts/reroll.mjs --species <用户选择的物种> --rarity <用户选择的稀有度> --apply
  3. 告知用户重启Claude Code并运行
    /buddy
    即可孵化新伙伴。

Manual Apply / 手动应用 / 手動適用

手动应用方法

If
--apply
was not used:
  1. Copy the output userID
  2. Edit
    ~/.claude.json
    : replace
    "userID"
    value, set
    "companion": null
  3. Restart Claude Code →
    /buddy
未使用
--apply
时:
  1. 复制输出的 userID
  2. 编辑
    ~/.claude.json
    :替换
    "userID"
    值,设置
    "companion": null
  3. 重启 Claude Code →
    /buddy
--apply
を使わなかった場合:
  1. 出力された userID をコピー
  2. ~/.claude.json
    を編集:
    "userID"
    の値を置換、
    "companion": null
    に設定
  3. Claude Code を再起動 →
    /buddy
如果没有使用
--apply
参数,可按以下步骤手动操作:
  1. 复制脚本输出的userID
  2. 编辑
    ~/.claude.json
    :替换
    "userID"
    的值,设置
    "companion": null
  3. 重启Claude Code → 运行
    /buddy

Notes / 备注 / 注意事項

注意事项

  • userID
    only affects telemetry bucketing and buddy seed — no impact on conversations, API keys, or local config
  • SALT is
    friend-2026-401
    (Claude Code 2.1.89). Update the script if a future version changes it
  • 1M iterations finds legendary in seconds on modern hardware
  • userID
    仅影响遥测分组和伙伴种子 — 不影响对话、API 密钥或本地配置
  • SALT 为
    friend-2026-401
    (Claude Code 2.1.89)。若未来版本更改,需更新脚本
  • 100 万次迭代在现代硬件上几秒即可找到传说级
  • userID
    はテレメトリのバケット分けとバディシードにのみ影響 — 会話、APIキー、ローカル設定には無関係
  • SALT は
    friend-2026-401
    (Claude Code 2.1.89)。将来バージョンで変更された場合はスクリプトを更新
  • 100万回の反復でもレジェンダリーは数秒で見つかります
  • userID
    仅影响遥测分组和伙伴生成种子,不会对对话、API密钥或本地配置产生任何影响
  • SALT值为
    friend-2026-401
    (适用于Claude Code 2.1.89版本),如果未来版本修改了该值,需要更新对应脚本
  • 在现代硬件上,100万次迭代仅需几秒即可找到传说级伙伴