Discover and explore top open-source AI tools and projects—updated daily.
alexgreenshPrevent AI context decay and token waste
Top 34.4% on SourcePulse
This project addresses AI model degradation caused by "ghost tokens," context compaction, and quality decay in large language models. It provides tools for users of platforms like Claude Code and OpenClaw to track, diagnose, and mitigate these issues, aiming to maintain AI accuracy, efficiency, and reduce token waste.
How It Works
Token Optimizer uses six parallel agents to audit AI setups, identifying token-wasting patterns and offering prioritized fixes. It runs externally, consuming zero context tokens. Key mechanisms include a 7-signal quality scoring system, progressive "Smart Compaction" checkpoints to prevent data loss, and an archive for tool results. The v5 release introduces "Active Compression" features like Delta Mode for efficient file re-reads and Quality Nudges to alert users to degradation.
Quick Start & Requirements
/plugin marketplace add alexgreensh/token-optimizer, /plugin install token-optimizer@alexgreensh-token-optimizer) or script. Enable auto-update.openclaw plugins install github:alexgreensh/token-optimizer or from source.
Requires Python (Claude Code) or Node.js/npm (OpenClaw). Links to official docs are available within the README.Highlighted Details
MEMORY.md for inaccessible content and structural issues.CLAUDE.md rules to align with the model's attention curve.Maintenance & Community
Created by Alex Greenshpun. Primary support is via the GitHub repository; no specific community channels or sponsorships are detailed.
Licensing & Compatibility
Licensed under PolyForm Noncommercial 1.0.0. Free for personal, research, educational, and non-commercial use. Commercial use requires a separate license from the creator. Compatible with Claude Code (Python) and OpenClaw (TypeScript), supporting various LLM backends.
Limitations & Caveats
Commercial use requires a separate license. The VS Code extension lacks the CLI-based quality bar status line. Running Claude Code in --bare mode disables essential hooks. The opt-in Bash Compression feature carries moderate risk due to its lossy nature. Delta Mode may occasionally require full file context over just a diff.
3 days ago
Inactive
thedotmack