Back to search
frugal
MarketplaceWorks with Claude CodeGitHub
frugal: benchmarked token-saving skill for Claude Code
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
Markdown
[](/listings/eylul-eylul--frugal-skill)HTML
<a href="/listings/eylul-eylul--frugal-skill"><img src="/api/listings/eylul-eylul--frugal-skill/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
As a Claude Code plugin:
/plugin marketplace add eylul-eylul/frugal-skill /plugin install frugal@frugal
Or copy the skill folder:
git clone https://github.com/eylul-eylul/frugal-skill cp -r frugal-skill/skills/frugal ~/.claude/skills/frugal
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.
.claude-plugin/marketplace.json · Manifest · 14 lines
- {
- "name": "frugal",
- "owner": {
- "name": "eylul-eylul"
- },
- "description": "frugal: benchmarked token-saving skill for Claude Code",
- "plugins": [
- {
- "name": "frugal",
- "source": "./",
- "description": "Token-saving skill for Claude Code, with a reproducible benchmark."
- }
- ]
- }
README.md · README · 94 lines
- # frugal
- A Claude Code skill that cuts token use across a whole session, not just in replies. It keeps every fact, path, error and decision.
- **Measured result** (Claude Code 2.1.325, Sonnet, 77 runs on a reproducible fixture, every task graded automatically):
- | | baseline | caveman | **frugal** |
- |---|---|---|---|
- | Tasks passed | 28/28 | 21/21 | **28/28** |
- | Cost, 7 tasks × 3 reps (matched runs) | $1.82 | $1.94 (+6.6%) | **$1.68 (−7.7%)** |
- | Cost, long multi-step task (n=10 each) | $0.171 | – | **$0.145 (−15.1%, 95% CI −24.4% … −3.5%)** |
- | Output tokens (matched runs) | 36.3k | 38.9k | **30.8k (−15%)** |
- | Tool output pulled into context | 163k chars | 93k | **89k (−46%)** |
- | Turns | 154 | 169 | **137 (−11%)** |
- On short tasks (2–8 turns) frugal comes out about even with baseline. The saving appears once context builds up, which is where most real sessions spend their tokens. Full tables: [bench/results/v2/summary.md](bench/results/v2/summary.md).
- ## Why another token skill
- Output-style skills like caveman shorten the answer. In Claude Code, though, the answer is the small part of the bill. Every tool result (file reads, grep hits, test logs) stays in context and is re-sent on every later turn. Claude Code's prompt is also re-sent every turn, so each extra turn costs a full context read.
- frugal targets those costs in order:
- 1. **Tool discipline.** Locate before reading. Read ranges instead of whole files. Bound every output. Ask the shell for the fact (`wc -l`, `grep -c`), not the content. Batch independent calls. Never re-read after an edit.
- 2. **Context hygiene.** Cite `file:line` instead of repasting. Before `/compact`, write a state ledger (goal, user rules, decisions + why, files changed, open errors, next step) so nothing important is lost.
- 3. **Output.** Answer first: no preamble, recap or offer to help, and only changed lines of code.
- It also ships `scripts/squeeze.py`, a dependency-free filter for noisy build/test/install output. It strips ANSI codes and progress bars, folds repeated lines, and keeps every error with its context. On a sample build it turned 357 lines into 7, keeping the error line.
- Full prose is never cut for security warnings, irreversible actions, questions to the user, or anything persisted (code, comments, commits, docs).
- ## Install
- As a Claude Code plugin:
- ```
- /plugin marketplace add eylul-eylul/frugal-skill
- /plugin install frugal@frugal
- ```
- Or copy the skill folder:
- ```bash
- git clone https://github.com/eylul-eylul/frugal-skill
- cp -r frugal-skill/skills/frugal ~/.claude/skills/frugal
- ```
- ## Use
- ```
- /frugal # on (default level)
- /frugal lite # tool rules only, normal prose
- /frugal ultra # fragments
- stop frugal # off
- ```
- ## What we learned building it
- **v1 lost money.** The first version was 944 words of careful explanation. It changed behaviour the right way (−17% output, −15% turns, −16% tool output), but it still cost **+9.2% more** than baseline ([bench/results/v1](bench/results/v1/summary.md)). The skill text itself is sent on every request (about 2.3k tokens), and Claude Code's default behaviour is already fairly lean: baseline pulled only 1–6k characters of tool output per short task. So the skill cost more than it saved.
- **v2 is 292 words.** It keeps only rules that change behaviour and moves the explanations into reference files that load on demand. Same benchmark: −7.7% overall, −15% on long tasks.
- The lesson for anyone writing a token-saving skill: **measure your skill's own size against what it saves.** A long style guide can easily cost more than it saves.
- ## Benchmark
- Everything to reproduce the numbers is in [bench/](bench/):
- - `gen_fixture.py` deterministically generates a 30k-line Python service: a 7k-line log, an 18k-line JSON file, a build that prints 1,150 lines, a 2.2k-line generated table, and decoy "retry" settings.
- - `tasks.py` has 7 tasks: bugfix, config lookup, log forensics, feature + test, fix a build warning, explain a code path, and a 4-part "marathon". Prompts never mention tokens or brevity. Each task has a grader that was checked to fail on the unsolved fixture and pass on a solved one.
- - `run.py` runs each (condition, task, rep) as a fresh headless `claude -p` session on a fresh copy of the fixture. User settings and skills are excluded (`--setting-sources project,local`, `--strict-mcp-config`), so only the skill under test differs. Metrics come from Claude Code's own `stream-json` output.
- - `analyze.py` reports per-task medians, geometric-mean ratios versus baseline, matched totals and bootstrap CIs.
- ```bash
- cd bench
- python run.py --claude claude --reps 3 --jobs 3 --out results/mine
- python analyze.py results/mine
- ```
- A full run is 63 sessions; ours cost about $5.50 in total at Sonnet rates.
- ### Limitations
- - One model (Sonnet), one synthetic repo, one Claude Code version. Results on Opus/Haiku or on your codebase may differ.
- - Each run is a single prompt (one agentic session of 2–15 turns). Multi-hour sessions with `/compact` were not measured. The ledger and compaction rules are untested by this benchmark.
- - With 3 reps, the same baseline varied by up to ~11% per task between two runs. Short-task differences are inside that noise. Only the marathon result was repeated enough (n=10) to give a confidence interval.
- - caveman was measured as installed on the author's machine, in its default `/caveman` mode.
- - `squeeze.py`'s effect is not isolated from the rest of the skill.
- Contributions with runs on other models or real repos are welcome. Please add them under `bench/results/`.
- ## License
- MIT
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.