跳到正文
RCreddit.com·

tokensaver scan flags token waste across every prompt file in a repo

AI 摘要

The tokensaver scan tool identifies and flags token waste across prompt files in a repository, helping developers manage costs associated with growing prompt sizes. It measures token usage for each prompt file, suggesting fixes and displaying potential savings. The tool supports 20 models, providing exact counts for OpenAI and estimations for Claude and Gemini. It can be integrated into CI/CD pipelines using the --json option to fail jobs when prompts exceed a budget, and is installed via pip install prompt-tokensaver.

时间与来源

时间显示为 UTC

显示时区:UTC

本地时区尚不可用,暂时显示 UTC。

发布当时偏移:UTC+02026年10月30日 00:15 UTC

收录当时偏移:UTC+02026年10月30日 02:00 UTC

发布
2026年10月30日 00:15
收录
2026年10月30日 02:00
来源类型
开发者社区
档位
社区
信源状态
正常

档位是按信源手工设定的编辑判断,不是逐条打分。

Our prompts live in the repo as text files, and they kept growing: a copied rule here, a pretty-printed schema there. Nobody noticed until the bill came.

tokensaver scan prompts/ measures every prompt file and shows what the safe fixes and all fixes would save per file, biggest saving first, with a total at the bottom. Add --json and you can fail a CI job when a prompt goes over budget. It's offline and covers 20 models. Counts are exact for OpenAI and estimated for Claude and Gemini.

pip install prompt-tokensaver · https://github.com/behrouzbk/tokensaver

来源·reddit.com