agentleFS
scoobydont-666scoobydont-666/shared-claude-skills/skills/token-miser/SKILL.md

token-miser

Skill1 starsChanged 31 days agoMITView on GitHub

Reduce model token and cost waste through measured quality, task routing, compact context and paired usage receipts; verify current models and pricing.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read relevant context once.

    line 9
  2. Distinctive:

    Treat session model changes as recommendations unless the client exposes an authorized switch.

    line 13
  3. Very specific:

    Run the bundled regression suite with python3 -m unittest discover -s tests -v from this skill directory.

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Token and cost discipline

Choose the cheapest available model/configuration that meets the task's measured acceptance criteria. Discover the actual model menu, quotas and pricing from the configured provider; do not invent model aliases, free capacity or a private routing service.

  • Read relevant context once; send precise excerpts and deltas with enough baseline to interpret them.
  • Cache reusable context only when the provider/client supports it. Distinguish cache hits, ordinary input and output usage. Encoding text as base64 is not useful semantic compression.
  • Bound output, retries and parallel work. Obtain existing scoped authority for paid calls and additional agents; a cost skill does not authorize spending.
  • Route mechanical tasks to smaller models only after testing correctness and tool behavior. Escalate when the failure mode warrants it. Count retries and reviewer time when comparing costs.
  • Treat session model changes as recommendations unless the client exposes an authorized switch. Do not pretend a skill can switch a running session by naming a model.
  • Compare matched tasks with the same rubric and quality threshold. Report successful-task cost and latency, not only per-token price.

Optional receipt ledger

scripts/token_ledger.py records validated call receipts and reports paired baseline/after observations. It requires Python 3.10+ on a POSIX platform (fcntl); it makes no provider calls. Inspect --help, record --help and report --help before use. Run from this skill directory or use the installed absolute script path:

python3 scripts/token_ledger.py --help
python3 scripts/token_ledger.py report calls.jsonl --format markdown

Supply benchmark/input/rubric hashes, declared and observed model, measured token counts, provider-reported cost/latency/quality, and dated pricing provenance. Never fabricate a receipt. Stale pricing, model mismatches, corrupt records and incomplete pairing cannot establish savings. Store receipts in a user-chosen private directory; do not include prompts, credentials or personal content.

Run the bundled regression suite with python3 -m unittest discover -s tests -v from this skill directory. Interpret results within the measured workload; do not promise universal savings.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.