What TokenSaver can do

A structural warm start for AI coding agents in .NET. Hand the model a cheap signature map of your code instead of whole files, so it reads only what it needs. Outlining a file saves 70 – 95 % of tokens versus reading it — the end-to-end win is biggest on smaller, cheaper models and large codebases.

Just talk to your AI in plain text — reference a file by path or ask about a method by name. TokenSaver picks the right tool behind the scenes.

Some non-.NET file types (JS, TS, Python, HTML, CSS, JSON, YAML, XML, C++, X++) also have basic minification support, but those paths are not actively tested and results may vary.

Read operations only

TokenSaver shortens what the AI reads. It doesn't change how code is written. The tool output is a stripped-down view — comments and formatting are gone — so when the AI is about to edit your file, it usually has to re-read the original raw file to match the exact text on disk.

Translation: big savings on understanding and discovery, smaller savings on edit-heavy tasks. That's intentional — accuracy matters more than tokens when code is changing.

First call in a session

When an AI session starts, the model loads the server instructions and all tool descriptions before any tool is invoked — roughly 1,400 tokens of fixed overhead. TokenSaver deducts this cost from the savings reported on the first tool call of each session, so the number you see is always the net saving, not a gross figure that ignores startup cost. Subsequent calls in the same session show full savings with no deduction.

The tools

Percentages compare against reading the whole file — the real alternative when you'd otherwise load it. The end-to-end saving on a task is smaller, and is largest on smaller / cheaper models and large files.

Outline
Skeleton of a C# file — every type and member as a signature, no bodies. Best for navigation and discovery.
“What methods are on OrderService?”
70 – 95 %
Minify file
Auto-dispatches by extension. Covers every supported language — JS/TS, Python, HTML, CSS, JSON, YAML, XML, C, C++, and more. Falls back to lexical stripping for non-C# types.
“Read App.csproj — why is this package reference here?”
20 – 50 %
Trace DI registrations
Finds every Dependency-Injection registration for a type and returns a compact table — file:line, lifetime, and service → implementation. Answers "where is this wired, and to what?", which a constructor search can't, since DI types are never newed.
“Where is IOrderRepository registered, and what's it wired to?”
50 – 80 %

Try saying things like…

Percentages compare against reading the whole file — the real alternative. The end-to-end saving on a task is smaller and depends on the model: largest on smaller / cheaper models, near noise on a top-tier model that already reads tightly.

C# outline .cs 70 – 95 % saved
“What's in OrderService.cs?”
Outline tool returns just the type and method signatures — no bodies — each tagged with its line range, so you can then read just the lines you need.
C# trace DI registrations .cs 50 – 80 % saved
“Where is IOrderRepository registered, and what's it wired to?”
Trace DI registrations scans the project for Add/TryAdd/AddKeyed calls referencing the type and returns a compact table of file:line, lifetime, and service → implementation — the wiring a constructor search can't surface.
C# minify (Roslyn) .cs 20 – 50 % saved
“Read OrderService.cs and explain how status transitions work.”
Minify C# file uses Roslyn to strip comments and XML docs, collapses whitespace — every line of logic preserved. Right when the question spans the whole file rather than one method.
C# minify (universal) .csproj .props .config .xml 20 – 40 % saved
“Read App.csproj — why is this package reference here?”
Minify file auto-dispatches by extension. For non-C# types it uses a lexical stripper — same concept, no Roslyn dependency.
Razor .razor 25 – 50 % saved
“Translate this Blazor page to React.”
Returns both the minified markup and the @code C# in two labeled sections.
XML / .NET projects .csproj .props .config .xml 20 – 40 % saved
“Look at App.csproj — why is this NuGet reference here?”
Strips <!-- --> comments and collapses blank-line runs.
Additional support — basic minification, not actively tested
JavaScript / TypeScript .js .ts .jsx .tsx 30 – 50 % saved
“Read this React component and add a loading state.”
Lexical strip of comments and whitespace, strings and template literals preserved.
Python .py 25 – 45 % saved
“Explain what this Python script does and add type hints.”
Strips # comments, keeps docstrings and indentation intact.
HTML .html .htm 20 – 40 % saved
“Look at index.html and tell me where to add the analytics script.”
Strips HTML comments, collapses attribute spacing.
CSS / SCSS / LESS .css .scss .less 10 – 40 % saved
“Why is this stylesheet so big? Audit it.”
Strips /* */ comments and whitespace. Bigger savings on heavily-commented design systems.
JSON / JSONC .json .jsonc 30 – 50 % saved
“What does this tsconfig.json do?”
Collapses pretty-printed JSON and strips // and /* */ comments (JSONC).
YAML .yaml .yml 20 – 40 % saved
“Read this docker-compose.yml and explain the service graph.”
Strips # comments, preserves indentation (YAML is indent-sensitive).
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.