claude-token-saver 3.19.0 โ 3.20.1
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 +35 -22
- package/README.md +35 -22
- package/package.json +1 -1
- package/src/formatters/statusline.js +4 -3
package/README.en.md
CHANGED
|
@@ -4,54 +4,64 @@
|
|
|
4
4
|
|
|
5
5
|
# claude-token-saver
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Moves the easy work your expensive model keeps repeating onto cheaper ones, and shows what that actually saved โ measured, in your statusline.** Zero dependencies, one-line install.
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
```bash
|
|
12
|
+
npm i -g claude-token-saver
|
|
13
|
+
```
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
## Three parts, working together
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
| | What it does | Effect |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| ๐ **Routing** | Delegates recurring easy work to cheaper models | Savings recorded per run in a ledger |
|
|
20
|
+
| ๐
ท **Harness** | Blocks the token-burning habits: unevidenced "done", skipped verification (5 principles) | **โ18.6% cost** ([measured](#real-world-impact--beforeafter-report)) |
|
|
21
|
+
| โ๏ธ **Ratchet** | Freezes each error you hit into a rule | Same mistake stops recurring |
|
|
22
|
+
|
|
23
|
+
One install sets up all three. The measured โ18.6% comes from the harness and ratchet; routing savings sit on top of it.
|
|
16
24
|
|
|
17
|
-
|
|
18
|
-
- **after** โ the model that actually ran it
|
|
19
|
-
- **the gap** โ the same token counts priced against both
|
|
25
|
+
## ๐ The savings figure is a ledger entry, not an estimate
|
|
20
26
|
|
|
21
|
-
|
|
27
|
+
Every delegated run is recorded like this:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
before after gap
|
|
31
|
+
claude-opus-5 โ haiku-4-5 = $0.57
|
|
32
|
+
(the model (what (same token counts,
|
|
33
|
+
handling this actually priced against
|
|
34
|
+
before the rule) ran it) both models)
|
|
35
|
+
```
|
|
22
36
|
|
|
23
37
|
```bash
|
|
24
|
-
$ claude-token-saver route-scan savings
|
|
38
|
+
$ claude-token-saver route-scan savings # trace every dollar back to its rule
|
|
25
39
|
|
|
26
40
|
๐ Routing saved, lifetime $2.09 (last 7d $1.40 ยท 30d $2.09)
|
|
27
41
|
|
|
28
42
|
By model change:
|
|
29
|
-
claude-fable-5 โ claude-sonnet-5
|
|
30
|
-
claude-opus-5 โ claude-haiku-4-5
|
|
43
|
+
claude-fable-5 โ claude-sonnet-5 โ 1 run, $0.72
|
|
44
|
+
claude-opus-5 โ claude-haiku-4-5 โ 1 run, $0.57
|
|
31
45
|
|
|
32
46
|
By run (newest first):
|
|
33
47
|
2026-08-22 $0.51 claude-fable-5 โ claude-haiku-4-5
|
|
34
48
|
rule: T2|paste|-Users-me-projects-my-app
|
|
35
49
|
```
|
|
36
50
|
|
|
37
|
-
**
|
|
51
|
+
**What is excluded** โ an honest number beats a big one:
|
|
38
52
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
```
|
|
53
|
+
- Delegations no registered rule covers (`Explore`, your own agents, plugin subagents): this tool did not route them.
|
|
54
|
+
- Model ids the pricing table cannot recognize: the run is dropped rather than priced wrong.
|
|
42
55
|
|
|
43
56
|
---
|
|
44
57
|
|
|
45
|
-
## โก
|
|
58
|
+
## โก What else the statusline catches
|
|
46
59
|
|
|
47
60
|
| | |
|
|
48
61
|
|---|---|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
| ๐จ **No surprise rate limits** | Instant warning when the 5H/7D window hits 90% + `handoff` to back up your work |
|
|
53
|
-
| ๐ง **Cache waste detection** | Hit rate, TTL countdown, 1M-context detection โ token spikes diagnosed with issue codes |
|
|
54
|
-
| ๐
ท **Stop repeating mistakes** | Recurring errors get promoted to ratchet rules โ auto-applied from the next session |
|
|
62
|
+
| ๐จ **No surprise rate limits** | Warns when the 5H/7D window hits 90%; `handoff` backs up your work |
|
|
63
|
+
| ๐ง **Cache waste detection** | Hit rate, TTL, 1M-context detection โ spikes diagnosed with issue codes |
|
|
64
|
+
| ๐ฐ๐ท **Korean writing guidance** | Enabled automatically on a Korean locale ([below](#-korean-writing-guidance)) |
|
|
55
65
|
|
|
56
66
|
## Not a router โ 60 seconds
|
|
57
67
|
|
|
@@ -369,6 +379,9 @@ Also update `statusLine.command` in `~/.claude/settings.json` to `claude-token-s
|
|
|
369
379
|
|
|
370
380
|
## Release notes
|
|
371
381
|
|
|
382
|
+
### v3.20.0 (2026-08-22)
|
|
383
|
+
- **The README opening is now scannable** โ prose replaced by a one-line summary, the screenshot, and the install command up top. The three parts (routing, harness, ratchet) are a table; how a saving is computed (before โ after โ gap) is a diagram. The old 30-second pitch table, which repeated all of it, now lists only what the statusline additionally catches.
|
|
384
|
+
|
|
372
385
|
### v3.19.0 (2026-08-22)
|
|
373
386
|
- **Korean writing guidance** โ corrects how Claude writes Korean (dropped sentence parts, noun-stopped sentences, translationese, em-dash overuse), injected once per session. Claude Code's output styles occupy a single global slot and must be configured per machine; this ships the guidance in the package and delivers it through the SessionStart hook already installed, so it **applies in every project and leaves the output-style slot free.** Text vendored from [fluent-korean](https://github.com/snflkd/fluent-korean) (Copyright (c) 2026 snflkd, MIT), license included.
|
|
374
387
|
- **Decided at install time** โ a Korean system locale turns it on; anything else leaves it off. Your own on/off choice is preserved, so upgrades never override it. Skip with `CTS_NO_KOREAN=1`; a `๊ฐ` chip shows in the statusline when active.
|
package/README.md
CHANGED
|
@@ -4,54 +4,64 @@
|
|
|
4
4
|
|
|
5
5
|
# claude-token-saver
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**๋น์ผ ๋ชจ๋ธ์ด ๋ฐ๋ณตํ๋ ์ฌ์ด ์์
์ ์ผ ๋ชจ๋ธ๋ก ๋ด๋ ค๋ณด๋ด๊ณ , ๊ทธ๋ ๊ฒ ์๋ ๊ธ์ก์ statusline์ ์ค์ธก์ผ๋ก ๋ณด์ฌ ์ค๋๋ค.** ์์กด์ฑ 0, ์ค์น ํ ์ค.
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
```bash
|
|
12
|
+
npm i -g claude-token-saver
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## ์ธ ๊ฐ์ง๊ฐ ํจ๊ป ๋์๊ฐ๋๋ค
|
|
16
|
+
|
|
17
|
+
| | ํ๋ ์ผ | ํจ๊ณผ |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| ๐ **๋ผ์ฐํ
** | ๋ฐ๋ณต๋๋ ์ฌ์ด ์์
์ ๋ ์ผ ๋ชจ๋ธ์ ์์ | ์ ๊ฐ์ก์ ์์ฅ์ ์ค์ธก ๊ธฐ๋ก |
|
|
20
|
+
| ๐
ท **Harness** | ์ฆ๊ฑฐ ์๋ ์๋ฃ ๋ณด๊ณ ยท๊ฒ์ฆ ์๋ต ์ฐจ๋จ (5์์น) | **๋น์ฉ โ18.6%** ([์ค์ธก](#์ค์ -ํจ๊ณผ-๋์
-์ ํ-๋ฆฌํฌํธ)) |
|
|
21
|
+
| โ๏ธ **Ratchet** | ํ ๋ฒ ๊ฒช์ ์๋ฌ๋ฅผ ๋ฃฐ๋ก ๊ณ ์ | ๊ฐ์ ์ค์ ์ฌ๋ฐ ์ฐจ๋จ |
|
|
12
22
|
|
|
13
|
-
|
|
23
|
+
์ค์น ํ ๋ฒ์ด๋ฉด ์
๋ค ์ ์ฉ๋ฉ๋๋ค. ์ค์ธก โ18.6%๋ Harness์ ratchet์ ๋ชซ์ด๊ณ , ๋ผ์ฐํ
์ ๊ฐ์ก์ ๊ทธ ์์ ์นํ๋๋ค.
|
|
14
24
|
|
|
15
|
-
|
|
25
|
+
## ๐ ์ ๊ฐ์ก์ ์ถ์ ์ด ์๋๋ผ ์์ฅ ๊ธฐ๋ก์
๋๋ค
|
|
16
26
|
|
|
17
|
-
|
|
18
|
-
- **์คํ ๋ชจ๋ธ(after):** ๊ทธ ์์
์ ์ค์ ๋ก ์ฒ๋ฆฌํ ๋ชจ๋ธ์
๋๋ค.
|
|
19
|
-
- **์ฐจ์ก:** ๋์ผํ ํ ํฐ๋์ ๋ ๋ชจ๋ธ์ ๊ฐ๊ฒฉํ๋ฅผ ๊ฐ๊ฐ ์ ์ฉํด ๊ณ์ฐํ ๊ฐ์
๋๋ค.
|
|
27
|
+
์์๋ ์คํ ํ๋ํ๋๋ฅผ ์ด๋ ๊ฒ ๊ธฐ๋กํฉ๋๋ค.
|
|
20
28
|
|
|
21
|
-
|
|
29
|
+
```
|
|
30
|
+
๊ธฐ์ค ๋ชจ๋ธ ์คํ ๋ชจ๋ธ ์ฐจ์ก
|
|
31
|
+
claude-opus-5 โ haiku-4-5 = $0.57
|
|
32
|
+
(๋ฃฐ ์น๊ฒฉ ์ (์ค์ ๋ก (๊ฐ์ ํ ํฐ๋์
|
|
33
|
+
์ด ์ ํ์ ์ฒ๋ฆฌํ ๋ ๋ชจ๋ธ ๊ฐ๊ฒฉํ๋ฅผ
|
|
34
|
+
์ฒ๋ฆฌํ๋ ๋ชจ๋ธ) ๋ชจ๋ธ) ๊ฐ๊ฐ ์ ์ฉ)
|
|
35
|
+
```
|
|
22
36
|
|
|
23
37
|
```bash
|
|
24
|
-
$ claude-token-saver route-scan savings
|
|
38
|
+
$ claude-token-saver route-scan savings # ๋ชจ๋ ๊ธ์ก์ ๋ฃฐ ๋จ์๊น์ง ์ญ์ถ์
|
|
25
39
|
|
|
26
40
|
๐ ๋ผ์ฐํ
์ ๊ฐ ๋์ $2.09 (์ต๊ทผ 7์ผ $1.40 ยท 30์ผ $2.09)
|
|
27
41
|
|
|
28
42
|
๋ชจ๋ธ ์ด๋๋ณ:
|
|
29
|
-
claude-fable-5 โ claude-sonnet-5
|
|
30
|
-
claude-opus-5 โ claude-haiku-4-5
|
|
43
|
+
claude-fable-5 โ claude-sonnet-5 โ 1ํ, $0.72
|
|
44
|
+
claude-opus-5 โ claude-haiku-4-5 โ 1ํ, $0.57
|
|
31
45
|
|
|
32
46
|
์คํ๋ณ (์ต๊ทผ์):
|
|
33
47
|
2026-08-22 $0.51 claude-fable-5 โ claude-haiku-4-5
|
|
34
48
|
๋ฃฐ: T2|paste|-Users-me-projects-my-app
|
|
35
49
|
```
|
|
36
50
|
|
|
37
|
-
|
|
51
|
+
**์ง๊ณ์์ ๋นผ๋ ๊ฒ๋ค** โ ์ ์งํ ์ซ์๊ฐ ์์ ์ซ์๋ณด๋ค ๋ซ๊ธฐ ๋๋ฌธ์
๋๋ค.
|
|
38
52
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
```
|
|
53
|
+
- ๋ฑ๋ก๋ ๋ฃฐ์ด ๋ด๋นํ์ง ์๋ ์์(`Explore`, ์ง์ ๋ง๋ ์์ด์ ํธ, ํ๋ฌ๊ทธ์ธ ์์ด์ ํธ): ์ด ๋๊ตฌ๊ฐ ๋ผ์ฐํ
ํ ๊ฒฐ๊ณผ๊ฐ ์๋๋๋ค.
|
|
54
|
+
- ๊ฐ๊ฒฉํ๊ฐ ์ธ์ํ์ง ๋ชปํ๋ ๋ชจ๋ธ๋ช
: ํ๋ฆฐ ๊ธ์ก์ ์ฐ๋๋ ๊ทธ ์คํ์ ๋บ๋๋ค.
|
|
42
55
|
|
|
43
56
|
---
|
|
44
57
|
|
|
45
|
-
## โก
|
|
58
|
+
## โก ๊ทธ ๋ฐ์ statusline์ด ์ก์ ์ฃผ๋ ๊ฒ
|
|
46
59
|
|
|
47
60
|
| | |
|
|
48
61
|
|---|---|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
| ๐จ **ํ๋ ์ด๊ณผ ์๋ฐฉ** | 5์๊ฐยท7์ผ rate-limit ์๋๊ฐ 90%์ ๋๋ฌํ๋ฉด ์ฆ์ ๊ฒฝ๊ณ ํ๊ณ , `handoff`๋ก ์งํ ์ค์ธ ์์
์ ๋ฐฑ์
ํฉ๋๋ค |
|
|
53
|
-
| ๐ง **์บ์ ๋ญ๋น ๊ฐ์ง** | ํํธ์จ๊ณผ TTL ์นด์ดํธ๋ค์ด, 1M ์ปจํ
์คํธ ์ฌ์ฉ ์ฌ๋ถ๋ฅผ ์๋์ผ๋ก ๊ฐ์งํด ํ ํฐ์ด ๊ธ์ฆํ ์์ธ์ ์ฝ๋๋ก ์ง๋จํฉ๋๋ค |
|
|
54
|
-
| ๐
ท **๊ฐ์ ์ค์ ์ฐจ๋จ** | ๋ฐ๋ณต๋๋ ์๋ฌ๋ฅผ ๊ฐ์งํด ratchet ๋ฃฐ๋ก ์น๊ฒฉํ๊ณ , ๋ค์ ์ธ์
๋ถํฐ ์๋์ผ๋ก ์ ์ฉํฉ๋๋ค |
|
|
62
|
+
| ๐จ **ํ๋ ์ด๊ณผ ์๋ฐฉ** | 5์๊ฐยท7์ผ rate-limit ์๋๊ฐ 90%์ ๋ฟ์ผ๋ฉด ๊ฒฝ๊ณ ํ๊ณ , `handoff`๋ก ์์
์ ๋ฐฑ์
ํฉ๋๋ค |
|
|
63
|
+
| ๐ง **์บ์ ๋ญ๋น ๊ฐ์ง** | ํํธ์จยทTTLยท1M ์ปจํ
์คํธ๋ฅผ ๊ฐ์งํด ํ ํฐ ๊ธ์ฆ ์์ธ์ ์ฝ๋๋ก ์ง๋จํฉ๋๋ค |
|
|
64
|
+
| ๐ฐ๐ท **ํ๊ตญ์ด ๋ฌธ์ฒด ๊ต์ ** | ํ๊ตญ์ด ํ๊ฒฝ์ด๋ฉด ์๋์ผ๋ก ์ผ์ง๋๋ค ([์๋](#-ํ๊ตญ์ด-๋ฌธ์ฒด-์ง์นจ)) |
|
|
55
65
|
|
|
56
66
|
## ๋ผ์ฐํฐ๊ฐ ์๋๋๋ค: 60์ด ์ค๋ช
|
|
57
67
|
|
|
@@ -335,6 +345,9 @@ npm uninstall -g claude-cache-monitor && npm i -g claude-token-saver
|
|
|
335
345
|
|
|
336
346
|
## ๋ฆด๋ฆฌ์ค ๋
ธํธ
|
|
337
347
|
|
|
348
|
+
### v3.20.0 (2026-08-22)
|
|
349
|
+
- **README ์ฒซ ํ๋ฉด์ ํ์ด ์ฝ์ ์ ์๊ฒ ๋ค์ ์งฐ์ต๋๋ค** โ ์ค๋ช
๋ฌธ๋จ์ ๊ฑท์ด๋ด๊ณ ํ ์ค ์์ฝ, ์คํฌ๋ฆฐ์ท, ์ค์น ๋ช
๋ น์ ์์ ๋์์ต๋๋ค. ๋ผ์ฐํ
ยทHarnessยทratchet ์ธ ๊ธฐ๋ฅ์ ํ๋ก, ์ ๊ฐ์ก ๊ณ์ฐ ๋ฐฉ์(๊ธฐ์ค ๋ชจ๋ธ โ ์คํ ๋ชจ๋ธ โ ์ฐจ์ก)์ ๋์์ผ๋ก ๋ฐ๊ฟจ์ต๋๋ค. ๋ค์์ ๊ฐ์ ๋ด์ฉ์ ๋ฐ๋ณตํ๋ "30์ด ์์ฝ" ํ๋ statusline์ด ์ถ๊ฐ๋ก ์ก์ ์ฃผ๋ ํญ๋ชฉ๋ง ๋จ๊ฒจ ์ ๋ฆฌํ์ต๋๋ค.
|
|
350
|
+
|
|
338
351
|
### v3.19.0 (2026-08-22)
|
|
339
352
|
- **ํ๊ตญ์ด ๋ฌธ์ฒด ์ง์นจ ๊ธฐ๋ฅ์ ์ถ๊ฐํ์ต๋๋ค** โ Claude๊ฐ ํ๊ตญ์ด๋ฅผ ์ธ ๋ ๋ํ๋๋ ๋ฌธ์ฒด ๊ฒฐํจ(๋ฌธ์ฅ ์ฑ๋ถ ์๋ต, ๋ช
์ฌํ ์ข
๊ฒฐ, ๋ฒ์ญ์ฒด, ์ ๋์ ๋จ์ฉ)์ ๊ต์ ํ๋ ์ง์นจ์ ์ธ์
์์ ์ ํ ๋ฒ ์ฃผ์
ํฉ๋๋ค. Claude Code์ output style์ ์ ์ญ ์ฌ๋กฏ ํ๋๋ฅผ ์ฐจ์งํ๊ณ ๋จธ์ ๋ง๋ค ์ค์ ํด์ผ ํ์ง๋ง, ์ด ๊ธฐ๋ฅ์ ์ง์นจ์ ํจํค์ง์ ๋ด๊ณ ์ด๋ฏธ ์ค์น๋ SessionStart ํ
์ผ๋ก ์ ๋ฌํ๋ฏ๋ก **CLI๊ฐ ์ค์น๋ ๋ชจ๋ ํ๋ก์ ํธ์ ์ ์ฉ๋๋ฉฐ output style ์ฌ๋กฏ์ ๋น์ ๋ก๋๋ค.** ์ง์นจ ์๋ฌธ์ [fluent-korean](https://github.com/snflkd/fluent-korean)(Copyright (c) 2026 snflkd, MIT)์์ ๊ฐ์ ธ์๊ณ ๋ผ์ด์ ์ค ์ ๋ฌธ์ ํจ๊ป ๋ฐฐํฌํฉ๋๋ค.
|
|
340
353
|
- **์ค์น์ ๋์์ ๊ฒฐ์ ๋ฉ๋๋ค** โ ์์คํ
๋ก์บ์ด ํ๊ตญ์ด์ด๋ฉด ์ค์น ์ ์๋์ผ๋ก ์ผ์ง๊ณ , ์๋๋ฉด ๊บผ ๋ก๋๋ค. ์ง์ ์ผ๊ฑฐ๋ ๋ ๋ค์๋ ๊ทธ ์ ํ์ ์ ์งํ๋ฏ๋ก ์
๋ฐ์ดํธ๊ฐ ์ฌ์ฉ์์ ๊ฒฐ์ ์ ๋๋๋ฆฌ์ง ์์ต๋๋ค. `CTS_NO_KOREAN=1`๋ก ๊ฑด๋๋ธ ์ ์๊ณ , ์ผ์ ธ ์์ผ๋ฉด statusline์ `๊ฐ` ์นฉ์ด ํ์๋ฉ๋๋ค.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-token-saver",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.20.1",
|
|
4
4
|
"description": "Route the easy work your expensive Claude model keeps repeating down to haiku/sonnet โ post-hoc session analysis, no realtime router, no extra LLM calls.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -145,11 +145,12 @@ export function pickCapWarn(caps) {
|
|
|
145
145
|
function buildKoreanSeg(c, isIcon, verbose) {
|
|
146
146
|
try {
|
|
147
147
|
if (!koreanStyleEnabled()) return null;
|
|
148
|
-
// Deliberately quiet (gray, one
|
|
148
|
+
// Deliberately quiet (gray, one glyph): this is a "yes, it is on"
|
|
149
149
|
// confirmation, not a warning. Without it a silently-failed hook looks
|
|
150
150
|
// exactly like a working one, because the style only shows up when the
|
|
151
|
-
// model happens to write Korean.
|
|
152
|
-
|
|
151
|
+
// model happens to write Korean. The icon says "writing guidance", not
|
|
152
|
+
// "Korean" โ the verbose label already carries the language.
|
|
153
|
+
if (isIcon) return `${c(GRAY)}${verbose ? 'โ๏ธ Korean style' : 'โ๏ธ'}${c(RESET)}`;
|
|
153
154
|
return `${c(GRAY)}Korean style${c(RESET)}`;
|
|
154
155
|
} catch {
|
|
155
156
|
return null;
|