by alexgreensh
Find the ghost tokens. Fix them. Survive compaction. Avoid context quality decay.
# Add to your Claude Code skills
git clone https://github.com/alexgreensh/token-optimizerGuides for using ai agents skills like token-optimizer.
Last scanned: 11/28/2026
{
"issues": [
{
"type": "npm-audit",
"message": "@earendil-works/pi-coding-agent: Pi Agent: Predictable temporary extension install paths allow local privilege escalation on shared Linux hosts",
"severity": "high"
},
{
"type": "npm-audit",
"message": "glob: Glob: AbortSignal cancellation bypass allows post-timeout filesystem traversal",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "minimatch: minimatch has potential denial of service via globparts amplification",
"severity": "medium"
},
{
"file": "README.md",
"line": 218,
"type": "dangerous-command",
"message": "Dangerous command (writes to Claude config): \"sed -i 's/\\r$//' ~/.claude/\"",
"severity": "medium"
},
{
"file": "tests/fixtures/devin_229_baseline/devin/SKILL.md",
"line": 1,
"type": "hidden-content",
"message": "Opaque base64 blob in an instruction file",
"severity": "low"
}
],
"status": "WARNING",
"scannedAt": "2026-11-28T21:53:36.420Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}token-optimizer is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by alexgreensh. Find the ghost tokens. Fix them. Survive compaction. Avoid context quality decay. It has 3,195 GitHub stars.
token-optimizer returned warnings in AgentsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.
Clone the repository with "git clone https://github.com/alexgreensh/token-optimizer" and add it to your Claude Code skills directory (see the Installation section above).
token-optimizer is primarily written in Python. It is open-source under alexgreensh on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh token-optimizer against similar tools.
No comments yet. Be the first to share your thoughts!
Requires a passing catalog security scan. Resolve the flagged issues and resubmit to enable featuring.
Token Optimizer cuts the tokens your AI coding assistant wastes, keeps your work alive across sessions and compactions, and shows you where every dollar went on a live dashboard. Most of it runs automatically. You install it, run the audit once, and the hooks do the rest.
Why not just use Headroom or RTK? They compress command output, which covers 15-25% of your context. Token Optimizer covers that plus the other 75%: bloated configs, unused skills, stale memory, compaction loss, model misrouting, behavioral waste. Every saving is cache-safe and measured. The dashboard updates after every session, automatically.
Works on the AI coding tools below, with a Devin output-filter beta (manual skill, or install.sh --devin --auto for automatic compression):
Runs automatically, every session, you do nothing:
When you ask for it:
/token-optimizer: full audit with guided fixes/token-coach: 30-day trend analysis with specific fixesquick: 10-second health check/token-optimizer:next shows savings actions ranked from your last 30 days/token-optimizer:apply-safe previews safe changes for your approvalroute: the model and effort this task actually needs, before you spenddoctor: installation checksavings: dollar savings reportpilot-report: weekly Slack-ready savings reportreport: per-component token breakdowndashboard: open the full dashboardmemory-review: MEMORY.md structural auditexpand: retrieve archived tool resultresume-lean: reopen a cold sessionInstall, run /token-optimizer once, everything else runs automatically.
Claude Code now lets a plugin add its own piece of interface, called a mod. Token Optimizer uses one to put your session's health right above the prompt: a quality grade, how full the context is, how long the cache stays warm, and both usage limits. One plain sentence tells you what needs attention, and one button fixes it. Clawd, the small orange mascot, acts out what the session is doing, so you can tell at a glance whether Claude is reading, editing, waiting for your OK, or done.
It comes with the plugin, nothing extra to install. Everything the bar does.
Claude Code (recommended):
/plugin marketplace add alexgreensh/token-optimizer
/plugin install token-optimizer@alexgreensh-token-optimizer
Then in Claude Code: /token-optimizer
Enable auto-update after installing. Claude Code ships third-party marketplaces wi