| name | buddy-doctor |
| description | Diagnose and fix buddy-reroll installation issues. Use when buddy reroll doesn't work, shows errors, or the binary swap fails. Triggers on "buddy doctor", "๋ฒ๋ ์ง๋จ", "buddy fix", "๋ฒ๋ ์๋ผ", "buddy error", "reroll ์๋ฌ", "buddy setup", "์
์
". |
| allowed-tools | ["Bash","Read","Glob","AskUserQuestion"] |
buddy-doctor โ ๋ฒ๋ ๋ฆฌ๋กค ์ง๋จ ๋๊ตฌ
์ค์น ๋ฌธ์ ๋ฅผ ์ง๋จํ๊ณ ์๋ ์๋ฆฌํฉ๋๋ค.
์ง๋จ ํ๋ก์ฐ
Step 1: ํ๊ฒฝ ์ฒดํฌ (๋ชจ๋ ๋ณ๋ ฌ ์คํ)
bun --version 2>&1 || echo "BUN_MISSING"
node --version
ls -la "$HOME/.local/bin/claude.exe" 2>/dev/null || ls -la "$HOME/.local/bin/claude" 2>/dev/null || echo "NATIVE_MISSING"
npm root -g 2>/dev/null
gh auth status 2>&1 | head -3 || echo "GH_MISSING"
cat "$HOME/.claude/buddy-reroll-state.json" 2>/dev/null || echo "STATE_MISSING"
cat "$HOME/.claude/buddy-reroll-install.json" 2>/dev/null || echo "CONTEXT_MISSING"
grep -c "buddy-swap" "$HOME/.claude/settings.json" 2>/dev/null || echo "HOOK_MISSING"
ls -la "$HOME/.local/bin/claude-patched"* 2>/dev/null || echo "NO_PENDING_PATCH"
ls -la "$HOME/.local/bin/claude.exe.old" 2>/dev/null || echo "NO_OLD_BINARY"
Step 2: ๊ฒฐ๊ณผ ๋ถ์ โ AskUserQuestion
์ง๋จ ๊ฒฐ๊ณผ๋ฅผ ํ์ฑํด์ ๋ฌธ์ ๋ชฉ๋ก๊ณผ ์๋ฆฌ ์ต์
์ ์ ์:
question: "์ง๋จ ๊ฒฐ๊ณผ์
๋๋ค. ์ด๋ป๊ฒ ํ ๊น์?"
options:
- label: "์ ์ฒด ์๋ ์๋ฆฌ"
description: "๋ฐ๊ฒฌ๋ ๋ชจ๋ ๋ฌธ์ ๋ฅผ ์๋์ผ๋ก ์์ ํฉ๋๋ค"
- label: "Bun๋ง ์ค์น"
description: "Bun์ด ์์ด์ ํด์ ๊ณ์ฐ์ด ์ ๋ฉ๋๋ค"
- label: "Stop hook ์ฌ์ค์น"
description: "๋ฐ์ด๋๋ฆฌ ์ค์ ํ
์ด ์์ต๋๋ค"
- label: "๋๊ธฐ ์ค์ธ ํจ์น ๊ฐ์ ์ ์ฉ"
description: "claude-patched ํ์ผ์ด ์์ง๋ง ์ค์๋์ง ์์์ต๋๋ค"
- label: "์ํ ์ด๊ธฐํ"
description: "state/context ํ์ผ์ ๋ฆฌ์
ํฉ๋๋ค"
- label: "์ทจ์"
Step 3: ์๋ฆฌ ์คํ
์ ํ์ ๋ฐ๋ผ:
Bun ์ค์น
node ${CLAUDE_PLUGIN_ROOT}/scripts/install-hook.mjs
Stop hook ์ฌ์ค์น
node ${CLAUDE_PLUGIN_ROOT}/scripts/install-hook.mjs
๋๊ธฐ ํจ์น ๊ฐ์ ์ ์ฉ
node ${CLAUDE_PLUGIN_ROOT}/scripts/buddy-swap.mjs
์ํ ์ด๊ธฐํ
node -e "
import { writeFileSync } from 'fs';
import { resolve } from 'path';
const home = process.env.USERPROFILE || process.env.HOME;
writeFileSync(resolve(home, '.claude', 'buddy-reroll-state.json'), JSON.stringify({ rolls: [], bestRarity: 'common', eventUses: [] }, null, 2));
console.log('State reset complete');
"
์ ์ฒด ์๋ ์๋ฆฌ
์ ํญ๋ชฉ ์ค ๋ฌธ์ ๊ฐ ๋ฐ๊ฒฌ๋ ๊ฒ๋ง ์์๋๋ก ์คํ.
Step 4: ๊ฒฐ๊ณผ ๋ณด๊ณ
์๋ฆฌ ํ ๋ค์ Step 1 ์ง๋จ์ ์คํํ์ฌ ๋ชจ๋ ํญ๋ชฉ์ด ํต๊ณผํ๋์ง ํ์ธ.
ํต๊ณผ ์:
๋ชจ๋ ์ง๋จ ํต๊ณผ! buddy reroll ๋ช
๋ น์ ๋ค์ ์๋ํด ๋ณด์ธ์.
์คํจ ์:
์ผ๋ถ ํญ๋ชฉ์ด ์์ง ๋ฌธ์ ์
๋๋ค. ์๋ ์กฐ์น๊ฐ ํ์ํ ์ ์์ต๋๋ค.