tokensaver: open-source CLI flags token waste across every prompt file in a repo

behrouzbk · reddit · 2026-10-30

Developer behrouzbk released tokensaver, an open-source tool born from prompt files quietly bloating in-repo (copied rules, pretty-printed schemas) until the bill arrived. tokensaver scan prompts/ measures every prompt file and ranks safe-fix and all-fix savings per file, biggest first, with a total; --json lets you fail a CI job when a prompt goes over budget. It runs offline, covers 20 models, with exact counts for OpenAI and estimates for Claude and Gemini. Install via pip install prompt-tokensaver; source at github.com/behrouzbk/tokensaver.

Original post →

More from coding & agent

coding & agent channel →