JavaScript token-optimization

Open-source JavaScript projects categorized as token-optimization

Top 12 JavaScript token-optimization Projects

token-optimization
  1. Chisle

    Cut your AI coding agent's token bill on three axes: terse prose, YAGNI-first code, and tool-output compression. Claude Code, Pi, Cursor, Codex, Gemini + 4 more. Zero deps, published benchmarks including the runs it loses.

    Project mention: Show HN: Chisle – Claude Code plugin that cuts output and tool-output tokens | news.ycombinator.com | 2026-11-16
  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. claude-context-optimizer

    Claude Code plugin that tracks token usage, identifies wasted context, and saves 30-50% on API costs. Heatmaps, ROI reports, budget alerts, efficiency scores, git-aware suggestions — all local, zero config.

    Project mention: Update: my Claude Code token optimizer now blocks redundant reads. Here's the data from 107 sessions. | dev.to | 2026-03-24

    npx skills add https://github.com/egorfedorov/claude-context-optimizer

  4. lazy-cat

    Claude Code skills for developers who code like cats — never more effort than the problem requires.

    Project mention: Lean – Two Claude Code skills that stop the AI from over-engineering | news.ycombinator.com | 2026-06-08
  5. PlayGuard

    Proxy MCP: one server that runs Playwright, Figma, Chrome DevTools, Shopify Dev and Context7 behind a single connection - and cuts their token cost with compact snapshots, caching and session recovery.

    Project mention: I Built an MCP Proxy That Reduces Playwright and Figma Context for AI Agents | dev.to | 2026-07-09

    GitHub: https://github.com/ZenyaDAR/PlayGuard

  6. cc-token-saver

    Claude Code keeps cutting you off? Not anymore. Spend less, code longer, and see exactly where your tokens go — zero config.

    Project mention: We Need a CatRun for the AI Era | dev.to | 2026-05-05

    4. Detailed analysis belongs in a different tool. Token spend, cache misses, run history — that needs report depth. That's what cc-token-saver is for, and it gets its own post next. AgentRunner = glance. cc-token-saver = report. Don't make one app try to be both.

  7. portable-dsh-multi-agent-plugin

    One model writes the work, a different one reviews it, and neither decides whether it passed. Cross-provider AI review with verifiable evidence, for DeepSeek Harness/Cordis hosts. 中文文档见 README.zh.md。

    Project mention: One model writes the code, a different model reviews it | news.ycombinator.com | 2026-09-20
  8. ctxvitals

    A Lighthouse for your AI agent stack: measures the real token cost of MCP servers, skills, and rules; flags security issues and duplicates; grades your setup A-F.

    Project mention: I audited my AI agent stack — 92,413 tokens burned before the first message | dev.to | 2026-10-12

    GitHub: https://github.com/princejain756/ctxvitals

  9. compactsim

    Audit local Claude Code and Codex session transcripts, measure Context Rent per tool output, and replay counterfactual autoCompactWindow policies offline.

    Project mention: Replaying 147 Claude Code & Codex Sessions to Tune autoCompactWindow (and Catching a 3x Token Overcount) | dev.to | 2026-11-05

    I built compactsim as a zero-dependency Node.js CLI to audit ~/.claude/projects and ~/.codex/sessions offline and run counterfactual compaction simulations against your actual turn history.

  10. tokentrimmer

    Local proxy that losslessly shrinks tool output in Claude Code / Anthropic / OpenAI requests before they're sent. Verified, prompt-cache safe, zero dependencies.

    Project mention: What I learned building a lossless token compressor for Claude Code | dev.to | 2026-11-05

    I built TokenTrimmer, a small local proxy that compresses tool output before it reaches the API, and spent most of the time measuring what actually works. Here's what I learned.

  11. Throughline

    Cut ~90% of Claude Code's context usage while keeping nearly all the memory

    Project mention: Stop Telling Claude to 'Be Careful': Reinforcing It from the Outside with 3 Tools | dev.to | 2026-06-08

    Throughline — GitHub

  12. limitcast

    Claude Code usage limits: forecast Codex and Grok too. https://limitcast.dev

    Project mention: Limitcast 0.20.0: safer configuration and clearer optimizer overhead | dev.to | 2026-11-16

    Read the 0.20.0 release notes, optimizer guide for this version and changelog.

  13. ctxfold

    Lossless, structure-aware compression of logs, JSON & CSV to cut LLM prompt tokens. Lossless or no-op — never lossy.

    Project mention: How LLMLingua compresses prompts: perplexity, deletion, and trust | dev.to | 2026-07-19

    I build ctxfold, a lossless prompt compressor, so I spend a lot of time thinking about the other school of prompt compression — the one that deletes things on purpose. The most important tool in that school is LLMLingua, from Microsoft Research. Before I publish a measured comparison (that post is coming), I want to explain fairly how LLMLingua actually works, because it's clever, it's genuinely effective at what it targets, and the design choice at its core is the exact opposite of mine.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

JavaScript token-optimization discussion

Log in or Post with

Index

What are some of the best open-source token-optimization projects in JavaScript? This list will help you:

# Project Stars
1 Chisle 758
2 claude-context-optimizer 130
3 lazy-cat 50
4 PlayGuard 24
5 cc-token-saver 17
6 portable-dsh-multi-agent-plugin 3
7 ctxvitals 3
8 compactsim 1
9 tokentrimmer 1
10 Throughline 0
11 limitcast 0
12 ctxfold 0

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
Developer survey
Take the JavaScript Developer Survey

About 6 minutes on the tools, libraries and AI you use with JavaScript. You get the results by email.

Did you know that JavaScript is
the 4th most popular programming language
based on number of references?