Skip to content
Back to search

usage-limit-reducer

A Claude Code skill that stops you from burning through your usage limit.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/dubibubii--usage-limit-reducer/badge.svg)](/listings/dubibubii--usage-limit-reducer)

HTML

<a href="/listings/dubibubii--usage-limit-reducer"><img src="/api/listings/dubibubii--usage-limit-reducer/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

git clone <this-repo> ~/.claude/skills/usage-limit-reducer

Or, if you already cloned it elsewhere:

cp -r . ~/.claude/skills/usage-limit-reducer/

Restart Claude Code. It will show up in the skills list and auto-trigger on phrases like:

- "hit my limit" / "usage limit" / "running out of tokens" - "save tokens" / "reduce usage" / "am I wasting tokens" - "this chat is getting long" - "which model should I use"

You can also invoke it directly: `/usage-limit-reducer`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 70 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: usage-limit-reducer
  3. description: Use when the user is hitting Claude usage limits, burning through tokens fast, running a long conversation, or asks how to use Claude Code more efficiently. Triggers on phrases like "hit my limit", "running out of tokens", "usage limit", "save tokens", "reduce usage", "am I wasting tokens", "this chat is getting long", "which model should I use". Diagnoses the current session, runs a real token-usage report from local JSONL logs, and applies Dubi's 11 rules for reducing Claude usage.
  4. ---
  5. # Usage Limit Reducer
  6. Apply Dubi's 11 rules for cutting Claude token usage. Claude re-reads the entire conversation every turn, so 98.5% of tokens often go to re-reading history instead of generating responses. This skill diagnoses where the user's tokens are going and applies the rules that actually move the needle.
  7. ## How to run this skill
  8. Do the steps in order. Skip any step that clearly doesn't apply, but don't skip all of them — the value is in matching rules to what the user is actually doing.
  9. ### Step 1 — Run the real token-usage report
  10. Rule #4: "you can't fix what you can't measure." Claude Code already writes every token, model, and timestamp to `~/.claude/projects/<project>/<session>.jsonl`. Run the bundled script to show the breakdown (use the absolute path to `scripts/usage-report.py` inside this skill's directory):
  11. ```bash
  12. python3 <SKILL_DIR>/scripts/usage-report.py --days 7
  13. ```
  14. Flags: `--days N` (default 7), `--project <substring>` to scope by cwd, `--json` for machine-readable output. Share the headline numbers with the user — cache-hit % and model mix are the two that matter most. A low cache-hit % (under ~60%) means too many fresh chats or cache-busting edits; high Opus share for routine work means Rule #8 applies.
  15. ### Step 2 — Diagnose the current session
  16. Before advising, check three things:
  17. 1. **Conversation length.** If this session already has many turns, rule #2 applies directly. Suggest `/compact` (summarize in place) or `/clear` then paste a one-paragraph summary as the first message of the new chat.
  18. 2. **CLAUDE.md presence.** Check the project root for `CLAUDE.md` and `~/.claude/CLAUDE.md`. If missing, rule #6 applies — offer to create one with the user's role, style, and project conventions so every new session doesn't burn 3–5 messages on setup.
  19. 3. **Model in use.** If the user is on Opus for trivial tasks (grammar, formatting, short answers, quick renames), rule #8 applies — recommend `/model claude-haiku-4-5` for those and keep Opus for deep work.
  20. ### Step 3 — Apply the rules that match
  21. Pick the 2–4 rules most relevant to what the user is doing right now. Don't dump all 11 on them. For each rule you pick, say (a) what to do, (b) why it works, (c) the concrete next action.
  22. | # | Rule | Claude Code action |
  23. |---|------|--------------------|
  24. | 1 | Don't follow up to correct — restart with a fixed prompt | When Claude misunderstands, `/clear` and re-prompt instead of piling on corrections |
  25. | 2 | Fresh chat every 15–20 turns | `/compact` to summarize in place, or `/clear` + paste summary |
  26. | 3 | Batch questions into one message | Combine related asks into one prompt; Claude often answers better with full picture |
  27. | 4 | Track actual token usage | Run the script in Step 1 |
  28. | 5 | Reuse recurring context | Put it in `CLAUDE.md`, a skill, or `.context/` — not re-pasted each session |
  29. | 6 | Set up memory / user preferences | Create or update `CLAUDE.md`; use the memory system under `~/.claude/projects/*/memory/` |
  30. | 7 | Turn off features you don't use | Audit `~/.claude/settings.json` for unused MCP servers, hooks, permissions |
  31. | 8 | Use Haiku for simple tasks | `/model claude-haiku-4-5` for grammar, drafts, formatting, quick lookups |
  32. | 9 | Spread work across the day | 5-hour rolling window — split into 2–3 sessions instead of one marathon |
  33. | 10 | Work off-peak | Peak is 5–11am PT / 8am–2pm ET weekdays; evenings and weekends stretch your plan |
  34. | 11 | Enable Overage as a safety net | Settings → Usage on Pro/Max plans — pay-as-you-go kicks in at the limit |
  35. ### Step 4 — Offer concrete next actions
  36. End with a short, ordered list of what to do *now*, based on the diagnosis. Examples:
  37. - "Run `/compact` — this conversation is 40+ turns."
  38. - "I can create a `CLAUDE.md` with your preferences — want me to?"
  39. - "Switch to Haiku for this rename: `/model claude-haiku-4-5`."
  40. Don't recite every rule. Don't lecture. Match the advice to what the session actually shows.
  41. ## Rules not implementable in Claude Code
  42. - Rule #1 ("Edit your prompt") is a claude.ai web UI feature — in Claude Code the equivalent is `/clear` + restart.
  43. - Rule #5 ("Upload to Projects") is also web-only — use `CLAUDE.md`, skills, and `.context/` instead.
  44. - Rule #11 (Overage) is plan-level — mention it, don't implement it.
  45. ## What this skill does NOT do
  46. - It does not silently change the user's model or settings. Recommend, then act only on confirmation.
  47. - It does not summarize-and-clear without asking — the user may have unsaved context in the conversation.
  48. - It does not send data anywhere. The usage report is strictly local.
README.md · README · 113 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # usage-limit-reducer
  2. A Claude Code skill that stops you from burning through your usage limit.
  3. Claude 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.
  4. ## What it does
  5. When you trigger the skill, it:
  6. 1. **Measures** — runs `scripts/usage-report.py` against `~/.claude/projects/*/*.jsonl` and shows token/cost breakdowns by model, project, and day (with cache-hit % and heuristic callouts).
  7. 2. **Diagnoses** the current session — conversation length, `CLAUDE.md` presence, model in use.
  8. 3. **Applies** the 2–4 rules most relevant to what it finds. No dumping all 11 on you.
  9. 4. **Suggests** concrete next actions (`/compact`, `/clear`, `/model claude-haiku-4-5`, create CLAUDE.md, etc.) and acts only on confirmation.
  10. ## Install
  11. ```bash
  12. git clone <this-repo> ~/.claude/skills/usage-limit-reducer
  13. ```
  14. Or, if you already cloned it elsewhere:
  15. ```bash
  16. cp -r . ~/.claude/skills/usage-limit-reducer/
  17. ```
  18. Restart Claude Code. It will show up in the skills list and auto-trigger on phrases like:
  19. - "hit my limit" / "usage limit" / "running out of tokens"
  20. - "save tokens" / "reduce usage" / "am I wasting tokens"
  21. - "this chat is getting long"
  22. - "which model should I use"
  23. You can also invoke it directly: `/usage-limit-reducer`.
  24. ## Standalone: the token report
  25. The script is useful on its own, outside the skill:
  26. ```bash
  27. python3 ~/.claude/skills/usage-limit-reducer/scripts/usage-report.py --days 7
  28. python3 ~/.claude/skills/usage-limit-reducer/scripts/usage-report.py --days 30 --project myrepo
  29. python3 ~/.claude/skills/usage-limit-reducer/scripts/usage-report.py --json # machine-readable
  30. ```
  31. Example output:
  32. ```
  33. Claude Code usage — last 7 day(s)
  34. ------------------------------------------------------------------------
  35. Turns: 110
  36. Input: 274 fresh + 6.16M cache-read + 934.3K cache-write
  37. Output: 152.9K
  38. Cache hit: 86.8% of input tokens came from cache
  39. Estimated $: ~$38.22 (API list prices; subscription is flat)
  40. By model (top by cost):
  41. claude-opus-4-7 turns= 109 in= 274 out= 152.9K cache_r= 6.16M (86.8%) ~$38.22
  42. Heuristics:
  43. - Cache hit is 86.8% — healthy.
  44. - Opus is 100% of spend. Consider Haiku (/model claude-haiku-4-5) for simple edits.
  45. ```
  46. **What's read:** every JSONL file under `~/.claude/projects/`. **What leaves your machine:** nothing. No network calls.
  47. **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."
  48. ## The 11 rules, and what each maps to
  49. | # | Rule | Implementation in Claude Code |
  50. |---|------|-------------------------------|
  51. | 1 | Don't follow up to correct — restart | Skill suggests `/clear` + re-prompt instead of piling on corrections |
  52. | 2 | Fresh chat every 15–20 turns | Skill suggests `/compact` or `/clear` + paste summary |
  53. | 3 | Batch questions into one message | Skill coaches on combining related asks |
  54. | 4 | Track actual token usage | **`scripts/usage-report.py`** — reads local JSONL logs |
  55. | 5 | Reuse recurring context | Skill points at `CLAUDE.md`, skills, `.context/` |
  56. | 6 | Set up memory / user preferences | Skill checks for `CLAUDE.md`, offers to create it |
  57. | 7 | Turn off features you don't use | Skill flags unused MCPs/hooks in `settings.json` |
  58. | 8 | Use Haiku for simple tasks | Skill recommends `/model claude-haiku-4-5` when Opus share is high |
  59. | 9 | Spread work across the day | Skill advises splitting into 2–3 sessions (5-hour rolling window) |
  60. | 10 | Work off-peak | Skill flags peak hours (5–11am PT / 8am–2pm ET weekdays) |
  61. | 11 | Enable Overage as a safety net | Skill mentions the Settings → Usage option on Pro/Max |
  62. **Not implementable in Claude Code** (flagged honestly by the skill):
  63. - Rule #1's "edit the original prompt" is a claude.ai web UI feature.
  64. - Rule #5's "upload to Projects" is also web-only.
  65. - Rule #11's Overage toggle is plan-level.
  66. ## Layout
  67. ```
  68. usage-limit-reducer/
  69. ├── SKILL.md # what Claude reads when the skill triggers
  70. ├── README.md # this file (for humans)
  71. └── scripts/
  72. ├── usage-report.py # the local token dashboard
  73. └── test_usage_report.py # 16 unit + CLI tests
  74. ```
  75. ## Tests
  76. ```bash
  77. python3 scripts/test_usage_report.py
  78. ```
  79. Covers price lookups, aggregation math, `--days` cutoff, `--project` filter, malformed-JSONL handling, CLI text/JSON output, and a regression test for the `defaultdict(lambda: dict(totals))` shared-state bug.
  80. ## Credit
  81. The 11 rules are from Dubi's article. This skill just wires them into Claude Code with real measurement.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.