repowiserepowise

Command-line tool

microsoft / tokeneconomizer

Experience-Driven Black-Box Cost Control for Coding Agents

★ 7,935stars on GitHubPythonMIT

This connects Repowise to microsoft/tokeneconomizer's code. It does not install tokeneconomizer.

Repowise maps public repos from their source. Not affiliated with microsoft. What is Repowise?

github.com/microsoft/tokeneconomizerIndexed at 12468f4

What is tokeneconomizer?

tokeneconomizer is a plugin for coding agents such as Claude Code and Codex that makes them cheaper to run in the repositories you work in often. It works without changing the agent itself, and it uses the sessions the agent has already run in a repository to cut waste in the sessions that follow. The project is written mainly in Python. To install it, run claude plugin marketplace add "$PWD/TokenEconomizer" and follow the steps below. Its code health is 6.6 out of 10 (Fair), ranked #181 of 4,000+ indexed repos. The last commit to tokeneconomizer was on Nov 17, 2026, and 45 people have contributed.

As of commit 12468f4, indexed Nov 18, 2026. What it is comes from a model reading the README; the rest is measured from the source and git history, not from the maintainer.

For agentstokeneconomizer.md

Repo facts: type, license, health, rank, contributors
tokeneconomizer facts
TypeCommand-line tool
LicenseMIT
Code health6.6 / 10 (Fair)
Health rank#181 of 4,000+ indexed repos
Last commitNov 17, 2026
Contributors45
Bus factor2
Size237 files, 43,733 lines

Install tokeneconomizer

Commands copied from the README

  1. 1Register the clone as a plugin marketplace in Claude Code.
    claude plugin marketplace add "$PWD/TokenEconomizer"
  2. 2Install the tokeneconomizer plugin from that marketplace.
    claude plugin install tokeneconomizer@tokeneconomizer

Releases on GitHub (latest v0.1.0, Oct 26, 2026)

Full install notes on GitHub

Explore tokeneconomizer

Ask about this code in your agent

This connects Repowise to tokeneconomizer's code. It does not install tokeneconomizer. To install tokeneconomizer, use the install steps.

Useful if you want to change or fork tokeneconomizer: your agent can ask how it is put together and get answers that cite its files.

Ask about tokeneconomizer

Answers come from tokeneconomizer's README and source, with the files they cite. Two free answers a day without an account.

Featured answer

tokeneconomizer is a plugin for coding agents such as Claude Code and Codex that reduces their running cost in repositories you work in often, without changing the agent itself. It reuses the sessions an agent has already run in a repository to cut waste in later sessions. The entry points are tokeneconomizer/init.py and tokeneconomizer/plugin/cli.py, where the tokeneconomizer package switches on the token-saving stages and decides when an agent is stuck repeating a failing fix. The plugin folder holds the host integrations, including plugin/opencode/tokeneconomizer.ts for opencode, and the scripts directory packages the plugin for Claude Code and Factory Droid. The repository has 237 files in layers: Application with 135, Docs & Tooling with 22, Config with 5, Middleware with 2, and Data with 1, so start with the two entry points and the experiments directory, which runs the benchmark sweeps that measure the savings.

Files per layer in tokeneconomizer5 layers.

Basis: Inferred · knowledge graph· as of 12468f4

Want this for your own codebase? Map your repo free

About this page

Get a page like this for your own codebase

Repowise built this map of microsoft/tokeneconomizer from its source and git history. It parses every symbol, draws the dependency graph, scores each file's health from complexity, duplication, coverage and churn, finds hotspots and owners in the history, and writes documentation for every module. Your coding agent reads the same index over MCP, so its answers cite real files.

Free for 2 public repos, with a page like this one. No card. See how Repowise works

Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed. Star Repowise on GitHub

microsoft/tokeneconomizer FAQ

What is tokeneconomizer?

tokeneconomizer is a plugin for coding agents such as Claude Code and Codex that makes them cheaper to run in repositories you work in often. It works without changing the agent itself. It uses earlier sessions in a repository to cut waste in later ones.

How does tokeneconomizer work?

tokeneconomizer learns from the sessions an agent has already run in a repository. It has three mechanisms: micro-skills, tool pruning and a failure-loop guard. Each mechanism can be turned on or off.

How do I install tokeneconomizer?

For Claude Code, clone the repository, register the clone as a plugin marketplace, and install the tokeneconomizer plugin. Run these commands in the folder where you want to keep the clone. See the install steps

What language is tokeneconomizer written in?

tokeneconomizer is written mainly in Python. Its repository also includes TypeScript, JavaScript and shell files.

How is the tokeneconomizer code organized?

The tokeneconomizer package holds the token-saving stages and stuck-loop detection. The plugin folder holds host integrations, and the experiments folder runs benchmark sweeps. The scripts folder packages the plugin for installation.

When should I use tokeneconomizer?

Use tokeneconomizer in repositories you work in often with a coding agent such as Claude Code or Codex. It learns from earlier sessions there and uses that to cut waste in later ones.

What license does tokeneconomizer use?

tokeneconomizer is released under the MIT license, identified as MIT.

Code health

6.5out of 10Fair

Hotspots average 5.0, the place fixes pay off most.

On the leaderboards:#51 of 71 Python repos

Key features of tokeneconomizer

  • Micro-skills learns facts about a repository, such as build steps and working command spellings, and states them at the start of later sessions once several sessions confirm them.
  • Tool pruning leaves out tools that go unused in the agent's own settings, and one command brings them back.
  • The loop guard uses a judge model to detect a stuck turn and gives the agent a short redirect to try another approach.
  • The plugin supports Claude Code, Codex, the GitHub Copilot CLI and Pi, with experimental support for several other agents.
  • What it learns is stored on your machine in ~/.tokeneconomizer.

How microsoft/tokeneconomizer works

The entry points are tokeneconomizer/__init__.py and tokeneconomizer/plugin/cli.py. The tokeneconomizer package switches on the token-saving stages for an agent run and decides when an agent is stuck repeating a failing fix. The plugin folder holds the host integrations, and plugin/opencode/tokeneconomizer.ts is the TypeScript plugin for opencode. The scripts directory packages the plugin into folders that Claude Code and Factory Droid can install. The experiments directory runs the benchmark sweeps that measure how much the token-saving stages save on coding tasks.

The codebase has 237 files and 3,815 symbols in 6 modules, led by Python, Shell and TypeScript. Code health is 6.5 out of 10, rated fair.