alexgreensh

    alexgreensh/token-optimizer

    Find the ghost tokens. Fix them. Survive compaction. Avoid context quality decay.

    backend
    agentskills
    claude-code
    claude-code-mod
    claude-code-skill
    claude-plugin
    Python
    NOASSERTION
    2.9K stars
    225 forks
    2.9K GitHub watchers
    Updated Nov 3, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    5 releases in the last 90 days, the latest 2 days ago, with 16 contributors on GitHub.

    Gained 15% more stars in the last 90 days than in the 90 days before.

    Use Cases & Benefits

    • Optimizes AI context tokens by identifying and removing ghost tokens, managing compaction, and preventing context quality decay.
    • Provides full visibility and control over token usage with a live local dashboard, zero runtime dependencies, and no context token consumption.
    • Use for maintaining session continuity and quality in Claude Code by checkpointing and restoring context around compactions.
    • Use for auditing and reducing token waste in multi-agent systems like OpenClaw with native plugins and coaching features.
    • Use for beta testing token optimization and cost tracking in OpenAI Codex environments with local dashboards and fleet scanning.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    Other

    GitHub could not identify this license; read the LICENSE file before depending on it.

    Community files

    • README: present

    Watch-outs

    • License not identified by GitHub; read the LICENSE file before depending on it.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    Save tokens. Survive compaction. Measure the proof.

    Most token tools only touch one slice of the problem.

    They compress command output, which covers 15-25% of your context on a good day. The other 75-85% (bloated configs, unused skills, duplicate system prompts, stale memory, plus the 60-70% you lose on every compaction) goes untouched.

    Token Optimizer covers all of it, keeps your work alive across compactions, measures whether the optimization actually helped, and gives you a live dashboard that shows every token, every dollar, and every turn, auto-updated after every session. Runs fully local. Zero context tokens used. Zero runtime dependencies.

    Works on Claude Code, OpenClaw, and Codex (beta) today. Windsurf, Cursor, and more on the way.

    Recommended on every platform (macOS, Linux, Windows):

    Then in Claude Code: /token-optimizer

    Please enable auto-update after installing. Claude Code ships third-party marketplaces with auto-update off by default, and plugin authors cannot change that default. So you won't get bug fixes automatically unless you turn it on. In Claude Code: /plugin → Marketplaces tab → select alexgreensh-token-optimizer → Enable auto-update. One-time, 10 seconds, and you'll never miss a fix again. Token Optimizer also prints a one-time reminder on your first SessionStart so you don't forget.

    Most tools tell you your context is full. Token Optimizer shows you exactly where every token went, how much each turn cost, which skills and MCP servers actually fired, and which ones are just sitting there eating your budget.

    Excerpt from the alexgreensh/token-optimizer README on GitHub (NOASSERTION license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Forks

    225+78

    Open issues

    5+3

    Compared with peers in Backend

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 1, by 7-day star growth

    alexgreensh/token-optimizer compared with Backend repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    anthropics/skills187.8K+2.9K15—
    DuarteSantos8/openGym19.7K+2.4K602 days ago
    shiyu-coder/Kronos47.0K+2.3K16—
    NationalSecurityAgency/ghidra98.2K+2.3K6414 days ago
    microsoft/VibeVoice56.0K+1.1K29—
    alexgreensh/token-optimizer2.9K—552 days ago
    Category median56.0K+2.3K29—

    Discover Repositories

    Search across tracked repositories by name or description