claude-token-saver 3.35.0 โ 3.35.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 +53 -41
- package/README.md +53 -41
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -20,6 +20,8 @@ Three numbers are the whole pitch.
|
|
|
20
20
|
- **510,000 tokens on one document**: a 30MB deck read as Markdown instead of raw XML ([evidence](#-doc2md--documents-become-markdown-before-the-model-reads-them))
|
|
21
21
|
- **Routing savings are a per-run ledger**: the price difference of each delegated run, not an estimate ([evidence](#-the-savings-figure-is-a-ledger-entry-not-an-estimate))
|
|
22
22
|
|
|
23
|
+
Since v3.35.0 spend is visible too: month-to-date spend shows as `๐ต Sep $42`, and on LiteLLM gateways (Bedrock and friends) with no 5h/7d caps, your key budget renders as a `๐ budget โฐโฑ 34% $34/$100` gauge.
|
|
24
|
+
|
|
23
25
|
## Four parts, working together
|
|
24
26
|
|
|
25
27
|
| | What it does | Effect |
|
|
@@ -33,6 +35,54 @@ One install sets up all four. The measured โ18.6% comes from the harness and r
|
|
|
33
35
|
|
|
34
36
|
The two savings figures are never added together, because they answer different questions. Routing says "the same work ran on a cheaper model". Conversion says "a file you could not read became readable, without pushing the original through the context window". The statusline gives each its own line and puts the larger one first.
|
|
35
37
|
|
|
38
|
+
## Contents
|
|
39
|
+
|
|
40
|
+
- **Start here**: [Getting started](#getting-started) ยท [Reading the statusline](#reading-the-statusline) ยท [Commands](#commands)
|
|
41
|
+
- **Savings**: [The routing ledger](#-the-savings-figure-is-a-ledger-entry-not-an-estimate) ยท [route-scan](#-route-scan--this-recurring-task-could-run-on-a-cheaper-tier) ยท [doc2md](#-doc2md--documents-become-markdown-before-the-model-reads-them) ยท [seed](#-seed-delegation-that-works-from-the-first-session)
|
|
42
|
+
- **Guardrails**: [Harness](#-harness-mode) ยท [compact-window](#-compact-window--pin-where-a-1m-session-compacts) ยท [Korean writing guidance](#-korean-writing-guidance)
|
|
43
|
+
- **Spend & environments**: [Monthly spend ยท LiteLLM key budget](#litellm-your-key-budget-stands-in-for-the-missing-5h7d-caps-v3350) ยท [Gateways (Bedrock/Vertex)](#-behind-a-gateway-bedrock--vertex) ยท [Spike issue codes](#spike-issue-codes) ยท [Measured impact](#real-world-impact--beforeafter-report)
|
|
44
|
+
|
|
45
|
+
## Getting started
|
|
46
|
+
|
|
47
|
+
**Prerequisite:** Node.js โฅ 18 (`node -v` ยท macOS `brew install node` ยท Windows `winget install OpenJS.NodeJS.LTS` ยท Linux/WSL: [nvm](https://github.com/nvm-sh/nvm) recommended)
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm uninstall -g claude-cache-monitor # (previous-package users only)
|
|
51
|
+
npm i -g claude-token-saver
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The statusline appears at the bottom of Claude Code right away. If auto-registration was skipped (`--ignore-scripts`, sudo, sandboxed installs), run `claude-token-saver install`.
|
|
55
|
+
|
|
56
|
+
One install sets up everything: **statusline, Skill, SessionStart hook, the ๐
ท Harness (5 principles), and a first route-scan.** The harness and the Korean writing guidance **show what they add and ask before enabling it.** The harness is **appended** to `~/.claude/CLAUDE.md` as a marked block (your existing content is backed up and preserved) and is left alone if one is already there.
|
|
57
|
+
|
|
58
|
+
Outside a terminal โ npm `postinstall`, CI, piped stdin โ the question is skipped and the old defaults apply. Use `--yes` or `--no-input` to skip it deliberately, `CTS_NO_HARNESS=1 npm i -g claude-token-saver` to skip the harness entirely, and `claude-token-saver harness uninit --global` to undo it.
|
|
59
|
+
|
|
60
|
+
> โ ๏ธ Avoid `sudo` global installs โ the Skill lands in root's `~/.claude` instead of yours. Use nvm/fnm/Volta or `npm config set prefix ~/.npm-global`.
|
|
61
|
+
|
|
62
|
+
### What the install turns on, and what stays manual
|
|
63
|
+
|
|
64
|
+
Everything that costs nothing until it is needed is on after a plain install. The only manual items are the ones that change Claude Code's own settings or need a human to pick a scope.
|
|
65
|
+
|
|
66
|
+
| Feature | After install | How to turn it off |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| statusline (diagnostic chips, savings ledger) | on | `claude-token-saver uninstall` |
|
|
69
|
+
| `/claude-token-saver` Skill | on | same |
|
|
70
|
+
| SessionStart hook (route-scan refresh) | on | same |
|
|
71
|
+
| UserPromptSubmit hook (brief injection) | on | same |
|
|
72
|
+
| First route-scan (last 14 days of logs) | runs once during the install | n/a |
|
|
73
|
+
| ๐
ท Harness 5 principles (`~/.claude/CLAUDE.md`) | on (shown and confirmed once at a terminal) | `harness uninit --global`, `CTS_NO_HARNESS=1` |
|
|
74
|
+
| doc2md hooks (Read, Edit/Write, prompt) | on | `doc2md off`, `CTS_NO_DOC2MD=1` |
|
|
75
|
+
| doc2md converter (markitdown venv) | offered at a terminal; an unattended install prints the command | install later with `doc2md install-converter` |
|
|
76
|
+
| Korean writing guidance | on when the locale is Korean (asked at a terminal) | `korean off`, `CTS_NO_KOREAN=1` |
|
|
77
|
+
| compact-window warning chip | on | `compact-window off` |
|
|
78
|
+
| Update-available chip | on | `CTS_NO_UPDATE_CHECK=1` |
|
|
79
|
+
| **Pinning compact-window** (`autoCompactWindow` 500k) | **off โ run it yourself** | `compact-window set --global` or `--project` |
|
|
80
|
+
| **Model-fitting rules** (`ratchet-model.md` delegations) | **candidates are proposed only** | review and approve with `route-scan rules` |
|
|
81
|
+
| `handoff` (back up work before a cap) | an on-demand command | n/a |
|
|
82
|
+
|
|
83
|
+
`compact-window set` writes into Claude Code's `settings.json` and a human has to choose global or project scope, so it is never run for you. Model-fitting rules keep an approval step for the same reason: which work belongs on a cheaper tier is your call.
|
|
84
|
+
|
|
85
|
+
|
|
36
86
|
## ๐ The savings figure is a ledger entry, not an estimate
|
|
37
87
|
|
|
38
88
|
Every delegated run is recorded like this:
|
|
@@ -72,6 +122,7 @@ By run (newest first):
|
|
|
72
122
|
|---|---|
|
|
73
123
|
| ๐จ **No surprise rate limits** | Warns when the 5H/7D window hits 90%; `handoff` backs up your work |
|
|
74
124
|
| ๐ง **Cache waste detection** | Hit rate, TTL, 1M-context detection โ spikes diagnosed with issue codes |
|
|
125
|
+
| ๐ต **Spend visibility** | Month-to-date spend (`๐ต Sep $42`) always on; behind a LiteLLM gateway the key budget gauge (`๐ budget 34% $34/$100`) stands in for the missing 5h/7d caps ([below](#litellm-your-key-budget-stands-in-for-the-missing-5h7d-caps-v3350)) |
|
|
75
126
|
| ๐ฐ๐ท **Korean writing guidance** | Offered at install time, defaulting to your locale ([below](#-korean-writing-guidance)) |
|
|
76
127
|
|
|
77
128
|
## Not a router โ 60 seconds
|
|
@@ -103,46 +154,6 @@ Measured rule-health โ whether a delegated run actually succeeded โ landed i
|
|
|
103
154
|
|
|
104
155
|
---
|
|
105
156
|
|
|
106
|
-
## Getting started
|
|
107
|
-
|
|
108
|
-
**Prerequisite:** Node.js โฅ 18 (`node -v` ยท macOS `brew install node` ยท Windows `winget install OpenJS.NodeJS.LTS` ยท Linux/WSL: [nvm](https://github.com/nvm-sh/nvm) recommended)
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
npm uninstall -g claude-cache-monitor # (previous-package users only)
|
|
112
|
-
npm i -g claude-token-saver
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
The statusline appears at the bottom of Claude Code right away. If auto-registration was skipped (`--ignore-scripts`, sudo, sandboxed installs), run `claude-token-saver install`.
|
|
116
|
-
|
|
117
|
-
One install sets up everything: **statusline, Skill, SessionStart hook, the ๐
ท Harness (5 principles), and a first route-scan.** The harness and the Korean writing guidance **show what they add and ask before enabling it.** The harness is **appended** to `~/.claude/CLAUDE.md` as a marked block (your existing content is backed up and preserved) and is left alone if one is already there.
|
|
118
|
-
|
|
119
|
-
Outside a terminal โ npm `postinstall`, CI, piped stdin โ the question is skipped and the old defaults apply. Use `--yes` or `--no-input` to skip it deliberately, `CTS_NO_HARNESS=1 npm i -g claude-token-saver` to skip the harness entirely, and `claude-token-saver harness uninit --global` to undo it.
|
|
120
|
-
|
|
121
|
-
> โ ๏ธ Avoid `sudo` global installs โ the Skill lands in root's `~/.claude` instead of yours. Use nvm/fnm/Volta or `npm config set prefix ~/.npm-global`.
|
|
122
|
-
|
|
123
|
-
### What the install turns on, and what stays manual
|
|
124
|
-
|
|
125
|
-
Everything that costs nothing until it is needed is on after a plain install. The only manual items are the ones that change Claude Code's own settings or need a human to pick a scope.
|
|
126
|
-
|
|
127
|
-
| Feature | After install | How to turn it off |
|
|
128
|
-
|---|---|---|
|
|
129
|
-
| statusline (diagnostic chips, savings ledger) | on | `claude-token-saver uninstall` |
|
|
130
|
-
| `/claude-token-saver` Skill | on | same |
|
|
131
|
-
| SessionStart hook (route-scan refresh) | on | same |
|
|
132
|
-
| UserPromptSubmit hook (brief injection) | on | same |
|
|
133
|
-
| First route-scan (last 14 days of logs) | runs once during the install | n/a |
|
|
134
|
-
| ๐
ท Harness 5 principles (`~/.claude/CLAUDE.md`) | on (shown and confirmed once at a terminal) | `harness uninit --global`, `CTS_NO_HARNESS=1` |
|
|
135
|
-
| doc2md hooks (Read, Edit/Write, prompt) | on | `doc2md off`, `CTS_NO_DOC2MD=1` |
|
|
136
|
-
| doc2md converter (markitdown venv) | offered at a terminal; an unattended install prints the command | install later with `doc2md install-converter` |
|
|
137
|
-
| Korean writing guidance | on when the locale is Korean (asked at a terminal) | `korean off`, `CTS_NO_KOREAN=1` |
|
|
138
|
-
| compact-window warning chip | on | `compact-window off` |
|
|
139
|
-
| Update-available chip | on | `CTS_NO_UPDATE_CHECK=1` |
|
|
140
|
-
| **Pinning compact-window** (`autoCompactWindow` 500k) | **off โ run it yourself** | `compact-window set --global` or `--project` |
|
|
141
|
-
| **Model-fitting rules** (`ratchet-model.md` delegations) | **candidates are proposed only** | review and approve with `route-scan rules` |
|
|
142
|
-
| `handoff` (back up work before a cap) | an on-demand command | n/a |
|
|
143
|
-
|
|
144
|
-
`compact-window set` writes into Claude Code's `settings.json` and a human has to choose global or project scope, so it is never run for you. Model-fitting rules keep an approval step for the same reason: which work belongs on a cheaper tier is your call.
|
|
145
|
-
|
|
146
157
|
## Reading the statusline
|
|
147
158
|
|
|
148
159
|
Once the savings ledger has entries it renders as **two rows** โ routing savings on row 1, diagnostics on row 2.
|
|
@@ -156,7 +167,8 @@ With an empty ledger (no measured delegation yet) row 1 is not drawn and the lay
|
|
|
156
167
|
|
|
157
168
|
| Segment | Meaning |
|
|
158
169
|
|---|---|
|
|
159
|
-
| `๐` **row 1** |
|
|
170
|
+
| `๐` **row 1** | Lifetime routing savings + the model moves behind them. The breakdown sums exactly to the total, model names keep only the family (`opusโhaiku`). Full audit: `route-scan savings` |
|
|
171
|
+
| `๐` **row 2** | Lifetime doc2md conversion savings with a per-format breakdown. Whichever of routing/conversion saved more takes row 1 |
|
|
160
172
|
| `๐ค` | Active model |
|
|
161
173
|
| `๐
ท 5/5` | Harness principle score ([Harness mode](#-harness-mode)) |
|
|
162
174
|
| `๐ง ` | Cache hit rate (green at 85%+) |
|
package/README.md
CHANGED
|
@@ -20,6 +20,8 @@ npm i -g claude-token-saver
|
|
|
20
20
|
- **๋ฌธ์ ํ ๊ฑด์ 51๋ง ํ ํฐ**: 30MB ๋ฐํ์๋ฃ๋ฅผ XML ๋์ Markdown ์ผ๋ก ์ฝ์์ ๋ ([๊ทผ๊ฑฐ](#-doc2md-๋ฌธ์๋ฅผ-์ฝ๊ธฐ-์ ์-markdown-์ผ๋ก-๋ฐ๊ฟ๋๋ค))
|
|
21
21
|
- **๋ผ์ฐํ
์ ๊ฐ์ก์ ์คํ ๋จ์ ์์ฅ**: ์ถ์ ์น๊ฐ ์๋๋ผ ์์ ํ ๊ฑด ํ ๊ฑด์ ์ฐจ์ก ๊ธฐ๋ก ([๊ทผ๊ฑฐ](#-์ ๊ฐ์ก์-์ถ์ ์ด-์๋๋ผ-์์ฅ-๊ธฐ๋ก์
๋๋ค))
|
|
22
22
|
|
|
23
|
+
v3.35.0 ๋ถํฐ๋ ์ง์ถ๋ ๋ณด์
๋๋ค. ์ด๋ฒ ๋ฌ 1์ผ ์ดํ ์ด ๊ธ์ก์ `๐ต Sep $42` ๋ก ์์ ํ์ํ๊ณ , 5h/7d cap ์ด ์์ ์๋ LiteLLM ๊ฒ์ดํธ์จ์ด(Bedrock ๋ฑ) ํ๊ฒฝ์์๋ ํค ์์ฐ์ `๐ budget โฐโฑ 34% $34/$100` ๊ฒ์ด์ง๋ก ๋ณด์ฌ ์ค๋๋ค.
|
|
24
|
+
|
|
23
25
|
## ๋ค ๊ฐ์ง๊ฐ ํจ๊ป ๋์๊ฐ๋๋ค
|
|
24
26
|
|
|
25
27
|
| | ํ๋ ์ผ | ํจ๊ณผ |
|
|
@@ -31,6 +33,54 @@ npm i -g claude-token-saver
|
|
|
31
33
|
|
|
32
34
|
์ค์น ํ ๋ฒ์ด๋ฉด ๋ท ๋ค ์ ์ฉ๋ฉ๋๋ค. ์ค์ธก โ18.6%๋ Harness์ ratchet์ ๋ชซ์ด๊ณ , ๋ผ์ฐํ
๊ณผ ๋ฌธ์ ๋ณํ ์ ๊ฐ์ก์ ๊ทธ ์์ ์นํ๋๋ค. ๋ ์ ๊ฐ์ก์ ์ฑ๊ฒฉ์ด ๋ฌ๋ผ์ ํ ์ซ์๋ก ํฉ์น์ง ์๊ณ , statusline ์ด ๊ฐ๊ฐ์ ์ค๋ก ๋ณด์ฌ ์ฃผ๋ฉฐ ๊ธ์ก์ด ํฐ ์ชฝ์ ์์ ๋์ต๋๋ค.
|
|
33
35
|
|
|
36
|
+
## ๋ชฉ์ฐจ
|
|
37
|
+
|
|
38
|
+
- **๋จผ์ ๋ณผ ๊ฒ**: [์์ํ๊ธฐ](#์์ํ๊ธฐ) ยท [statusline ์ฝ๋ ๋ฒ](#statusline-์ฝ๋-๋ฒ) ยท [์ฃผ์ ๋ช
๋ น](#์ฃผ์-๋ช
๋ น)
|
|
39
|
+
- **์ ๊ฐ ๊ธฐ๋ฅ**: [๋ผ์ฐํ
์ ๊ฐ ์์ฅ](#-์ ๊ฐ์ก์-์ถ์ ์ด-์๋๋ผ-์์ฅ-๊ธฐ๋ก์
๋๋ค) ยท [route-scan](#-route-scan-์ด-๋ฐ๋ณต-์์
์-๋-์ผ-ํฐ์ด๋ก-๋ด๋ ค๋-๋ฉ๋๋ค) ยท [doc2md](#-doc2md-๋ฌธ์๋ฅผ-์ฝ๊ธฐ-์ ์-markdown-์ผ๋ก-๋ฐ๊ฟ๋๋ค) ยท [seed](#-seed-์ค์น-์งํ๋ถํฐ-์์์ด-๊ฑธ๋ฆฌ๊ฒ-ํ๋-์์-๋ฃฐ)
|
|
40
|
+
- **๊ฐ๋๋ ์ผ**: [Harness](#-harness-๋ชจ๋) ยท [compact-window](#-compact-window-1m-์ปจํ
์คํธ์-์๋-์์ถ-์ง์ -๊ณ ์ ) ยท [ํ๊ตญ์ด ๋ฌธ์ฒด](#-ํ๊ตญ์ด-๋ฌธ์ฒด-์ง์นจ)
|
|
41
|
+
- **๋น์ฉ ๊ฐ์ํยทํ๊ฒฝ**: [์ด๋ฒ ๋ฌ ์ง์ถยทLiteLLM ํค ์์ฐ](#litellm-5h7d-cap-๋์ -ํค-์์ฐ์-๋ณด์ฌ-์ค๋๋ค-v3350) ยท [๊ฒ์ดํธ์จ์ด(BedrockยทVertex)](#-bedrockvertex-๊ฒฝ์ -ํ๊ฒฝ) ยท [ํ ํฐ ๊ธ์ฆ ์์ธ ์ฝ๋](#ํ ํฐ-๊ธ์ฆ-์์ธ-์ฝ๋) ยท [์ค์ธก ํจ๊ณผ](#์ค์ -ํจ๊ณผ-๋์
-์ ํ-๋ฆฌํฌํธ)
|
|
42
|
+
|
|
43
|
+
## ์์ํ๊ธฐ
|
|
44
|
+
|
|
45
|
+
**์ฌ์ ์ค๋น:** Node.js โฅ 18 (`node -v`๋ก ํ์ธ ยท macOS `brew install node` ยท Windows `winget install OpenJS.NodeJS.LTS` ยท Linux/WSL์ [nvm](https://github.com/nvm-sh/nvm) ๊ถ์ฅ)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm uninstall -g claude-cache-monitor # (๊ตฌ ํจํค์ง ์ฌ์ฉ์๋ง)
|
|
49
|
+
npm i -g claude-token-saver
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
์ค์นํ๋ฉด Claude Code ํ๋ฉด ํ๋จ์ statusline์ด ๊ณง๋ฐ๋ก ๋ํ๋ฉ๋๋ค. `--ignore-scripts` ์ต์
์ด๋ sudo ์ฌ์ฉ ๋ฑ์ผ๋ก ์๋ ๋ฑ๋ก์ด ๋์ง ์์๋ค๋ฉด `claude-token-saver install`์ ์คํํด ์ง์ ๋ฑ๋กํ์ญ์์ค.
|
|
53
|
+
|
|
54
|
+
์ค์น ํ ๋ฒ์ผ๋ก **statusline๊ณผ Skill, SessionStart ํ
, ๐
ท Harness(5์์น), ์ต์ด route-scan์ด** ๋ชจ๋ ์ค๋น๋ฉ๋๋ค. Harness์ ํ๊ตญ์ด ๋ฌธ์ฒด ์ง์นจ์ **๋ฌด์์ด ์ถ๊ฐ๋๋์ง ๋ณด์ฌ ์ค ๋ค ์ผค์ง ๋ฌผ์ด๋ด
๋๋ค.** Harness๋ `~/.claude/CLAUDE.md`์ ํ์๊ฐ ๋ถ์ ๋ธ๋ก์ผ๋ก **์ถ๊ฐ๋๋ฉฐ**, ๊ธฐ์กด์ ์์ฑํด ๋ ๋ด์ฉ์ ๋ฐฑ์
ํ ๋ค ๊ทธ๋๋ก ๋ณด์กดํฉ๋๋ค. ์ด๋ฏธ ์ค์ ๋์ด ์๋ ๊ฒฝ์ฐ์๋ ์๋ฌด๊ฒ๋ ๋ฐ๊พธ์ง ์์ต๋๋ค.
|
|
55
|
+
|
|
56
|
+
ํฐ๋ฏธ๋์ด ์๋ ํ๊ฒฝ(npm์ `postinstall`, CI, ํ์ดํ ์
๋ ฅ)์์๋ ์ง๋ฌธ์ ๊ฑด๋๋ฐ๊ณ ๊ธฐ์กด ๊ธฐ๋ณธ๊ฐ์ ์ ์ฉํฉ๋๋ค. ์ง๋ฌธ ์์ด ์งํํ๋ ค๋ฉด `--yes`๋ `--no-input`, ์์ ๊ฑด๋๋ฐ๋ ค๋ฉด `CTS_NO_HARNESS=1 npm i -g claude-token-saver`๋ฅผ ์ฐ์ญ์์ค. ์ด๋ฏธ ์ ์ฉํ ์ค์ ์ ๋๋๋ฆฌ๋ ค๋ฉด `claude-token-saver harness uninit --global`์ ์คํํ์ญ์์ค.
|
|
57
|
+
|
|
58
|
+
> โ ๏ธ sudo๋ก ๊ธ๋ก๋ฒ ์ค์น๋ฅผ ํ๋ฉด Skill์ด ์ฌ์ฉ์ ๊ณ์ ์ด ์๋๋ผ root์ `~/.claude`์ ๋ฑ๋ก๋๋ ํจ์ ์ด ์์ต๋๋ค. nvm์ด๋ fnm, Volta๋ฅผ ์ฌ์ฉํด ์ฌ์ฉ์ ์์ญ์ ์ค์นํ๊ธฐ๋ฅผ ๊ถ์ฅํฉ๋๋ค.
|
|
59
|
+
|
|
60
|
+
### ์ค์นํ๋ฉด ์ผ์ง๋ ๊ธฐ๋ฅ๊ณผ ์ง์ ์ผ์ผ ํ๋ ๊ธฐ๋ฅ
|
|
61
|
+
|
|
62
|
+
์ค์น ์์ ์ ๋น์ฉ์ด ๋ค์ง ์๋ ๊ธฐ๋ฅ์ ์ ๋ถ ์๋์ผ๋ก ์ผ์ง๋๋ค. ์๋์ผ๋ก ๋จ๊ฒจ ๋ ํญ๋ชฉ์ Claude Code ์์ฒด์ ์ค์ ์ ๋ฐ๊พธ๊ฑฐ๋, ์ ์ฉ ๋ฒ์๋ฅผ ์ฌ๋์ด ์ ํด ์ฃผ์ด์ผ ํ๋ ๊ฒ๋ค๋ฟ์
๋๋ค.
|
|
63
|
+
|
|
64
|
+
| ๊ธฐ๋ฅ | ์ค์น ์งํ ์ํ | ๋๋ ๋ฐฉ๋ฒ |
|
|
65
|
+
|---|---|---|
|
|
66
|
+
| statusline (์ง๋จ ์นฉยท์ ๊ฐ ์์ฅ) | ์ผ์ง | `claude-token-saver uninstall` |
|
|
67
|
+
| `/claude-token-saver` Skill | ์ผ์ง | ์์ ๊ฐ์ต๋๋ค |
|
|
68
|
+
| SessionStart ํ
(route-scan ์ฌ๋ถ์) | ์ผ์ง | ์์ ๊ฐ์ต๋๋ค |
|
|
69
|
+
| UserPromptSubmit ํ
(brief ์ฃผ์
) | ์ผ์ง | ์์ ๊ฐ์ต๋๋ค |
|
|
70
|
+
| ์ต์ด route-scan (์ต๊ทผ 14์ผ ๋ก๊ทธ ๋ถ์) | ์ค์น ์ค ์ฆ์ 1ํ ์คํ | ํด๋น ์์ต๋๋ค |
|
|
71
|
+
| ๐
ท Harness 5์์น (`~/.claude/CLAUDE.md`) | ์ผ์ง (ํฐ๋ฏธ๋์์๋ ๋ด์ฉ์ ๋ณด์ฌ ์ฃผ๊ณ ํ ๋ฒ ๋ฌป์ต๋๋ค) | `harness uninit --global` ยท `CTS_NO_HARNESS=1` |
|
|
72
|
+
| doc2md ํ
(ReadยทEditยทWriteยทํ๋กฌํํธ) | ์ผ์ง | `doc2md off` ยท `CTS_NO_DOC2MD=1` |
|
|
73
|
+
| doc2md ๋ณํ๊ธฐ(markitdown venv) | ํฐ๋ฏธ๋์์ ์ค์น ์ฌ๋ถ๋ฅผ ๋ฌป๊ณ , ๋น๋ํํ ์ค์น์์๋ ๋ช
๋ น๋ง ์๋ดํฉ๋๋ค | `doc2md install-converter` ๋ก ๋์ค์ ์ค์น |
|
|
74
|
+
| ํ๊ตญ์ด ๋ฌธ์ฒด ์ง์นจ | ์์คํ
๋ก์ผ์ผ์ด ํ๊ตญ์ด๋ฉด ์ผ์ง (ํฐ๋ฏธ๋์์๋ ๋ฌป์ต๋๋ค) | `korean off` ยท `CTS_NO_KOREAN=1` |
|
|
75
|
+
| compact-window ๊ฒฝ๊ณ ์นฉ | ์ผ์ง | `compact-window off` |
|
|
76
|
+
| ์
๋ฐ์ดํธ ์๋ด ์นฉ | ์ผ์ง | `CTS_NO_UPDATE_CHECK=1` |
|
|
77
|
+
| **compact-window ๊ฐ ๊ณ ์ ** (`autoCompactWindow` 500k) | **๊บผ์ง โ ์ง์ ์คํํด์ผ ํฉ๋๋ค** | `compact-window set --global` ๋๋ `--project` |
|
|
78
|
+
| **๋ชจ๋ธ ํผํ
๋ฃฐ ์น์ธ** (`ratchet-model.md` ์์ ๋ฃฐ) | **ํ๋ณด๋ง ์ ์ํฉ๋๋ค** | `route-scan rules` ๋ก ํ์ธํ๊ณ ์น์ธยท์ญ์ |
|
|
79
|
+
| `handoff` (ํ๋ ์๋ฐ ์ ์์
๋ฐฑ์
) | ํ์ํ ๋ ์ง์ ์คํํ๋ ๋ช
๋ น์
๋๋ค | ํด๋น ์์ต๋๋ค |
|
|
80
|
+
|
|
81
|
+
`compact-window set` ์ Claude Code ์ `settings.json` ์ ๊ฐ์ ์ ๊ณ , ์ ์ญ๊ณผ ํ๋ก์ ํธ ์ค ์ด๋์ ์ ์์ง๋ ์ฌ๋์ด ์ ํด์ผ ํ๋ฏ๋ก ์๋์ผ๋ก ์คํํ์ง ์์ต๋๋ค. ๋ชจ๋ธ ํผํ
๋ฃฐ๋ ๊ฐ์ ์ด์ ๋ก ์น์ธ ๋จ๊ณ๋ฅผ ๋จ๊ฒจ ๋์์ต๋๋ค. ์ด๋ค ์์
์ ๋ ์ผ ํฐ์ด์ ๋งก๊ธธ์ง๋ ์ฌ์ฉ์์ ํ๋จ์ด ํ์ํฉ๋๋ค.
|
|
82
|
+
|
|
83
|
+
|
|
34
84
|
## ๐ ์ ๊ฐ์ก์ ์ถ์ ์ด ์๋๋ผ ์์ฅ ๊ธฐ๋ก์
๋๋ค
|
|
35
85
|
|
|
36
86
|
์์๋ ์คํ ํ๋ํ๋๋ฅผ ์ด๋ ๊ฒ ๊ธฐ๋กํฉ๋๋ค.
|
|
@@ -70,6 +120,7 @@ $ claude-token-saver route-scan savings # ๋ชจ๋ ๊ธ์ก์ ๋ฃฐ ๋จ์๊น์ง
|
|
|
70
120
|
|---|---|
|
|
71
121
|
| ๐จ **ํ๋ ์ด๊ณผ ์๋ฐฉ** | 5์๊ฐยท7์ผ rate-limit ์๋๊ฐ 90%์ ๋ฟ์ผ๋ฉด ๊ฒฝ๊ณ ํ๊ณ , `handoff`๋ก ์์
์ ๋ฐฑ์
ํฉ๋๋ค |
|
|
72
122
|
| ๐ง **์บ์ ๋ญ๋น ๊ฐ์ง** | ํํธ์จยทTTLยท1M ์ปจํ
์คํธ๋ฅผ ๊ฐ์งํด ํ ํฐ ๊ธ์ฆ ์์ธ์ ์ฝ๋๋ก ์ง๋จํฉ๋๋ค |
|
|
123
|
+
| ๐ต **๋น์ฉ ๊ฐ์ํ** | ์ด๋ฒ ๋ฌ ์ง์ถ(`๐ต Sep $42`)์ ์์ ํ์ํ๊ณ , LiteLLM ๊ฒ์ดํธ์จ์ด์์๋ ํค ์์ฐ ๊ฒ์ด์ง(`๐ budget 34% $34/$100`)๋ก 5h/7d cap ์ ๋์ ํฉ๋๋ค ([์๋](#litellm-5h7d-cap-๋์ -ํค-์์ฐ์-๋ณด์ฌ-์ค๋๋ค-v3350)) |
|
|
73
124
|
| ๐ฐ๐ท **ํ๊ตญ์ด ๋ฌธ์ฒด ๊ต์ ** | ํ๊ตญ์ด ํ๊ฒฝ์ด๋ฉด ์๋์ผ๋ก ์ผ์ง๋๋ค ([์๋](#-ํ๊ตญ์ด-๋ฌธ์ฒด-์ง์นจ)) |
|
|
74
125
|
|
|
75
126
|
## ๋ผ์ฐํฐ๊ฐ ์๋๋๋ค: 60์ด ์ค๋ช
|
|
@@ -100,46 +151,6 @@ claude-token-saver route-scan savings # ์์์ผ๋ก ์ ๊ฐํ ๊ธ์ก์ ๊ทผ๊ฑฐ
|
|
|
100
151
|
|
|
101
152
|
---
|
|
102
153
|
|
|
103
|
-
## ์์ํ๊ธฐ
|
|
104
|
-
|
|
105
|
-
**์ฌ์ ์ค๋น:** Node.js โฅ 18 (`node -v`๋ก ํ์ธ ยท macOS `brew install node` ยท Windows `winget install OpenJS.NodeJS.LTS` ยท Linux/WSL์ [nvm](https://github.com/nvm-sh/nvm) ๊ถ์ฅ)
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
npm uninstall -g claude-cache-monitor # (๊ตฌ ํจํค์ง ์ฌ์ฉ์๋ง)
|
|
109
|
-
npm i -g claude-token-saver
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
์ค์นํ๋ฉด Claude Code ํ๋ฉด ํ๋จ์ statusline์ด ๊ณง๋ฐ๋ก ๋ํ๋ฉ๋๋ค. `--ignore-scripts` ์ต์
์ด๋ sudo ์ฌ์ฉ ๋ฑ์ผ๋ก ์๋ ๋ฑ๋ก์ด ๋์ง ์์๋ค๋ฉด `claude-token-saver install`์ ์คํํด ์ง์ ๋ฑ๋กํ์ญ์์ค.
|
|
113
|
-
|
|
114
|
-
์ค์น ํ ๋ฒ์ผ๋ก **statusline๊ณผ Skill, SessionStart ํ
, ๐
ท Harness(5์์น), ์ต์ด route-scan์ด** ๋ชจ๋ ์ค๋น๋ฉ๋๋ค. Harness์ ํ๊ตญ์ด ๋ฌธ์ฒด ์ง์นจ์ **๋ฌด์์ด ์ถ๊ฐ๋๋์ง ๋ณด์ฌ ์ค ๋ค ์ผค์ง ๋ฌผ์ด๋ด
๋๋ค.** Harness๋ `~/.claude/CLAUDE.md`์ ํ์๊ฐ ๋ถ์ ๋ธ๋ก์ผ๋ก **์ถ๊ฐ๋๋ฉฐ**, ๊ธฐ์กด์ ์์ฑํด ๋ ๋ด์ฉ์ ๋ฐฑ์
ํ ๋ค ๊ทธ๋๋ก ๋ณด์กดํฉ๋๋ค. ์ด๋ฏธ ์ค์ ๋์ด ์๋ ๊ฒฝ์ฐ์๋ ์๋ฌด๊ฒ๋ ๋ฐ๊พธ์ง ์์ต๋๋ค.
|
|
115
|
-
|
|
116
|
-
ํฐ๋ฏธ๋์ด ์๋ ํ๊ฒฝ(npm์ `postinstall`, CI, ํ์ดํ ์
๋ ฅ)์์๋ ์ง๋ฌธ์ ๊ฑด๋๋ฐ๊ณ ๊ธฐ์กด ๊ธฐ๋ณธ๊ฐ์ ์ ์ฉํฉ๋๋ค. ์ง๋ฌธ ์์ด ์งํํ๋ ค๋ฉด `--yes`๋ `--no-input`, ์์ ๊ฑด๋๋ฐ๋ ค๋ฉด `CTS_NO_HARNESS=1 npm i -g claude-token-saver`๋ฅผ ์ฐ์ญ์์ค. ์ด๋ฏธ ์ ์ฉํ ์ค์ ์ ๋๋๋ฆฌ๋ ค๋ฉด `claude-token-saver harness uninit --global`์ ์คํํ์ญ์์ค.
|
|
117
|
-
|
|
118
|
-
> โ ๏ธ sudo๋ก ๊ธ๋ก๋ฒ ์ค์น๋ฅผ ํ๋ฉด Skill์ด ์ฌ์ฉ์ ๊ณ์ ์ด ์๋๋ผ root์ `~/.claude`์ ๋ฑ๋ก๋๋ ํจ์ ์ด ์์ต๋๋ค. nvm์ด๋ fnm, Volta๋ฅผ ์ฌ์ฉํด ์ฌ์ฉ์ ์์ญ์ ์ค์นํ๊ธฐ๋ฅผ ๊ถ์ฅํฉ๋๋ค.
|
|
119
|
-
|
|
120
|
-
### ์ค์นํ๋ฉด ์ผ์ง๋ ๊ธฐ๋ฅ๊ณผ ์ง์ ์ผ์ผ ํ๋ ๊ธฐ๋ฅ
|
|
121
|
-
|
|
122
|
-
์ค์น ์์ ์ ๋น์ฉ์ด ๋ค์ง ์๋ ๊ธฐ๋ฅ์ ์ ๋ถ ์๋์ผ๋ก ์ผ์ง๋๋ค. ์๋์ผ๋ก ๋จ๊ฒจ ๋ ํญ๋ชฉ์ Claude Code ์์ฒด์ ์ค์ ์ ๋ฐ๊พธ๊ฑฐ๋, ์ ์ฉ ๋ฒ์๋ฅผ ์ฌ๋์ด ์ ํด ์ฃผ์ด์ผ ํ๋ ๊ฒ๋ค๋ฟ์
๋๋ค.
|
|
123
|
-
|
|
124
|
-
| ๊ธฐ๋ฅ | ์ค์น ์งํ ์ํ | ๋๋ ๋ฐฉ๋ฒ |
|
|
125
|
-
|---|---|---|
|
|
126
|
-
| statusline (์ง๋จ ์นฉยท์ ๊ฐ ์์ฅ) | ์ผ์ง | `claude-token-saver uninstall` |
|
|
127
|
-
| `/claude-token-saver` Skill | ์ผ์ง | ์์ ๊ฐ์ต๋๋ค |
|
|
128
|
-
| SessionStart ํ
(route-scan ์ฌ๋ถ์) | ์ผ์ง | ์์ ๊ฐ์ต๋๋ค |
|
|
129
|
-
| UserPromptSubmit ํ
(brief ์ฃผ์
) | ์ผ์ง | ์์ ๊ฐ์ต๋๋ค |
|
|
130
|
-
| ์ต์ด route-scan (์ต๊ทผ 14์ผ ๋ก๊ทธ ๋ถ์) | ์ค์น ์ค ์ฆ์ 1ํ ์คํ | ํด๋น ์์ต๋๋ค |
|
|
131
|
-
| ๐
ท Harness 5์์น (`~/.claude/CLAUDE.md`) | ์ผ์ง (ํฐ๋ฏธ๋์์๋ ๋ด์ฉ์ ๋ณด์ฌ ์ฃผ๊ณ ํ ๋ฒ ๋ฌป์ต๋๋ค) | `harness uninit --global` ยท `CTS_NO_HARNESS=1` |
|
|
132
|
-
| doc2md ํ
(ReadยทEditยทWriteยทํ๋กฌํํธ) | ์ผ์ง | `doc2md off` ยท `CTS_NO_DOC2MD=1` |
|
|
133
|
-
| doc2md ๋ณํ๊ธฐ(markitdown venv) | ํฐ๋ฏธ๋์์ ์ค์น ์ฌ๋ถ๋ฅผ ๋ฌป๊ณ , ๋น๋ํํ ์ค์น์์๋ ๋ช
๋ น๋ง ์๋ดํฉ๋๋ค | `doc2md install-converter` ๋ก ๋์ค์ ์ค์น |
|
|
134
|
-
| ํ๊ตญ์ด ๋ฌธ์ฒด ์ง์นจ | ์์คํ
๋ก์ผ์ผ์ด ํ๊ตญ์ด๋ฉด ์ผ์ง (ํฐ๋ฏธ๋์์๋ ๋ฌป์ต๋๋ค) | `korean off` ยท `CTS_NO_KOREAN=1` |
|
|
135
|
-
| compact-window ๊ฒฝ๊ณ ์นฉ | ์ผ์ง | `compact-window off` |
|
|
136
|
-
| ์
๋ฐ์ดํธ ์๋ด ์นฉ | ์ผ์ง | `CTS_NO_UPDATE_CHECK=1` |
|
|
137
|
-
| **compact-window ๊ฐ ๊ณ ์ ** (`autoCompactWindow` 500k) | **๊บผ์ง โ ์ง์ ์คํํด์ผ ํฉ๋๋ค** | `compact-window set --global` ๋๋ `--project` |
|
|
138
|
-
| **๋ชจ๋ธ ํผํ
๋ฃฐ ์น์ธ** (`ratchet-model.md` ์์ ๋ฃฐ) | **ํ๋ณด๋ง ์ ์ํฉ๋๋ค** | `route-scan rules` ๋ก ํ์ธํ๊ณ ์น์ธยท์ญ์ |
|
|
139
|
-
| `handoff` (ํ๋ ์๋ฐ ์ ์์
๋ฐฑ์
) | ํ์ํ ๋ ์ง์ ์คํํ๋ ๋ช
๋ น์
๋๋ค | ํด๋น ์์ต๋๋ค |
|
|
140
|
-
|
|
141
|
-
`compact-window set` ์ Claude Code ์ `settings.json` ์ ๊ฐ์ ์ ๊ณ , ์ ์ญ๊ณผ ํ๋ก์ ํธ ์ค ์ด๋์ ์ ์์ง๋ ์ฌ๋์ด ์ ํด์ผ ํ๋ฏ๋ก ์๋์ผ๋ก ์คํํ์ง ์์ต๋๋ค. ๋ชจ๋ธ ํผํ
๋ฃฐ๋ ๊ฐ์ ์ด์ ๋ก ์น์ธ ๋จ๊ณ๋ฅผ ๋จ๊ฒจ ๋์์ต๋๋ค. ์ด๋ค ์์
์ ๋ ์ผ ํฐ์ด์ ๋งก๊ธธ์ง๋ ์ฌ์ฉ์์ ํ๋จ์ด ํ์ํฉ๋๋ค.
|
|
142
|
-
|
|
143
154
|
## statusline ์ฝ๋ ๋ฒ
|
|
144
155
|
|
|
145
156
|
์ ๊ฐ ์์ฅ์ ๊ธฐ๋ก์ด ์์ด๋ฉด statusline์ด **๋ ์ค๋ก** ์ถ๋ ฅ๋ฉ๋๋ค. ์ฒซ์งธ ์ค์๋ ๋ผ์ฐํ
์ ๊ฐ์ก๋ง ํ์ํ๊ณ , ๋์งธ ์ค์๋ ์ง๋จ ์นฉ์ ํ์ํฉ๋๋ค.
|
|
@@ -153,7 +164,8 @@ npm i -g claude-token-saver
|
|
|
153
164
|
|
|
154
165
|
| ์ธ๊ทธ๋จผํธ | ์๋ฏธ |
|
|
155
166
|
|---|---|
|
|
156
|
-
| `๐` **์ฒซ์งธ ์ค** |
|
|
167
|
+
| `๐` **์ฒซ์งธ ์ค** | ๋ผ์ฐํ
์ผ๋ก ์ ๊ฐํ ๋์ ๊ธ์ก๊ณผ ๋ชจ๋ธ ์ด๋ ๋ด์ญ์
๋๋ค. ๋ด์ญ ํฉ๊ณ๋ ๋์ ๊ธ์ก๊ณผ ์ ํํ ์ผ์นํ๊ณ , ๋ชจ๋ธ๋ช
์ ๊ณ์ด๋ง ๋จ๊น๋๋ค(`opusโhaiku`). ๊ทผ๊ฑฐ๋ `route-scan savings` ๋ก ์ ๋ถ ํ์ธํ ์ ์์ต๋๋ค |
|
|
168
|
+
| `๐` **๋์งธ ์ค** | doc2md ๋ฌธ์ ๋ณํ์ด ์ ๊ฐํ ๋์ ๊ธ์ก๊ณผ ํ์๋ณ ๋ด์ญ์
๋๋ค. ๋ผ์ฐํ
๊ณผ ๋ฌธ์ ๋ณํ ์ค ๊ธ์ก์ด ํฐ ์ชฝ์ด ์ฒซ์งธ ์ค์ ์ฐจ์งํฉ๋๋ค |
|
|
157
169
|
| `๐ค` | ํ์ฌ ๋ชจ๋ธ |
|
|
158
170
|
| `๐
ท 5/5` | harness ์์น ์ ์ ([Harness ๋ชจ๋](#-harness-๋ชจ๋)) |
|
|
159
171
|
| `๐ง ` | ์บ์ ํํธ์จ (85%+ ๋
น์) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-token-saver",
|
|
3
|
-
"version": "3.35.
|
|
3
|
+
"version": "3.35.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": {
|