claude-token-saver 2.13.0 โ†’ 2.13.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.
Files changed (3) hide show
  1. package/README.en.md +49 -0
  2. package/README.md +21 -0
  3. package/package.json +1 -1
package/README.en.md CHANGED
@@ -9,8 +9,25 @@
9
9
 
10
10
  A CLI to **diagnose and save tokens on Claude Code**. Cache hit rate, TTL countdown, 1M-context detection, 5h/7d cap warnings โ€” all in one statusline chip.
11
11
 
12
+ ![statusline example](./docs/statusline.png)
13
+
12
14
  ๐Ÿ“บ [Launch Short (60s)](https://www.youtube.com/shorts/RaD8qMsPTnA)
13
15
 
16
+ ## Real-world impact โ€” harness 5/5 + ratchet adoption
17
+
18
+ ![claude-token-saver before/after](./docs/harness-impact.png)
19
+
20
+ Author's own Claude Code logs, normalized **per user message**, before/after adopting harness rules on 2026-05-02 (Opus 4.7 pricing):
21
+
22
+ | metric | before (7d / 739 msgs) | after (2d / 157 msgs) | ฮ” |
23
+ |---|---:|---:|---:|
24
+ | cost / user message | $2.345 | $1.910 | **โˆ’18.6%** |
25
+ | output tokens / user message | 7,391 | 6,052 | โˆ’18.1% |
26
+ | assistant turns / user message | 9.73 | 8.83 | โˆ’9.2% |
27
+ | tool calls / user message | 5.72 | 5.25 | โˆ’8.2% |
28
+
29
+ > โš ๏ธ **Sample caveats** โ€” POST window is only 2 days (157 msgs); statistical confidence is low. The work topic mix differs week to week (PRE week was video-script production with long pasted text, POST week was package release with short directives), so the tool/harness effect is not cleanly isolated. Refresh planned around **2026-05-09** once 5 more days of POST data are in.
30
+
14
31
  ---
15
32
 
16
33
  ## Install
@@ -151,6 +168,31 @@ All of the commands below run in your **shell (terminal)**. Inside a Claude Code
151
168
  | `--segments=โ€ฆ` | Limit statusline segments (e.g. `model,five_hour,seven_day,saved`) | all |
152
169
  | `--install-hook` / `--uninstall-hook` | Manage the PostToolUse hook | โ€“ |
153
170
 
171
+ ## ๐Ÿ…ท Harness mode
172
+
173
+ Bootstrap five engineering principles (Ratchet, Evidence, PEV, Structured Task, Default Safe Path) into your project's `CLAUDE.md` with one command, then watch the statusline track your score (`๐Ÿ…ท 5/5`). When the same error keeps recurring, a `๐Ÿ…ทโš  ratchet?` nudge appears.
174
+
175
+ ```bash
176
+ claude-token-saver harness init # writes CLAUDE.md (5 sections) + .claude/ratchet.md
177
+ claude-token-saver harness check # current score
178
+ claude-token-saver harness promote <N> # turn statusline warning #N into a one-line ratchet rule
179
+ claude-token-saver harness list # list registered ratchet rules with numbers
180
+ claude-token-saver harness rm <N> # delete rule N (auto .bak backup)
181
+ claude-token-saver harness uninit # remove the harness block (other CLAUDE.md content preserved)
182
+ claude-token-saver harness off | on # toggle the ๐Ÿ…ท chip
183
+ ```
184
+
185
+ ### โš ๏ธ `harness rm` โ€” handle with care
186
+
187
+ The whole point of the ratchet is **one-direction accumulation**. Deleting rules casually means the same mistakes start re-occurring. **Before deleting, ask**:
188
+
189
+ - **Is the rule too broad and blocking valid cases?** โ†’ โŒ delete โœ… **narrow the condition instead**
190
+ - e.g. `"no hardcoded values"` โ†’ `"no hardcoded values outside tests"`
191
+ - **Is the rule too narrow and almost never firing?** โ†’ โŒ delete โœ… **leave it** (zero cost)
192
+ - **Genuinely wrong rule?** โ†’ โœ… delete then
193
+
194
+ Most "over-ratcheting" complaints turn out to be **rules that weren't phrased tightly enough**. Open `.claude/ratchet.md` and refine the condition first; deletion is the last resort. An auto `.bak` is left behind, but **the session context that made the rule earn its place is not recoverable**.
195
+
154
196
  ## Spike issue codes
155
197
 
156
198
  | Code | Meaning |
@@ -212,6 +254,13 @@ Node.js โ‰ฅ 18 ยท macOS / Windows / Linux / WSL ยท zero dependencies.
212
254
 
213
255
  ## Release notes
214
256
 
257
+ ### v2.13.1 (2026-05-04)
258
+ - README now opens with the actual statusline screenshot and a "harness 5/5 + ratchet โ€” before/after" impact chart, with daily/monthly/yearly cost-savings impact card. Author's own logs show โˆ’18.6% cost / user message, โˆ’9.2% assistant turns. Sample caveats, work-topic confound, and refresh schedule (2026-05-09) called out.
259
+ - npm package metadata cleaned up (homepage / bugs / author) โ€” package page now links to the DeepPulse YouTube channel.
260
+
261
+ ### v2.11.0 (2026-05-02)
262
+ - Added `harness list` / `harness rm <N>` to view registered ratchet rules with numbers and delete individually (auto `.bak` backup). The CLI prompts users to "narrow the condition first" before deleting; see [โš ๏ธ `harness rm` โ€” handle with care](#๏ธ-harness-rm--handle-with-care).
263
+
215
264
  ### v2.9.4 (2026-04-27)
216
265
  - README now opens with a Node.js prerequisite block (macOS / Windows / Linux). First-time visitors arriving from GitHub no longer hit `npm: command not found` with no guidance. Also flags the `sudo` global-install trap where postinstall writes the Skill under root's home instead of the user's.
217
266
 
package/README.md CHANGED
@@ -9,8 +9,25 @@
9
9
 
10
10
  Claude Code์˜ **ํ† ํฐ ์‚ฌ์šฉ๋Ÿ‰์„ ์ง„๋‹จยท์ ˆ์•ฝ**ํ•˜๋Š” CLI. ์บ์‹œ ํžˆํŠธ์œจ, TTL ์นด์šดํŠธ๋‹ค์šด, 1M ์ปจํ…์ŠคํŠธ ๊ฐ์ง€, 5h/7d ํ•œ๋„ ๊ฒฝ๊ณ ๋ฅผ statusline ํ•œ ์ค„๋กœ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.
11
11
 
12
+ ![statusline ์˜ˆ์‹œ](./docs/statusline.png)
13
+
12
14
  ๐Ÿ“บ [์ถœ์‹œ ์˜์ƒ (60์ดˆ)](https://www.youtube.com/shorts/RaD8qMsPTnA)
13
15
 
16
+ ## ์‹ค์ œ ํšจ๊ณผ โ€” harness 5/5 + ratchet ์ ์šฉ ์ „ํ›„
17
+
18
+ ![claude-token-saver ์„ค์น˜ ์ „/ํ›„ ํšจ๊ณผ](./docs/harness-impact.png)
19
+
20
+ ์ €์ž ๋ณธ์ธ์˜ Claude Code ์‚ฌ์šฉ ๋กœ๊ทธ๋ฅผ **์‚ฌ์šฉ์ž ๋ฉ”์‹œ์ง€ 1๊ฑด๋‹น**์œผ๋กœ ์ •๊ทœํ™”ํ•ด ๋น„๊ตํ•œ ๊ฒฐ๊ณผ (2026-05-02 ์ ์šฉ ์‹œ์ , Opus 4.7 ๊ฐ€๊ฒฉ ๊ธฐ์ค€):
21
+
22
+ | ๋ฉ”ํŠธ๋ฆญ | ์„ค์น˜ ์ „ (7์ผ / 739msg) | ์„ค์น˜ ํ›„ (2์ผ / 157msg) | ๋ณ€ํ™” |
23
+ |---|---:|---:|---:|
24
+ | ๋ฉ”์‹œ์ง€๋‹น ๋น„์šฉ | $2.345 | $1.910 | **โˆ’18.6%** |
25
+ | ๋ฉ”์‹œ์ง€๋‹น ์ถœ๋ ฅ ํ† ํฐ | 7,391 | 6,052 | โˆ’18.1% |
26
+ | ๋ฉ”์‹œ์ง€๋‹น assistant ์™•๋ณต | 9.73 | 8.83 | โˆ’9.2% |
27
+ | ๋ฉ”์‹œ์ง€๋‹น ๋„๊ตฌ ํ˜ธ์ถœ | 5.72 | 5.25 | โˆ’8.2% |
28
+
29
+ > โš ๏ธ **์ƒ˜ํ”Œ ์ฃผ์˜** โ€” POST ๋ฐ์ดํ„ฐ๋Š” 2์ผ์น˜(157 msgs)๋กœ ํ†ต๊ณ„์  ์˜๋ฏธ๊ฐ€ ์•ฝํ•˜๊ณ , ๊ทธ ์ฃผ์— ๋ฌด์Šจ ์ž‘์—…์„ ํ–ˆ๋ƒ(๊ธด ํ…์ŠคํŠธ vs ์งง์€ ์ง€์‹œ)๊ฐ€ ๊ฒฐ๊ณผ์— ์„ž์—ฌ ์žˆ์Šต๋‹ˆ๋‹ค. 5์ผ์น˜๊ฐ€ ๋” ์Œ“์ด๋Š” **2026-05-09๊ฒฝ** ๊ฐ™์€ ๋ถ„์„์„ ๋‹ค์‹œ ๋Œ๋ ค ๊ฐฑ์‹ ํ•  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค.
30
+
14
31
  ---
15
32
 
16
33
  ## ์„ค์น˜
@@ -197,6 +214,10 @@ Node.js โ‰ฅ 18 ยท macOS / Linux / Windows / WSL ยท ์˜์กด์„ฑ 0.
197
214
 
198
215
  ## ๋ฆด๋ฆฌ์Šค ๋…ธํŠธ
199
216
 
217
+ ### v2.13.1 (2026-05-04)
218
+ - README์— ์‹ค์ œ statusline ์Šคํฌ๋ฆฐ์ƒท๊ณผ "harness 5/5 + ratchet ์ ์šฉ ์ „ํ›„ ํšจ๊ณผ" ์ฐจํŠธ ์ถ”๊ฐ€. ์ž์ฒด ์‚ฌ์šฉ ๋กœ๊ทธ ๊ธฐ์ค€ ๋ฉ”์‹œ์ง€๋‹น ๋น„์šฉ โˆ’18.6%, assistant ์™•๋ณต โˆ’9.2%, ์ผ/์›”/๋…„ ํ™˜์‚ฐ ๋น„์šฉ ์ ˆ๊ฐ ์ž„ํŒฉํŠธ ์นด๋“œ ํฌํ•จ. ์ƒ˜ํ”Œ ์ฃผ์˜์‚ฌํ•ญยท์ž‘์—… ํ† ํ”ฝ ๋ณ€์ˆ˜ยท๊ฐฑ์‹  ์ผ์ •(2026-05-09) ๋ช…์‹œ.
219
+ - npm ํŒจํ‚ค์ง€ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ(homepage / bugs / author) ์ •๋น„ โ€” DeepPulse YouTube ์ฑ„๋„ ๋งํฌ ๋…ธ์ถœ.
220
+
200
221
  ### v2.11.0 (2026-05-02)
201
222
  - `harness list` / `harness rm <N>` ์ถ”๊ฐ€. ๋“ฑ๋ก๋œ ratchet ๋ฃฐ์„ ๋ฒˆํ˜ธ๋กœ ๋ณด๊ณ  ๊ฐœ๋ณ„ ์‚ญ์ œ ๊ฐ€๋Šฅ (์ž๋™ `.bak` ๋ฐฑ์—…). ์‚ญ์ œ ์ „ "์กฐ๊ฑด์„ ์ขํ˜€์„œ ๋‹ค๋“ฌ๊ธฐ" ์šฐ์„  ๊ฒ€ํ†  ์•ˆ๋‚ด๊ฐ€ CLI์— ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค. README์˜ [โš ๏ธ ์ฃผ์˜ โ€” `harness rm`์€ ์‹ ์ค‘ํ•˜๊ฒŒ](#๏ธ-์ฃผ์˜--harness-rm์€-์‹ ์ค‘ํ•˜๊ฒŒ) ํ•ญ๋ชฉ ์ฐธ๊ณ .
202
223
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-token-saver",
3
- "version": "2.13.0",
3
+ "version": "2.13.1",
4
4
  "description": "Save tokens on Claude Code โ€” spike diagnosis, 1M-context detection, TTL countdown, statusline. (formerly claude-cache-monitor)",
5
5
  "type": "module",
6
6
  "bin": {