From buddy-reroll
Reroll Claude Code /buddy pet. Check current buddy, brute-force search for desired species/rarity/shiny, and swap accountUuid. Triggers: buddy reroll, 换宠物, 刷宠物, reroll buddy, /buddy-reroll
How this skill is triggered — by the user, by Claude, or both
Slash command
/buddy-reroll:buddy-rerollThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Match user's language**: Respond in the same language the user uses.
Match user's language: Respond in the same language the user uses.
Claude Code 的 /buddy 宠物由 ~/.claude.json 中 oauthAccount.accountUuid 经确定性哈希生成。本 skill 通过暴力搜索 UUID 来找到产出目标宠物的 accountUuid,然后替换配置文件实现 reroll。
关键限制:必须用 bun 运行脚本(Bun.hash 与 Claude Code 内部一致),node 的 FNV-1a 结果不匹配。
~/.claude.json 是否存在且含 accountUuidbun scripts/buddy-reroll.js --check <当前accountUuid>bun scripts/buddy-reroll.js --species <x> --rarity <x> ...~/.claude.json 中的 accountUuid/buddybun scripts/buddy-reroll.js --check test 2>/dev/null && echo '{"ready":true}' || echo '{"ready":false,"hint":"需要安装 bun"}'
| 检查项 | 失败时修复 |
|---|---|
which bun 无输出 | macOS: brew install oven-sh/bun/bun;Linux: curl -fsSL https://bun.sh/install | bash |
~/.claude.json 不存在 | 请先安装并登录 Claude Code(claude 命令启动后完成 OAuth 登录即可生成) |
~/.claude.json 中无 oauthAccount.accountUuid | 未通过 OAuth 登录,执行 /login 或重新启动 Claude Code 登录 |
无需额外凭据。直接读取 ~/.claude.json。
| 依赖 | 必需 | 不可用时行为 |
|---|---|---|
| bun | 是 | 停止,提示安装 |
| ~/.claude.json | 是 | 停止,提示检查 Claude Code 安装 |
| oauthAccount | 否 | fallback 到 userID 字段 |
| 命令 | 用途 | 示例 |
|---|---|---|
--check <uid> | 查看指定 ID 产出的 buddy | bun scripts/buddy-reroll.js --check <uuid> |
--species/--rarity/... | 按条件搜索 | bun scripts/buddy-reroll.js --species dragon --rarity legendary --shiny --count 3 |
所有参数见脚本 --help。输出为 JSON(含 hint 摘要字段)。非 bun 运行时 exit 2 并输出结构化错误。
accountUuid 必须是 UUID 格式(xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx)。脚本已生成 UUID v4 格式的 uid。
替换步骤:
accountUuid 所在行如果 oauthAccount 不存在(未登录用户),改为替换 userID 字段。
[Buddy Reroll] 完成!
原始 UUID: <backup>
新 UUID: <new>
新 Buddy: <species> | <rarity> ★ | <hat> | shiny=<bool>
属性: DEBUG:<n> PAT:<n> CHAOS:<n> WIS:<n> SNARK:<n>
→ 重启 Claude Code 后输入 /buddy 查看新宠物
→ 如需回滚,将 accountUuid 改回原始值即可
| 问题 | 解决 |
|---|---|
| 替换后 Claude Code 崩溃 | accountUuid 格式不对,必须是 UUID v4 格式 |
| roll 结果与实际不符 | 必须用 bun 运行脚本,node 的哈希不匹配 |
| 搜索 legendary+shiny 很慢 | 正常,概率 0.01%,增加 --max 或放宽条件 |
| 改了没效果 | 确认改的是 oauthAccount.accountUuid 而非 userID |
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub psylch/buddy-reroll-skill --plugin buddy-reroll