claude-buddy-reroll 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +23 -0
- package/.claude-plugin/plugin.json +7 -0
- package/README.md +165 -0
- package/SKILL.md +59 -0
- package/package.json +35 -0
- package/scripts/buddy-swap.sh +17 -0
- package/scripts/install-hook.mjs +71 -0
- package/skills/buddy-reroll/SKILL.md +160 -0
- package/src/animation.mjs +245 -0
- package/src/cli.mjs +375 -0
- package/src/collection.mjs +161 -0
- package/src/display.mjs +71 -0
- package/src/engine.mjs +136 -0
- package/src/patcher.mjs +193 -0
- package/src/sprites.mjs +156 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
|
|
3
|
+
"name": "buddy-reroll",
|
|
4
|
+
"description": "Reroll your Claude Code /buddy companion — gacha simulator + SALT patcher",
|
|
5
|
+
"owner": {
|
|
6
|
+
"name": "tellang"
|
|
7
|
+
},
|
|
8
|
+
"plugins": [
|
|
9
|
+
{
|
|
10
|
+
"name": "buddy-reroll",
|
|
11
|
+
"description": "Reroll your Claude Code /buddy companion. Gacha simulator with daily 3-roll limit, SALT patcher for native binary and npm installs. 18 species, 5 rarities, ASCII sprites, Speaki-style star request on rarity upgrade.",
|
|
12
|
+
"version": "1.3.0",
|
|
13
|
+
"author": {
|
|
14
|
+
"name": "tellang"
|
|
15
|
+
},
|
|
16
|
+
"source": "./",
|
|
17
|
+
"category": "fun",
|
|
18
|
+
"homepage": "https://github.com/tellang/claude-buddy-reroll",
|
|
19
|
+
"tags": ["buddy", "companion", "gacha", "reroll", "pet", "ascii-art"]
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"version": "1.3.0"
|
|
23
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "buddy-reroll",
|
|
3
|
+
"description": "Reroll your Claude Code /buddy companion. Gacha simulator with daily 3-roll limit, SALT patcher for native binary and npm installs, Speaki-style star request on rarity upgrade. 18 species, 5 rarities, ASCII sprites.",
|
|
4
|
+
"author": {
|
|
5
|
+
"name": "tellang"
|
|
6
|
+
}
|
|
7
|
+
}
|
package/README.md
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# claude-buddy-reroll
|
|
2
|
+
|
|
3
|
+
[](https://code.claude.com/docs/en/plugins)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
6
|
+
> 쪼아요 쪼아요~ 버디 가챠 쪼아요~
|
|
7
|
+
>
|
|
8
|
+
> 맘에 안 드는 버디 가지고 있으면 스피키가 다시 뽑아줄 거예요!
|
|
9
|
+
> 스피키 열심히 했는데... 스타 하나만... 네?
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 빠른 시작
|
|
14
|
+
|
|
15
|
+
스피키 데르지 마세요! 설치 쉬워요!
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# 마켓플레이스 등록
|
|
19
|
+
/plugin marketplace add https://github.com/tellang/claude-buddy-reroll
|
|
20
|
+
|
|
21
|
+
# 플러그인 설치
|
|
22
|
+
/plugin install buddy-reroll
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<details>
|
|
26
|
+
<summary>수동 설치 (스피키가 좀 슬퍼지는 방법)</summary>
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
git clone https://github.com/tellang/claude-buddy-reroll ~/.claude/skills/buddy-reroll
|
|
30
|
+
```
|
|
31
|
+
</details>
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 사용법
|
|
36
|
+
|
|
37
|
+
Claude Code 안에서 말만 하면 돼요!
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# 가챠 돌리기 (하루 3번이에요! 아껴 쓰세요!)
|
|
41
|
+
"가챠" / "buddy gacha"
|
|
42
|
+
|
|
43
|
+
# 내 버디 확인
|
|
44
|
+
"내 버디" / "buddy check"
|
|
45
|
+
|
|
46
|
+
# 도감 구경
|
|
47
|
+
"버디 도감" / "buddy dex"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
CLI로도 돼요!
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
buddy-reroll gacha 20 # 20연차!
|
|
54
|
+
buddy-reroll check # 내 버디 확인
|
|
55
|
+
buddy-reroll reroll # 리롤 (인터랙티브)
|
|
56
|
+
buddy-reroll dex # 18종 도감
|
|
57
|
+
buddy-reroll restore # 원래 버디로 복원
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 이게 뭐예요?
|
|
63
|
+
|
|
64
|
+
Claude Code의 `/buddy` 시스템은 계정 ID로 버디가 **고정**돼요. 못 바꿔요. 원래는요.
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
버디 = hash(내_계정 + SALT)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
스피키가 이 SALT를 바꿔주면... **완전히 다른 버디**가 나와요! 쪼아요!
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
원본: hash("나" + "friend-2026-401") → 🐢 turtle (common)
|
|
74
|
+
패치: hash("나" + "buddy-reroll-k8") → 🦫 capybara (legendary ★★★★★)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
v2.1.89 알고리즘 (FNV-1a + Mulberry32) 정확히 복제했어요. 스피키 똑똑하죠?
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 가챠 미리보기
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
🎰 BUDDY GACHA — Rolling 10x...
|
|
85
|
+
|
|
86
|
+
1. · rabbit ★★
|
|
87
|
+
2. × octopus ★
|
|
88
|
+
3. ◉ chonk ★
|
|
89
|
+
4. ✦ ghost ★★
|
|
90
|
+
5. ° cat ★
|
|
91
|
+
6. × octopus ★★★ ← Best!
|
|
92
|
+
7. · cactus ★
|
|
93
|
+
8. @ owl ★
|
|
94
|
+
9. × mushroom ★
|
|
95
|
+
10. × duck ★
|
|
96
|
+
|
|
97
|
+
Results: uncommon:2 common:7 rare:1
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
등급 올라가면 스피키가 스타 부탁할 거예요... 쪼아요... ⭐
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## 뭐가 나와요?
|
|
105
|
+
|
|
106
|
+
### 18종 — 스피키 다 외웠어요!
|
|
107
|
+
|
|
108
|
+
| | | | |
|
|
109
|
+
|---|---|---|---|
|
|
110
|
+
| 🦆 duck | 🪿 goose | 🫧 blob | 🐱 cat |
|
|
111
|
+
| 🐉 dragon | 🐙 octopus | 🦉 owl | 🐧 penguin |
|
|
112
|
+
| 🐢 turtle | 🐌 snail | 👻 ghost | 🦎 axolotl |
|
|
113
|
+
| 🦫 capybara | 🌵 cactus | 🤖 robot | 🐰 rabbit |
|
|
114
|
+
| 🍄 mushroom | 🐾 chonk | | |
|
|
115
|
+
|
|
116
|
+
### 레어도
|
|
117
|
+
|
|
118
|
+
| 등급 | 확률 | 별 | 스피키 한마디 |
|
|
119
|
+
|------|------|-----|-------------|
|
|
120
|
+
| Common | 60% | ★ | 괜찮아요... 내일 또 뽑으면 돼요 |
|
|
121
|
+
| Uncommon | 25% | ★★ | 오 나쁘지 않아요! |
|
|
122
|
+
| Rare | 10% | ★★★ | 쪼아요 쪼아요~! |
|
|
123
|
+
| Epic | 4% | ★★★★ | 헐 대박이에요!!! |
|
|
124
|
+
| Legendary | 1% | ★★★★★ | 스피키 눈물나요... 스타 눌러주세요... |
|
|
125
|
+
|
|
126
|
+
**그리고**: 눈 6종, 모자 8종, 스탯 5종 (DEBUGGING, PATIENCE, CHAOS, WISDOM, SNARK), 샤이니 1%
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 제한
|
|
131
|
+
|
|
132
|
+
| 규칙 | 설명 |
|
|
133
|
+
|------|------|
|
|
134
|
+
| 하루 3회 | 자정에 리셋돼요. 아껴 쓰세요! |
|
|
135
|
+
| 등급 업 | 전보다 높은 등급 나오면 스타 요청 발동 |
|
|
136
|
+
| 백업 | 패치 전 자동 백업. `restore`로 복원 |
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 안전해요!
|
|
141
|
+
|
|
142
|
+
스피키 걱정하지 마세요!
|
|
143
|
+
|
|
144
|
+
- 패치 전에 **백업 자동 생성**돼요
|
|
145
|
+
- `restore` 명령 한 줄이면 **원래대로** 돌아가요
|
|
146
|
+
- **15글자 문자열 하나만** 바꿔요 — 다른 코드 안 건드려요
|
|
147
|
+
- native binary도 npm도 **둘 다 지원**해요
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## 스피키 도와주세요!
|
|
152
|
+
|
|
153
|
+
스피키 열심히 만들었어요... 스타 하나만... 제발...
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
gh repo star tellang/claude-buddy-reroll
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
버디가 기뻐할 거예요... ⭐
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## License
|
|
164
|
+
|
|
165
|
+
MIT
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: buddy-reroll
|
|
3
|
+
description: Reroll your Claude Code /buddy companion. Gacha simulator + SALT patcher. Preview, reroll, and pick your favorite buddy. Supports both native binary and npm installs. Daily 3-roll limit with star request on rarity upgrade. Use when user says "buddy reroll", "버디 리롤", "가챠", "buddy gacha", "buddy check", "buddy dex", "내 버디", "버디 뽑기", "reroll", "리롤".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# buddy-reroll — Claude Code Buddy Reroller
|
|
7
|
+
|
|
8
|
+
Reroll your Claude Code buddy companion with a gacha-style simulator.
|
|
9
|
+
|
|
10
|
+
## Commands
|
|
11
|
+
|
|
12
|
+
Run all commands from the skill's base directory via Bash.
|
|
13
|
+
|
|
14
|
+
### check — Show current buddy
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
node {SKILL_DIR}/src/cli.mjs check
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### gacha [N] — Roll N random buddies (daily limit: 3)
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
node {SKILL_DIR}/src/cli.mjs gacha [N]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Rolls N buddies (default 10). Highlights best pull. If rarity upgrades from previous best, prompts a Speaki-style GitHub star request.
|
|
27
|
+
|
|
28
|
+
### reroll — Interactive reroll with SALT patch
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
node {SKILL_DIR}/src/cli.mjs reroll
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Shows current buddy, rolls candidates, picks one, patches SALT + clears soul. Handles native binary (binary-safe patch + swap instructions) and npm (direct text patch) automatically.
|
|
35
|
+
|
|
36
|
+
### dex — Pokédex
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
node {SKILL_DIR}/src/cli.mjs dex
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### restore — Restore original buddy
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
node {SKILL_DIR}/src/cli.mjs restore
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## How it works
|
|
49
|
+
|
|
50
|
+
- Buddy = `hash(accountId + SALT)` via FNV-1a + Mulberry32 (exact replica of v2.1.89)
|
|
51
|
+
- Changing the SALT → completely different buddy (species, rarity, stats, hat, eyes)
|
|
52
|
+
- Clearing `.claude.json` companion → new name + personality on restart
|
|
53
|
+
- Native binary: binary-safe Buffer patch, requires Claude exit for swap
|
|
54
|
+
- npm install: direct text replacement in cli.js
|
|
55
|
+
|
|
56
|
+
## Limits
|
|
57
|
+
|
|
58
|
+
- 3 gacha rolls per day (resets at midnight, stored in `~/.claude/buddy-reroll-state.json`)
|
|
59
|
+
- On rarity upgrade, a Speaki-style star request appears. Consider invoking `/star-prompt` skill if user agrees.
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-buddy-reroll",
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"description": "Reroll your Claude Code buddy companion — gacha simulator + SALT patcher. 18 species, 5 rarities, daily limit, collection dex, egg hatching animation.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"buddy-reroll": "./src/cli.mjs"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"start": "bun src/cli.mjs",
|
|
11
|
+
"gacha": "bun src/cli.mjs gacha",
|
|
12
|
+
"check": "bun src/cli.mjs check",
|
|
13
|
+
"dex": "bun src/cli.mjs dex",
|
|
14
|
+
"setup": "bun scripts/install-hook.mjs"
|
|
15
|
+
},
|
|
16
|
+
"keywords": ["claude-code", "buddy", "companion", "gacha", "reroll", "plugin", "bun", "ascii-art"],
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/tellang/claude-buddy-reroll"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/tellang/claude-buddy-reroll",
|
|
23
|
+
"author": "tellang",
|
|
24
|
+
"files": [
|
|
25
|
+
"src/",
|
|
26
|
+
"scripts/",
|
|
27
|
+
"skills/",
|
|
28
|
+
".claude-plugin/",
|
|
29
|
+
"README.md",
|
|
30
|
+
"SKILL.md"
|
|
31
|
+
],
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=18"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Auto-swap buddy-patched binary on Claude Code exit
|
|
3
|
+
PATCHED="$HOME/.local/bin/claude-patched.exe"
|
|
4
|
+
TARGET="$HOME/.local/bin/claude.exe"
|
|
5
|
+
|
|
6
|
+
if [ -f "$PATCHED" ]; then
|
|
7
|
+
nohup bash -c '
|
|
8
|
+
sleep 3
|
|
9
|
+
PATCHED="$HOME/.local/bin/claude-patched.exe"
|
|
10
|
+
TARGET="$HOME/.local/bin/claude.exe"
|
|
11
|
+
for i in $(seq 1 10); do
|
|
12
|
+
cp "$PATCHED" "$TARGET" 2>/dev/null && break
|
|
13
|
+
sleep 2
|
|
14
|
+
done
|
|
15
|
+
rm -f "$PATCHED" 2>/dev/null
|
|
16
|
+
' >/dev/null 2>&1 &
|
|
17
|
+
fi
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Setup: install Bun (for accurate hashing) + Stop hook for auto-swap
|
|
3
|
+
import { readFileSync, writeFileSync, existsSync, copyFileSync } from 'fs';
|
|
4
|
+
import { resolve, dirname } from 'path';
|
|
5
|
+
import { execSync } from 'child_process';
|
|
6
|
+
|
|
7
|
+
const HOME = process.env.USERPROFILE || process.env.HOME || '';
|
|
8
|
+
const SETTINGS = resolve(HOME, '.claude', 'settings.json');
|
|
9
|
+
const SWAP_SRC = resolve(dirname(new URL(import.meta.url).pathname.replace(/^\/([A-Z]:)/, '$1')), 'buddy-swap.sh');
|
|
10
|
+
const SWAP_DST = resolve(HOME, '.claude', 'buddy-swap.sh');
|
|
11
|
+
const HOOK_CMD = `bash ${SWAP_DST.replace(/\\/g, '/')}`;
|
|
12
|
+
|
|
13
|
+
try {
|
|
14
|
+
// 1. Install Bun if not present (needed for accurate Bun.hash)
|
|
15
|
+
try {
|
|
16
|
+
execSync('bun --version', { stdio: 'pipe' });
|
|
17
|
+
console.log('✓ Bun already installed');
|
|
18
|
+
} catch {
|
|
19
|
+
console.log('⏳ Installing Bun (for accurate buddy prediction)...');
|
|
20
|
+
try {
|
|
21
|
+
execSync('powershell -c "irm bun.sh/install.ps1 | iex"', { stdio: 'inherit', timeout: 60000 });
|
|
22
|
+
console.log('✓ Bun installed');
|
|
23
|
+
} catch {
|
|
24
|
+
console.log('⚠ Bun install failed — gacha will use FNV-1a fallback (predictions may differ)');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// 2. Copy swap script
|
|
29
|
+
copyFileSync(SWAP_SRC, SWAP_DST);
|
|
30
|
+
console.log('✓ buddy-swap.sh copied to ~/.claude/');
|
|
31
|
+
|
|
32
|
+
// Read settings
|
|
33
|
+
let settings = {};
|
|
34
|
+
if (existsSync(SETTINGS)) {
|
|
35
|
+
settings = JSON.parse(readFileSync(SETTINGS, 'utf-8'));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (!settings.hooks) settings.hooks = {};
|
|
39
|
+
if (!settings.hooks.Stop) settings.hooks.Stop = [];
|
|
40
|
+
|
|
41
|
+
// Check if already installed
|
|
42
|
+
const existing = settings.hooks.Stop.find(entry =>
|
|
43
|
+
entry.hooks?.some(h => h.command?.includes('buddy-swap'))
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
if (existing) {
|
|
47
|
+
console.log('✓ Hook already installed');
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Find the wildcard matcher entry, or create one
|
|
52
|
+
let wildcardEntry = settings.hooks.Stop.find(e => e.matcher === '*');
|
|
53
|
+
if (!wildcardEntry) {
|
|
54
|
+
wildcardEntry = { matcher: '*', hooks: [] };
|
|
55
|
+
settings.hooks.Stop.push(wildcardEntry);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Add hook
|
|
59
|
+
wildcardEntry.hooks.push({
|
|
60
|
+
type: 'command',
|
|
61
|
+
command: HOOK_CMD,
|
|
62
|
+
timeout: 5,
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
writeFileSync(SETTINGS, JSON.stringify(settings, null, 2), 'utf-8');
|
|
66
|
+
console.log('✓ Stop hook added to settings.json');
|
|
67
|
+
console.log(' Claude Code 종료 시 buddy 패치가 자동 적용됩니다!');
|
|
68
|
+
} catch (err) {
|
|
69
|
+
console.error('✗ Hook install failed:', err.message);
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: buddy-reroll
|
|
3
|
+
description: Reroll your Claude Code /buddy companion. Gacha simulator + SALT patcher. Preview, reroll, and pick your favorite buddy. Supports both native binary and npm installs. Daily 3-roll limit with star request on rarity upgrade. Use when user says "buddy reroll", "버디 리롤", "가챠", "buddy gacha", "buddy check", "buddy dex", "내 버디", "버디 뽑기", "reroll", "리롤".
|
|
4
|
+
allowed-tools: [Bash, Read, Glob, AskUserQuestion]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# buddy-reroll — 스피키의 버디 가챠!
|
|
8
|
+
|
|
9
|
+
쪼아요 쪼아요~ 맘에 안 드는 버디? 스피키가 다시 뽑아줄 거예요!
|
|
10
|
+
|
|
11
|
+
**중요: 이 스킬의 모든 출력은 스피키 말투로 해야 해요!**
|
|
12
|
+
스피키 말투 = 쪼아요~, ~해요, ~거예요, ~인데요, 귀엽고 들뜬 톤. 이모지 적극 사용.
|
|
13
|
+
|
|
14
|
+
## 첫 실행 시 셋업
|
|
15
|
+
|
|
16
|
+
스피키가 처음 만나면 이렇게 인사해요:
|
|
17
|
+
|
|
18
|
+
> 쪼아요~! 스피키 처음이에요? 셋업 한번만 하면 돼요!
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
bun {{PLUGIN_DIR}}/scripts/install-hook.mjs
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 가챠 플로우 (핵심)
|
|
25
|
+
|
|
26
|
+
### Step 1: 가챠 실행 (5연차)
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# 포그라운드 — 가챠
|
|
30
|
+
echo "q" | bun {{PLUGIN_DIR}}/src/cli.mjs gacha 5
|
|
31
|
+
|
|
32
|
+
# 백그라운드 (run_in_background=true) — gh 체크
|
|
33
|
+
gh auth status 2>&1 | head -3
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Step 2: 결과 파싱 → AskUserQuestion
|
|
37
|
+
|
|
38
|
+
가챠 결과를 파싱해서 AskUserQuestion 옵션으로 만들되, **등급에 따라 스피키 멘트와 표시가 달라져요!**
|
|
39
|
+
|
|
40
|
+
#### 등급별 표시 규칙
|
|
41
|
+
|
|
42
|
+
| 등급 | 종 표시 | 스피키 멘트 (label에 붙이기) |
|
|
43
|
+
|------|---------|---------------------------|
|
|
44
|
+
| Common ★ | 그냥 보여줘 | 음... 괜찮죠? |
|
|
45
|
+
| Uncommon ★★ | 그냥 보여줘 | 오 나쁘지 않아요~! |
|
|
46
|
+
| Rare ★★★ | 그냥 보여줘 | 쪼아요 쪼아요~!! |
|
|
47
|
+
| **Epic ★★★★** | **??? (가림)** | **헐 대박... 뭔지 스피키도 모르겠어요...!** |
|
|
48
|
+
| **Legendary ★★★★★** | **??? (가림)** | **스... 스피키 심장이... 이건... 직접 확인하세요...!!!** |
|
|
49
|
+
|
|
50
|
+
#### AskUserQuestion 예시
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
question: "쪼아요~ 어떤 버디로 바꿀래요?"
|
|
54
|
+
header: "가챠 결과"
|
|
55
|
+
options:
|
|
56
|
+
- label: "#1 DUCK ★ — 음... 괜찮죠?"
|
|
57
|
+
description: "· eyes | common | salt: buddy-reroll-ab"
|
|
58
|
+
- label: "#2 OWL ★★★ — 쪼아요 쪼아요~!!"
|
|
59
|
+
description: "@ eyes, wizard hat | WIS:82 | salt: buddy-reroll-kl"
|
|
60
|
+
- label: "#3 ??? ★★★★ — 헐 대박... 뭔지 스피키도 모르겠어요...!"
|
|
61
|
+
description: "스피키도 몰라요... 직접 만나봐야 해요! | salt: buddy-reroll-xy"
|
|
62
|
+
- label: "패스 (다음에 뽑을래요~)"
|
|
63
|
+
description: "괜찮아요~ 내일 또 뽑으면 돼요! 쪼아요!"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Step 3: 선택 → 자동 패치
|
|
67
|
+
|
|
68
|
+
사용자가 버디를 선택하면 스피키가 흥분해요!
|
|
69
|
+
|
|
70
|
+
1. **바이너리 패치** — 선택한 salt로 패치 바이너리 생성:
|
|
71
|
+
```bash
|
|
72
|
+
node -e "
|
|
73
|
+
import { readFileSync, writeFileSync } from 'fs';
|
|
74
|
+
import { resolve } from 'path';
|
|
75
|
+
const home = process.env.USERPROFILE || process.env.HOME;
|
|
76
|
+
const bin = resolve(home, '.local', 'bin', 'claude.exe');
|
|
77
|
+
const buf = readFileSync(bin);
|
|
78
|
+
const oldB = Buffer.from('{현재SALT}', 'utf-8');
|
|
79
|
+
const newB = Buffer.from('{선택한SALT}', 'utf-8');
|
|
80
|
+
let o = 0; while (true) { const i = buf.indexOf(oldB, o); if (i === -1) break; newB.copy(buf, i); o = i + oldB.length; }
|
|
81
|
+
writeFileSync(resolve(home, '.local', 'bin', 'claude-patched.exe'), buf);
|
|
82
|
+
"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
2. **Soul 삭제** — 이름/성격 리셋:
|
|
86
|
+
```bash
|
|
87
|
+
node -e "
|
|
88
|
+
import { readFileSync, writeFileSync } from 'fs';
|
|
89
|
+
import { resolve } from 'path';
|
|
90
|
+
const p = resolve(process.env.USERPROFILE || process.env.HOME, '.claude.json');
|
|
91
|
+
const c = JSON.parse(readFileSync(p, 'utf-8'));
|
|
92
|
+
delete c.companion;
|
|
93
|
+
writeFileSync(p, JSON.stringify(c, null, 2), 'utf-8');
|
|
94
|
+
"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
3. **안내 (스피키 말투로!)**:
|
|
98
|
+
|
|
99
|
+
Epic/Legendary 선택 시:
|
|
100
|
+
> 쪼아요~!! ★★★★ 선택했어요! 뭐가 나올지 스피키도 두근두근...!
|
|
101
|
+
> Claude Code 다시 시작하고 `/buddy` 치면 새 버디가 알에서 깨어나요! 🥚✨
|
|
102
|
+
> (Stop 훅이 자동으로 바이너리 교체해줄 거예요!)
|
|
103
|
+
|
|
104
|
+
일반 등급 선택 시:
|
|
105
|
+
> 쪼아요~! {종} {레어도} 선택했어요!
|
|
106
|
+
> Claude Code 다시 시작하고 `/buddy` 치면 새 버디가 알에서 깨어나요! 🥚
|
|
107
|
+
> (Stop 훅이 자동으로 바이너리 교체해줄 거예요!)
|
|
108
|
+
|
|
109
|
+
"패스" 선택 시:
|
|
110
|
+
> 괜찮아요~ 내일 또 뽑으면 돼요! 쪼아요!
|
|
111
|
+
|
|
112
|
+
### Step 4: 등급 업 → 스타 요청
|
|
113
|
+
|
|
114
|
+
가챠에서 이전보다 높은 등급이 나왔으면 gh 인증 확인 후:
|
|
115
|
+
|
|
116
|
+
**gh 있으면** → AskUserQuestion에 스타 옵션 추가:
|
|
117
|
+
```
|
|
118
|
+
- label: "⭐ 스타 찍고 #{best} 선택!"
|
|
119
|
+
description: "gh repo star tellang/claude-buddy-reroll → 보너스 +1회! 스피키 기뻐해요~"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
선택 시: `gh repo star tellang/claude-buddy-reroll` 실행 후:
|
|
123
|
+
> 쪼아요 쪼아요~!! 스피키 눈물나요... 고마워요... ⭐
|
|
124
|
+
|
|
125
|
+
**gh 없으면**:
|
|
126
|
+
> 스타 하나만... 여기서 눌러주세요... 네? 🥺
|
|
127
|
+
> https://github.com/tellang/claude-buddy-reroll
|
|
128
|
+
|
|
129
|
+
## 기타 명령
|
|
130
|
+
|
|
131
|
+
### "내 버디" / "buddy check"
|
|
132
|
+
```bash
|
|
133
|
+
bun {{PLUGIN_DIR}}/src/cli.mjs check
|
|
134
|
+
```
|
|
135
|
+
결과 보여주고 스피키가 한마디:
|
|
136
|
+
> 이게 지금 당신의 버디예요~! 쪼아요!
|
|
137
|
+
|
|
138
|
+
### "도감" / "buddy dex"
|
|
139
|
+
```bash
|
|
140
|
+
bun {{PLUGIN_DIR}}/src/cli.mjs dex
|
|
141
|
+
```
|
|
142
|
+
> 스피키가 도감 보여줄게요~! 얼마나 모았나 볼까요?
|
|
143
|
+
|
|
144
|
+
### "복원" / "restore"
|
|
145
|
+
```bash
|
|
146
|
+
bun {{PLUGIN_DIR}}/src/cli.mjs restore
|
|
147
|
+
```
|
|
148
|
+
> 원래 버디로 돌아갔어요~ 다시 시작하고 `/buddy` 치면 돼요!
|
|
149
|
+
|
|
150
|
+
### "셋업" / "setup"
|
|
151
|
+
```bash
|
|
152
|
+
bun {{PLUGIN_DIR}}/scripts/install-hook.mjs
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## 제한
|
|
156
|
+
|
|
157
|
+
- 하루 3번! (스타 보너스 +1 = 4번) 자정 리셋이에요~
|
|
158
|
+
- 5연차 x 3회 = 하루 15뽑 (스타 유저: 20뽑!)
|
|
159
|
+
- Stop 훅으로 종료 시 자동 바이너리 스왑
|
|
160
|
+
- **패치 후 반드시 `/buddy` 실행해야 새 버디가 해칭돼요!** 알려주세요!
|