[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2034":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":13,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":14,"lastSyncTime":26,"discoverSource":27},2034,"usage-limit-reducer","Dubibubii\u002Fusage-limit-reducer","Dubibubii","A Claude Code skill that stops you from burning through your usage limit.","https:\u002F\u002Fwww.youtube.com\u002F@Dubibubii",null,"Python",181,39,2,0,3,7,9,4.81,false,"main",[],"2026-06-12 02:00:36","# usage-limit-reducer\n\nA Claude Code skill that stops you from burning through your usage limit.\n\nClaude re-reads the entire conversation on every turn. One developer measured it: **98.5% of his tokens went to re-reading history, only 1.5% to generating responses.** This skill diagnoses where your tokens are actually going and applies Dubi's 11 rules for cutting usage — using real data from the JSONL logs Claude Code already writes to your disk.\n\n## What it does\n\nWhen you trigger the skill, it:\n\n1. **Measures** — runs `scripts\u002Fusage-report.py` against `~\u002F.claude\u002Fprojects\u002F*\u002F*.jsonl` and shows token\u002Fcost breakdowns by model, project, and day (with cache-hit % and heuristic callouts).\n2. **Diagnoses** the current session — conversation length, `CLAUDE.md` presence, model in use.\n3. **Applies** the 2–4 rules most relevant to what it finds. No dumping all 11 on you.\n4. **Suggests** concrete next actions (`\u002Fcompact`, `\u002Fclear`, `\u002Fmodel claude-haiku-4-5`, create CLAUDE.md, etc.) and acts only on confirmation.\n\n## Install\n\n```bash\ngit clone \u003Cthis-repo> ~\u002F.claude\u002Fskills\u002Fusage-limit-reducer\n```\n\nOr, if you already cloned it elsewhere:\n\n```bash\ncp -r . ~\u002F.claude\u002Fskills\u002Fusage-limit-reducer\u002F\n```\n\nRestart Claude Code. It will show up in the skills list and auto-trigger on phrases like:\n\n- \"hit my limit\" \u002F \"usage limit\" \u002F \"running out of tokens\"\n- \"save tokens\" \u002F \"reduce usage\" \u002F \"am I wasting tokens\"\n- \"this chat is getting long\"\n- \"which model should I use\"\n\nYou can also invoke it directly: `\u002Fusage-limit-reducer`.\n\n## Standalone: the token report\n\nThe script is useful on its own, outside the skill:\n\n```bash\npython3 ~\u002F.claude\u002Fskills\u002Fusage-limit-reducer\u002Fscripts\u002Fusage-report.py --days 7\npython3 ~\u002F.claude\u002Fskills\u002Fusage-limit-reducer\u002Fscripts\u002Fusage-report.py --days 30 --project myrepo\npython3 ~\u002F.claude\u002Fskills\u002Fusage-limit-reducer\u002Fscripts\u002Fusage-report.py --json   # machine-readable\n```\n\nExample output:\n\n```\nClaude Code usage — last 7 day(s)\n------------------------------------------------------------------------\nTurns:        110\nInput:        274 fresh  +  6.16M cache-read  +  934.3K cache-write\nOutput:       152.9K\nCache hit:    86.8% of input tokens came from cache\nEstimated $:  ~$38.22 (API list prices; subscription is flat)\n\nBy model (top by cost):\n  claude-opus-4-7     turns= 109  in=   274  out= 152.9K  cache_r= 6.16M (86.8%)  ~$38.22\n\nHeuristics:\n  - Cache hit is 86.8% — healthy.\n  - Opus is 100% of spend. Consider Haiku (\u002Fmodel claude-haiku-4-5) for simple edits.\n```\n\n**What's read:** every JSONL file under `~\u002F.claude\u002Fprojects\u002F`. **What leaves your machine:** nothing. No network calls.\n\n**Pricing note:** the `$` figure uses API list prices as a relative-comparison tool. If you're on a Claude Code subscription plan, billing is flat — treat the number as \"what this would cost on the API.\"\n\n## The 11 rules, and what each maps to\n\n| # | Rule | Implementation in Claude Code |\n|---|------|-------------------------------|\n| 1 | Don't follow up to correct — restart | Skill suggests `\u002Fclear` + re-prompt instead of piling on corrections |\n| 2 | Fresh chat every 15–20 turns | Skill suggests `\u002Fcompact` or `\u002Fclear` + paste summary |\n| 3 | Batch questions into one message | Skill coaches on combining related asks |\n| 4 | Track actual token usage | **`scripts\u002Fusage-report.py`** — reads local JSONL logs |\n| 5 | Reuse recurring context | Skill points at `CLAUDE.md`, skills, `.context\u002F` |\n| 6 | Set up memory \u002F user preferences | Skill checks for `CLAUDE.md`, offers to create it |\n| 7 | Turn off features you don't use | Skill flags unused MCPs\u002Fhooks in `settings.json` |\n| 8 | Use Haiku for simple tasks | Skill recommends `\u002Fmodel claude-haiku-4-5` when Opus share is high |\n| 9 | Spread work across the day | Skill advises splitting into 2–3 sessions (5-hour rolling window) |\n| 10 | Work off-peak | Skill flags peak hours (5–11am PT \u002F 8am–2pm ET weekdays) |\n| 11 | Enable Overage as a safety net | Skill mentions the Settings → Usage option on Pro\u002FMax |\n\n**Not implementable in Claude Code** (flagged honestly by the skill):\n\n- Rule #1's \"edit the original prompt\" is a claude.ai web UI feature.\n- Rule #5's \"upload to Projects\" is also web-only.\n- Rule #11's Overage toggle is plan-level.\n\n## Layout\n\n```\nusage-limit-reducer\u002F\n├── SKILL.md                  # what Claude reads when the skill triggers\n├── README.md                 # this file (for humans)\n└── scripts\u002F\n    ├── usage-report.py       # the local token dashboard\n    └── test_usage_report.py  # 16 unit + CLI tests\n```\n\n## Tests\n\n```bash\npython3 scripts\u002Ftest_usage_report.py\n```\n\nCovers price lookups, aggregation math, `--days` cutoff, `--project` filter, malformed-JSONL handling, CLI text\u002FJSON output, and a regression test for the `defaultdict(lambda: dict(totals))` shared-state bug.\n\n## Credit\n\nThe 11 rules are from Dubi's article. This skill just wires them into Claude Code with real measurement.\n","usage-limit-reducer 是一个旨在帮助用户减少 Claude 代码使用量的技能，避免快速耗尽使用限额。其核心功能包括测量和诊断当前会话中的令牌使用情况，并基于 Dubi 的11条规则来优化使用效率。通过分析JSONL日志文件，该工具能够提供详细的令牌\u002F成本分解报告，并根据实际数据建议具体的改进措施。适用于频繁使用 Claude 进行开发且希望控制成本的场景。此外，它还支持作为独立脚本运行，以生成指定时间段内的令牌使用报告，便于进一步分析。","2026-06-11 02:47:42","CREATED_QUERY"]