whatisgithub

What is tokensave?

epoko77-ai/tokensave — explained in plain English

Analysis updated 2026-05-18

17PythonAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

Tokensave audits AI agent setups built with Claude Code to find wasted spending, such as using expensive models for simple tasks, and suggests cheaper alternatives.

Mindmap

mindmap
  root((repo))
    What it does
      Audits agent costs
      Flags wasted spend
      Model tier picker
    Tech stack
      Python
      Stdlib only
    Use cases
      Audit Claude agents
      Pick model tier
      Fix cost patterns
    Audience
      AI agent builders
      Claude Code users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Audit your existing Claude Code agent setups for wasted spend in about 5 seconds

USE CASE 2

Get a recommended model tier for a specific task without calling any AI model

USE CASE 3

Reduce prompt cost by fixing model tier mismatches and missing prompt caching

USE CASE 4

Install it as a Claude Code skill so cost checks run automatically in new sessions

What is it built with?

Python

How does it compare?

epoko77-ai/tokensave0petru/sentimoalingalingling/akasha-wechat
Stars171717
LanguagePythonPythonPython
Setup difficultyeasymoderatehard
Complexity2/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

So what is it?

Tokensave is a cost-checking tool for people who build multi-agent setups using Claude Code, the AI coding assistant. Rather than telling you not to use multiple AI agents together, it helps you spot when a multi-agent setup is wasting money because of poor choices, and shows you how to fix it. The README and most documentation are in Korean, with an English mirror available. The author built tokensave after auditing their own 27 real Claude Code agent catalogs. They found that 99 percent of agents defaulted to the most expensive model tier, none of the 27 setups used prompt caching, and 20 agents handed clearly mechanical tasks, like exact text matching or converting a file format, to an AI model instead of a simple script. In one case, a task that could have run in about 30 seconds of Python code instead ran for 91 minutes on the most expensive model and produced no usable result. The overall structure of these agent teams was usually fine. The waste came from paying for expensive models on jobs that did not need them, then multiplying that cost across many linked steps. Tokensave addresses this with a classification system covering 10 categories and 31 specific waste patterns, a script that scans your existing agent files and flags problems in about 5 seconds, a small decision tool that recommends which model tier fits a task without calling any AI model itself, a lookup table matching task types to models, and guidance for structuring agent teams efficiently. It only uses Python's standard library, so no extra installs are needed beyond Python 3.10 or newer. It can be copied directly into a Claude Code skills folder so it activates automatically inside future sessions. A companion project by the same author checks the structural side of these agent setups, while tokensave focuses specifically on cost. The author notes that headline statistics come from a single person's own agent catalogs rather than a larger sample, and that the tool's cost estimates use pricing current as of May 2026, which may change over time.

Copy-paste prompts

Prompt 1
Clone epoko77-ai/tokensave and run python3 scripts/audit.py against my ~/.claude folder, then explain the top 3 cost issues it finds.
Prompt 2
Using tokensave's model_selector.py, tell me which Claude model tier fits this task: converting a CSV file into JSON.
Prompt 3
Help me install tokensave as a Claude Code skill so it runs automatically in every new session.
Prompt 4
Explain tokensave's 10-category, 31-pattern cost taxonomy in plain terms.

Frequently asked questions

What is tokensave?

Tokensave audits AI agent setups built with Claude Code to find wasted spending, such as using expensive models for simple tasks, and suggests cheaper alternatives.

What language is tokensave written in?

Mainly Python. The stack also includes Python.

How hard is tokensave to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is tokensave for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.