feat: /tkm:language skill — 한국어 ↔ 영어 토글#2
Conversation
현재 언어를 확인하고 AskUserQuestion으로 한국어/영어를 인터랙티브하게 전환하는 스킬. config set language en/ko 커맨드 래핑. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ThunderConch
left a comment
There was a problem hiding this comment.
Code Review: /tkm:language skill
전반적으로 스킬 구조와 흐름은 잘 짜여져 있습니다. 몇 가지 수정 부탁드립니다.
Critical — SKILL.md 언어 컨벤션 위반
기존 5개 스킬(tkm, doctor, setup, reset, uninstall) 모두 영어 기반으로 작성되어 있는데, 이 PR만 전체가 한국어입니다. 프로젝트 원칙상 SKILL.md는 영어 기반으로 작성하고, 한국어는 UX 메시지나 고유명사 등 필요한 곳에만 사용해야 합니다.
- headings, 설명 prose, step 제목 → 영어로 전환
- Step 2의 사용자 대면 프롬프트 문자열은 한국어 유지 OK
Important — config 파일 미존재 시 에러 처리
Step 1에서 readFileSync로 config를 직접 읽는데, ~/.claude/tokenmon/config.json이 없으면 크래시합니다. doctor 스킬처럼 파일 존재 여부 가드를 추가하거나, try/catch로 감싸서 기본값(ko)을 반환하도록 해주세요.
Important — "Keep" 선택 시 흐름 누락
Step 2에서 [Switch] [Keep] 선택지를 제공하지만, "Keep" 선택 시 어떻게 해야 하는지 명시가 없습니다. reset 스킬의 Cancel 처리처럼, 언어 유지 안내 후 종료하는 흐름을 추가해주세요.
Suggestion — frontmatter description 컨벤션
현재: "Tokenmon 언어 전환. 한국어 ↔ 영어 토글. Korean: ..."
권장: "Tokenmon language toggle. Switch between Korean and English. Korean: 언어, 영어, 한국어, 언어 변경, 언어 전환"
다른 스킬처럼 영어 설명 먼저, Korean: 키워드 섹션은 뒤에 배치해주세요.
수고하셨습니다 🙂
- 모든 heading/prose 영어로 전환 (다른 스킬 컨벤션 통일) - frontmatter description: 영어 설명 먼저, Korean: 키워드 뒤에 배치 - Step 1: config 파일 없을 경우 try/catch로 기본값 ko 반환 - Step 3b: Keep 선택 시 명시적 종료 흐름 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| @@ -0,0 +1,52 @@ | |||
| --- | |||
There was a problem hiding this comment.
Code review
Found 4 issues:
- Step 1 hardcodes config path, ignoring
CLAUDE_CONFIG_DIR—src/core/paths.tsdefinesCLAUDE_DIR = process.env.CLAUDE_CONFIG_DIR ?? join(homedir(), '.claude'), but Step 1 always reads~/.claude/tokenmon/config.json. If a user hasCLAUDE_CONFIG_DIRset, this reads the wrong file and shows incorrect current language before the toggle.
Lines 13 to 20 in 57ccfd9
- Step 1 uses raw
node -einstead of CLI — All other skills route config access through the CLI (tokenmon.ts), which runsreadConfig()→migrateConfig(). The inlinenode -escript bypasses migration logic that converts legacy Korean-named party/region data to IDs. Consider adding aconfig getsubcommand or at minimum respectingCLAUDE_CONFIG_DIR.
Lines 13 to 20 in 57ccfd9
- Step 3b "Keep" flow is underspecified — Step 2 provides explicit bilingual message templates for both
koanden, but Step 3b only says "inform them that the language remains unchanged and exit" with no concrete message. Other skills likereset/SKILL.mdspecify exact message templates for cancel paths. This will produce inconsistent behavior across invocations.
Lines 50 to 52 in 57ccfd9
AskUserQuestionnot used for Step 2 interactive prompt —reset/SKILL.mdandsetup/SKILL.mdexplicitly useAskUserQuestionwhen presenting choices to the user. Step 2 presents[Switch] [Keep]options without mentioningAskUserQuestion, deviating from the established skill pattern.
Lines 24 to 31 in 57ccfd9
🤖 Generated with Claude Code
- If this code review was useful, please react with 👍. Otherwise, react with 👎.
- Step 1: CLAUDE_CONFIG_DIR 환경변수 우선 사용하도록 node -e 수정 - Step 2: AskUserQuestion 도구 사용 명시 - Step 3b: Keep 선택 시 언어별 구체적 메시지 템플릿 지정 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ThunderConch
left a comment
There was a problem hiding this comment.
모든 피드백 반영 확인 완료. CLAUDE_CONFIG_DIR 존중, AskUserQuestion 명시, Keep 메시지 템플릿 추가. LGTM.
- Move readCodexTotalTokens() inside withLockRetry to fix TOCTOU (concurrency #3) - Codex-only turns: award Codex XP even when Claude deltaTokens <= 0 (gen-addition #1) - Advance checkpoint by consumed tokens only, retain sub-threshold remainder (gen-addition #2) - Skip Claude XP (floor/rest bonus) on Codex-only turns to prevent false awards - Log one-time warning when node:sqlite unavailable (stability #5) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move readCodexTotalTokens() inside withLockRetry to fix TOCTOU (concurrency #3) - Codex-only turns: award Codex XP even when Claude deltaTokens <= 0 (gen-addition #1) - Advance checkpoint by consumed tokens only, retain sub-threshold remainder (gen-addition #2) - Skip Claude XP (floor/rest bonus) on Codex-only turns to prevent false awards - Log one-time warning when node:sqlite unavailable (stability #5) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
skills/language/디렉토리에 새 스킬 추가/tkm:language실행 시 현재 언어를 감지하고AskUserQuestion으로 토글config set language en/koCLI를 래핑한 인터랙티브 UXHow it works
~/.claude/tokenmon/config.json에서 현재language값 읽기tokenmon config set language <en|ko>실행tokenmon status로 변경 결과 확인Test
🤖 Generated with Claude Code