claude-token-saver 2.13.0 → 2.13.2

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 +51 -2
  2. package/README.md +22 -1
  3. package/package.json +3 -3
package/README.en.md CHANGED
@@ -1,6 +1,6 @@
1
1
  [한국어](./README.md) · **English**
2
2
 
3
- [![DeepPulse YouTube](https://img.shields.io/badge/YouTube-@deeppulse-FF0000?logo=youtube&logoColor=white)](https://www.youtube.com/@deeppulse)
3
+ [![DeepPulse YouTube](https://img.shields.io/badge/YouTube-@DeepPulseKR-FF0000?logo=youtube&logoColor=white)](https://www.youtube.com/@DeepPulseKR)
4
4
  [![npm](https://img.shields.io/npm/v/claude-token-saver.svg)](https://www.npmjs.com/package/claude-token-saver)
5
5
 
6
6
  # claude-token-saver
@@ -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 |
@@ -204,7 +246,7 @@ Node.js ≥ 18 · macOS / Windows / Linux / WSL · zero dependencies.
204
246
 
205
247
  - [GitHub Issue #46829](https://github.com/anthropics/claude-code/issues/46829) — cache TTL regression
206
248
  - [HN discussion](https://news.ycombinator.com/item?id=47736476) — 168 points, 142 comments
207
- - [HNPulse KR](https://www.youtube.com/@HNPulseKR) — Korean HN tech deep-dives
249
+ - [HNPulse KR](https://www.youtube.com/@DeepPulseKR) — Korean HN tech deep-dives
208
250
 
209
251
  ## Known environment quirks
210
252
 
@@ -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
@@ -1,6 +1,6 @@
1
1
  **한국어** · [English](./README.en.md)
2
2
 
3
- [![DeepPulse YouTube](https://img.shields.io/badge/YouTube-@deeppulse-FF0000?logo=youtube&logoColor=white)](https://www.youtube.com/@deeppulse)
3
+ [![DeepPulse YouTube](https://img.shields.io/badge/YouTube-@DeepPulseKR-FF0000?logo=youtube&logoColor=white)](https://www.youtube.com/@DeepPulseKR)
4
4
  [![npm](https://img.shields.io/npm/v/claude-token-saver.svg)](https://www.npmjs.com/package/claude-token-saver)
5
5
 
6
6
  # claude-token-saver
@@ -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.2",
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": {
@@ -37,9 +37,9 @@
37
37
  "type": "git",
38
38
  "url": "git+https://github.com/rootstudioyaml/claude-token-saver.git"
39
39
  },
40
- "homepage": "https://www.youtube.com/@deeppulse",
40
+ "homepage": "https://www.youtube.com/@DeepPulseKR",
41
41
  "bugs": {
42
42
  "url": "https://github.com/rootstudioyaml/claude-token-saver/issues"
43
43
  },
44
- "author": "DeepPulse (https://www.youtube.com/@deeppulse)"
44
+ "author": "DeepPulse (https://www.youtube.com/@DeepPulseKR)"
45
45
  }