Shame your AI agent for wasting tokens on trivial tasks
Project description
๐จ TokenShame
The AI that judges your AI usage.
TokenShame is a proxy that sits between your coding assistant (Claude Code, etc.) and the Anthropic API. It uses a fast, cheap model (Haiku) to watch your prompts โ and shames you, loudly, when you're burning expensive tokens on tasks you could have done in 5 seconds yourself.
$ claude "push this PR to main"
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ TOKEN SHAME ยท Git Operation โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ ๐จ ...again? *sighs* โ
โ I've been writing code since before you were โ
โ born. Three words: โ
โ โ
โ git push origin main โ
โ โ
โ Shame count: 3 | Tokens saved: ~2,400 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
How it works
Your agent โ ANTHROPIC_BASE_URL=localhost:8080 โ TokenShame proxy
โ
Haiku judges your prompt
(cheap + fast)
โ
โโโโโโโโโโโโโโดโโโโโโโโโโโโโ
dumb call real call
โ โ
๐จ SHAME forward to API
The irony of using a small model to decide you don't need a big model is intentional.
Install
pip install tokenshame
Quickstart
# Terminal 1 โ start the proxy
tokenshame start
# Terminal 2 โ point Claude Code at it
export ANTHROPIC_BASE_URL=http://localhost:8080
# Use Claude Code normally. Get roasted.
claude "what's the weather in Madrid"
Characters
TokenShame ships with 6 built-in characters:
| Name | Vibe |
|---|---|
disappointed_senior |
sighs deeply. Tired. Has seen everything. (default) |
gordon_ramsay |
THIS IS RAW. DONKEY. |
hr_passive_aggressive |
Hi there! ๐ Just a friendly reminder ๐ |
linux_terminal |
bash: claude_for_this: command not found |
your_tech_lead |
Needs Changes. -TL |
intern |
Wait... you couldn't just... I learned this in week 1 |
tokenshame character list
tokenshame character use gordon_ramsay
Custom characters
tokenshame character create "my_cto" \
"You are Dave, my actual CTO. Tired. Not angry, just disappointed. References burn rate."
tokenshame character use my_cto
Options
tokenshame start --yolo # warn but don't block the call
tokenshame start --no-sound # silence the siren
tokenshame start --character hr_passive_aggressive
tokenshame start --port 9090
tokenshame stats # live session stats
tokenshame config show
tokenshame config set sound false
tokenshame config set confidence_threshold 0.85
What gets shamed
- Git operations โ push, pull, commit, merge, checkout
- CLI commands โ ls, mkdir, cd, cp, mv
- Trivial lookups โ celebrity bios, definitions, weather
- Simple math โ conversions, basic calculations
- Off-topic โ anything unrelated to actual dev work
Complex coding tasks, debugging, architecture, code review โ always passed through.
Configuration
Config lives at ~/.tokenshame/config.json.
| Key | Default | Description |
|---|---|---|
port |
8080 |
Proxy listen port |
character |
disappointed_senior |
Active troll character |
yolo |
false |
Warn but don't block |
sound |
true |
Play sound effects |
confidence_threshold |
0.75 |
Minimum judge confidence to shame |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tokenshame-0.1.0.tar.gz.
File metadata
- Download URL: tokenshame-0.1.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e6e8ad952d30c1920b6af27a8d5d9339cf8f32a92bd6045ae6a4b6a7fc63fd3
|
|
| MD5 |
d760b72fd386ef05a9eb286e7754883f
|
|
| BLAKE2b-256 |
50f3f6a0df4f4baef3daebea4b792219bba228e36ff04d78570bbeaf18e5991f
|
File details
Details for the file tokenshame-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tokenshame-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d237d6633092884371cacf31c1e943cd5e35066c823fbe3ce9ca10241720bb3c
|
|
| MD5 |
f79a60233278a182f02548dee0b686b3
|
|
| BLAKE2b-256 |
0ba904f5ca54e0c6c0343f725de21c057bc42261addb9829a04f489be1ce8a11
|