Реклама партнера — Название партнёра
UNIT.City — місце, де люди працюють... КРАЩЕ! Обирай свій простір просто зараз 👉

How to save AI tokens? A selection of tools created by IT professionals to control spending on Claude Code

On Reddit, many IT professionals share tools they have created specifically to analyze or reduce token costs. We have selected a few that have been of most interest to the participants of the ClaudeAI subreddit, namely: Claude skill for writing precise prompts, a tool for structurally navigating agents in code, and a cost tracker.

Leave a comment
How to save AI tokens? A selection of tools created by IT professionals to control spending on Claude Code

On Reddit, many IT professionals share tools they have created specifically to analyze or reduce token costs. We have selected a few that have been of most interest to the participants of the ClaudeAI subreddit, namely: Claude skill for writing precise prompts, a tool for structurally navigating agents in code, and a cost tracker.

Claude skill for writing accurate prompts so as not to burn credits on poor quality prompts

A Data Engineer named Sieve shared on Reddit that he created a skill for Claude that writes accurate prompts for any AI tool. At the time of writing, the tool has crossed 4,100 stars on GitHub, and the Reddit post has garnered 1,300 reactions.

So, prompt-master is a free, open-source Claude skill that creates accurate prompts for specific AI tools. Works with Claude, ChatGPT, Gemini, Cursor, Claude Code, Midjourney, Stable Diffusion, Kling, Eleven Labs. According to the developer, it is suitable for everyday tasks, vibecoding, corporate purposes, training, etc. Setup takes 2 minutes.

How prompt-master works:

  • Automatic tool recognition: the system determines which service the request is written for and silently chooses the strategy that works best for this model.

  • 9-parameter idea analysis: gets the most out of your raw idea so you don't miss anything important: context, constraints, output format, target audience, memory from previous messages, and success criteria.

  • Fix 35 fatal errors: Recognizes patterns that "kill" credits and suggests fixes. For example: missing file paths in Cursor, trying to build the entire application in one prompt, or adding Chain-of-Thought to o1 models that actually only worsen the result.

  • 12 adaptive templates: automatically selects the structure depending on the task - because writing an email requires a completely different approach than prompting in Claude Code for developing new functionality.

  • Context optimization: templates and patterns are stored in separate files and loaded only when they are needed for a specific task — no unnecessary load at startup.

A link to the setup instructions can be found in the comments below the post.

In the next update, the developer plans to add support for agents, including OpenClaw.

A tool for structural navigation of agents in code

A developer under the nickname kids__with__guns shared that he created a CLI tool that provides agents with structural code navigation (analogous to the “find references” function in an IDE, but for LLM).

The author of the post has been working with Claude Code for several months, creating multi-agent workflows for third-party projects. The main problem was the insane speed of token spending. Analyzing the behavior of the agents, the author noticed: they do not navigate the code like humans (via LSP), but use grep. This forces them to read hundreds of unnecessary lines of code just for orientation, which wastes resources.

“So I started experimenting. I wrote a small CLI tool (Rust, tree-sitter, SQLite) that gives agents commands for structural work. For example: “show me a 180-token summary for this 6,000-token class” or “search by what the code does, not by its name”. In essence, I tried to give agents an analogue of IDE navigation. The tool currently supports TypeScript and C#,” the developer wrote.

The developer then ran a full-scale benchmark to see if it really worked: 54 automated runs on Sonnet 4.6 on a C# codebase of 181 files. The testing included 6 task categories, 3 scenarios (baseline / with tool / with architecture downloaded from CLAUDE.md) and 3 iterations for each.

During each run, a full data capture in NDJSON format was performed to analyze the tokens in detail: input data, cache creation, cache reading, and output data.

The author draws the following conclusions:

  • agents with the new tool read more files (the average increased from 6.8 to 9.7), but made 67% more edits per session;

  • the total cost of the task dropped by 32%. This was not due to less data read, but to shorter dialogues. Fewer “moves” means less cache accumulation, which accounts for ~90% of the cost;

  • The cost of completing a task decreased by 32%, and navigation efficiency (the number of navigation actions per edit) increased by a factor of 2. However, these indicators varied greatly depending on the type of task;
  • bug fixes became cheaper by 62%, development of new features by 49%, and system changes by 46%;
  • No advantages were found in code analysis and refactoring tasks - basic agents cope with them quite well.

“The nav-to-edit ratio was the clearest indicator. Base agents averaged 25 navigation actions per code edit. With the tool, this ratio was 13:1, and with the preloaded architecture, it was 12:1. In my opinion, this is what matters most. It’s an indicator of how much effort the agent is wasting on orientation instead of directly solving the problem,” the developer added.

The author of the tool honestly warned: “The p-values ​​do not reach 0.05 when sampling n=6 paired observations. The trend is stable, but the sample is too small to claim statistical significance. The benchmark has so far been conducted only for C# (TypeScript support is available, but testing has not yet been conducted). In addition, the cost calculation is based on the current Sonnet 4.6 API tariffs (new input text — $3/M, cache write — $3.75/M, cache read — $0.30/M, output data — $15/M).”

The tool is open source. So if anyone wants to tinker with it or test it on their own codebase, it can be found at . The benchmark launch script and telemetry collection system have also been added to the repository.

Claude Code Token Spending Tracking Plugin

Cheap_Brother1905, like many Claude Code users, faced a problem: daily limits were being exhausted in literally 20 minutes, and it was impossible to track the reasons without complex systems like Docker or Grafana.

That's why he created Cost Guardian , a plugin for Claude Code that allows you to monitor token spending in real time without any additional settings.

What the tool does:

  • Automatically tracks the cost of each tool call using hooks.

  • Shows the real-time burn rate.

  • Sets budget constraints (hard block or soft warning).

  • Estimates the cost of a task BEFORE you start it.

"Here's what really helped me save: I set a limit of $5 per session. It turned out that agent subqueries were eating up 60% of all costs. I changed my approach to writing prompts and thanks to this, I cut my daily costs in half," the developer noted.

Additionally, a few days after this post, the developer updated the tool and added the following features:

  • now you can see the cost after each tool call (for example: +$0.03 (Read) | Session: $2.41);

  • cost-estimate: shows a cost estimate for all Claude models to know when it is better to choose Haiku, and when - Sonnet or Opus;

  • analysis by git branches (cost-report branch): now you can see how much each git branch/feature costs;

  • csv/json export for those who need to send expense reports to their manager;
  • The start of a session now shows yesterday's spending so you know where you are before you start.
Claude Code users reported a drop in limits: Anthropic referred to the end of the holiday bonus
Claude Code users reported a drop in limits: Anthropic referred to the end of the holiday bonus
On the topic
Claude Code users reported a drop in limits: Anthropic referred to the end of the holiday bonus
7 AI tools that IT professionals invented to make their work easier
7 AI tools that IT professionals invented to make their jobs easier
On the topic
7 AI tools that IT professionals invented to make their jobs easier
Read the country's main IT news in our Telegram
Read the country's main IT news in our Telegram
On the topic
Read the country's main IT news in our Telegram
Also Read
Roosh запускає нову освітню платформу AI HOUSE CLUB для ML/AI-спеціалістів та дата сайнтистів. Розповідаємо, як подати заявку та чому навчатимуть
Roosh запускає нову освітню платформу AI HOUSE CLUB для ML/AI-спеціалістів та дата сайнтистів. Розповідаємо, як подати заявку та чому навчатимуть
Roosh запускає нову освітню платформу AI HOUSE CLUB для ML/AI-спеціалістів та дата сайнтистів. Розповідаємо, як подати заявку та чому навчатимуть
Як нейромережі бачать вільну та незалежну Україну? Тест dev.ua
Як нейромережі бачать вільну та незалежну Україну? Тест dev.ua
Як нейромережі бачать вільну та незалежну Україну? Тест dev.ua
Нейронні мережі для генерації зображень бачать світ по-своєму, їхню логіку зрозуміти часом зовсім неможливо. Але таки хочеться. На честь Дня Незалежності України редакція dev.ua вирішила провести невеликий експеримент. Ми задали чотирьом різним нейронним мережам п’ять однакових запитів: «прапор України», «День Незалежності України», «український Крим», «перемога України» та «українці». Отриманими результатами ми ділимося з вами нижче.
У TikTok тепер можна генерувати фон за допомогою нейромережі. Ми протестували її та ділимося результатами
У TikTok тепер можна генерувати фон за допомогою нейромережі. Ми протестували її та ділимося результатами
У TikTok тепер можна генерувати фон за допомогою нейромережі. Ми протестували її та ділимося результатами
У TikTok з’явилася нова функція «Розумний фон». З її допомогою як фон для тіктоків можна підставляти згенеровані нейромережею зображення. Редакція dev.ua протестувала цю технологію і ділиться своїми враженнями.
1 comment
Які IT-спеціальності будуть потрібні в найближчі п'ять років? Ми з'ясували у голови американського стартапу ADAM Дениса Гурака
Які IT-спеціальності будуть потрібні в найближчі п'ять років? Ми з'ясували у голови американського стартапу ADAM Дениса Гурака
Які IT-спеціальності будуть потрібні в найближчі п'ять років? Ми з'ясували у голови американського стартапу ADAM Дениса Гурака

Have important news to share? Message our Telegram bot

Key events and useful links in our Telegram channel

Discussion
No comments yet.