claude-token-saver 2.9.1 → 2.9.3
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/README.en.md +7 -0
- package/README.md +7 -0
- package/bin/cli.js +18 -6
- package/package.json +1 -1
- package/src/installer.js +20 -1
package/README.en.md
CHANGED
|
@@ -191,6 +191,13 @@ Node.js ≥ 18 · macOS / Windows / Linux / WSL · zero dependencies.
|
|
|
191
191
|
|
|
192
192
|
## Release notes
|
|
193
193
|
|
|
194
|
+
### v2.9.3 (2026-04-27)
|
|
195
|
+
- Skill body (`SKILL.md`) now instructs Claude to respond in the user's configured output language. Previously even when the CLI was on `mode ko`, Claude itself still narrated the answer in English ("All clear — no warnings…"), so the language toggle felt half-applied.
|
|
196
|
+
- `installSkill` now auto-updates the on-disk `SKILL.md` whenever the bundled body differs, so upgrades pick up new instructions without `--force`.
|
|
197
|
+
|
|
198
|
+
### v2.9.2 (2026-04-27)
|
|
199
|
+
- `last` / `history` empty-state messages now respect the language setting too. Previously they were hard-coded English, so users on `mode ko` still saw English when there were no warnings to report.
|
|
200
|
+
|
|
194
201
|
### v2.9.1 (2026-04-27)
|
|
195
202
|
- Fix the README statusline sample so it matches actual output (includes the `✦ current` / `📅 weekly` window segments that were missing).
|
|
196
203
|
- Add a 4-step "When a warning chip appears" Skill workflow — spot the chip → mention its wording to Claude → Skill runs `last` → apply remediation.
|
package/README.md
CHANGED
|
@@ -151,6 +151,13 @@ Node.js ≥ 18 · macOS / Linux / Windows / WSL · 의존성 0.
|
|
|
151
151
|
|
|
152
152
|
## 릴리스 노트
|
|
153
153
|
|
|
154
|
+
### v2.9.3 (2026-04-27)
|
|
155
|
+
- Skill 본문(`SKILL.md`)에 "사용자 설정 언어로 응답" 지시 추가. 이전엔 Skill이 호출돼도 Claude가 영어로 요약을 생성하는 탓에 `mode ko` 상태에서도 영문 답이 나왔습니다 (`All clear - no warnings...` 같은 문구).
|
|
156
|
+
- `installSkill`이 번들된 SKILL.md와 디스크의 내용이 다르면 자동 갱신하도록 변경 (`--force` 없이도 업그레이드 시 새 지시가 적용됨).
|
|
157
|
+
|
|
158
|
+
### v2.9.2 (2026-04-27)
|
|
159
|
+
- `last`/`history`가 경고 없을 때 출력하는 안내 문구도 언어 설정을 따르도록 수정 (이전엔 항상 영문 출력 → 한국어 모드인데도 영문이 보이는 버그).
|
|
160
|
+
|
|
154
161
|
### v2.9.1 (2026-04-27)
|
|
155
162
|
- README의 statusline 예시를 실제 출력(`✦ current` / `📅 weekly` 윈도 세그먼트 포함)으로 정정.
|
|
156
163
|
- "경고 칩이 떴을 때" Skill 워크플로 4단계 가이드 추가 — 칩 발견 → Claude에게 칩 문구 그대로 말하기 → Skill이 `last` 실행 → 처방 적용.
|
package/bin/cli.js
CHANGED
|
@@ -236,8 +236,13 @@ async function main() {
|
|
|
236
236
|
const recent = readRecent(days);
|
|
237
237
|
const latest = findLatestWarning(recent, CHIP_TO_CODES);
|
|
238
238
|
if (!latest) {
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
if (lang === 'ko') {
|
|
240
|
+
console.log(`최근 ${days}일 내 경고가 없습니다.`);
|
|
241
|
+
console.log(`(히스토리 디렉터리: ${historyDir()})`);
|
|
242
|
+
} else {
|
|
243
|
+
console.log(`No warnings in the last ${days} day${days === 1 ? '' : 's'}.`);
|
|
244
|
+
console.log(`(History dir: ${historyDir()})`);
|
|
245
|
+
}
|
|
241
246
|
return;
|
|
242
247
|
}
|
|
243
248
|
// Header
|
|
@@ -303,18 +308,25 @@ async function main() {
|
|
|
303
308
|
if (hasFlag('--list')) {
|
|
304
309
|
const dates = listDates();
|
|
305
310
|
if (dates.length === 0) {
|
|
306
|
-
console.log(
|
|
311
|
+
console.log(lang === 'ko'
|
|
312
|
+
? `히스토리가 아직 없습니다. 파일은 다음 위치에 생성됩니다: ${historyDir()}`
|
|
313
|
+
: `No history yet. Files will appear under: ${historyDir()}`);
|
|
307
314
|
return;
|
|
308
315
|
}
|
|
309
|
-
console.log(`History (${historyDir()}):`);
|
|
316
|
+
console.log(lang === 'ko' ? `히스토리 (${historyDir()}):` : `History (${historyDir()}):`);
|
|
310
317
|
for (const d of dates) console.log(` ${d}`);
|
|
311
318
|
return;
|
|
312
319
|
}
|
|
313
320
|
const days = parseFloat(getArg('--days') || '7');
|
|
314
321
|
const recent = readRecent(days);
|
|
315
322
|
if (recent.length === 0) {
|
|
316
|
-
|
|
317
|
-
|
|
323
|
+
if (lang === 'ko') {
|
|
324
|
+
console.log(`최근 ${days}일 내 경고 히스토리가 없습니다.`);
|
|
325
|
+
console.log(`(파일이 생성될 위치: ${historyDir()})`);
|
|
326
|
+
} else {
|
|
327
|
+
console.log(`No warning history in the last ${days} day${days === 1 ? '' : 's'}.`);
|
|
328
|
+
console.log(`(Files would be written to: ${historyDir()})`);
|
|
329
|
+
}
|
|
318
330
|
return;
|
|
319
331
|
}
|
|
320
332
|
for (const { content } of recent) {
|
package/package.json
CHANGED
package/src/installer.js
CHANGED
|
@@ -31,6 +31,18 @@ This skill helps users interpret and act on the \`claude-token-saver\` statuslin
|
|
|
31
31
|
in Claude Code. The statusline updates every ~1s and shows cache health, TTL
|
|
32
32
|
countdown, savings, and (when relevant) a leading warning chip.
|
|
33
33
|
|
|
34
|
+
## Response language
|
|
35
|
+
|
|
36
|
+
Respond in the user's configured output language. Run
|
|
37
|
+
\`claude-token-saver mode\` once at the start of the session and read the
|
|
38
|
+
\`Output language\` field — if it shows \`language: ko\`, write **all of your
|
|
39
|
+
prose to the user in Korean** (summary, "All clear" status lines, headings,
|
|
40
|
+
recommendations). If it shows \`language: en\` (the default), write in
|
|
41
|
+
English. Tool output (the body of \`last\`/\`history\`/the table report) is
|
|
42
|
+
already localized by the CLI — do not retranslate it; just mirror your
|
|
43
|
+
own narration to match. If the user asks for a different language inline,
|
|
44
|
+
honor that for the rest of the turn without changing the saved setting.
|
|
45
|
+
|
|
34
46
|
## When this skill should activate
|
|
35
47
|
|
|
36
48
|
- The user references any chip wording: \`🚨 5H NN%\`, \`🚨 7D NN%\`,
|
|
@@ -118,7 +130,14 @@ export function installSkill({ force = false } = {}) {
|
|
|
118
130
|
const dir = join(claudeUserDir(), 'skills', 'claude-token-saver');
|
|
119
131
|
const file = join(dir, 'SKILL.md');
|
|
120
132
|
mkdirSync(dir, { recursive: true });
|
|
121
|
-
|
|
133
|
+
// SKILL.md is fully package-controlled — overwrite whenever the bundled
|
|
134
|
+
// body differs from what's on disk so postinstall picks up new instructions
|
|
135
|
+
// (e.g. the response-language directive added in v2.9.3) without forcing
|
|
136
|
+
// users to re-run \`install --force\`.
|
|
137
|
+
if (existsSync(file) && readFileSync(file, 'utf8') === SKILL_BODY) {
|
|
138
|
+
return { path: file, action: 'exists' };
|
|
139
|
+
}
|
|
140
|
+
return writeIfNeeded(file, SKILL_BODY, true);
|
|
122
141
|
}
|
|
123
142
|
|
|
124
143
|
// Removes the legacy /token-monitor slash command from prior versions.
|