Dev.to AI 🤖 Ai 👁 0 📖 2 min read

I Built a 75 KB Chrome Extension to Stop Overpaying for LLM Tokens and Catch AI Outages

If you build with LLMs every day, you probably waste 15 minutes a week doing the same three things: Opening pricing spreadsheets to figure out whether switching a pipeline from Claude Sonnet to DeepSeek or Gemini Flash

If you build with LLMs every day, you probably waste 15 minutes a week doing the same three things:

  1. Opening pricing spreadsheets to figure out whether switching a pipeline from Claude Sonnet to DeepSeek or Gemini Flash actually saves money after prompt caching and batch discounts.
  2. Debugging a hanging API call before realizing Anthropic or OpenAI is having a degraded incident.
  3. Sending polite, verbose prompts ("Hello! Could you please kindly summarize...") that quietly burn 30%–54% extra input tokens.

I built the TokenCalc AI Chrome Extension (v1.1.0) to put all of those checks directly inside Chrome, Brave, Edge, and Arc — in a single 75 KB Manifest V3 bundle with zero tracking and zero API keys required.

What's Inside

Workflow TokenCalc AI Extension Manual Browser Tabs
Toolbar LLM Cost Estimator (60+ models) 1-Click Popup (Cached Offline) Requires New Tab
Prompt Caching, Batch 50% & Reasoning Math Included (Free) Manual Switching
Claude / ChatGPT / Gemini / Cursor Outage Alerts 60s Background Poll + Desktop Alert Manual Refresh
Side Panel Prompt Linter & 4-Level Trimmer Runs Beside ChatGPT / Claude Copy-Paste Out of Tab
In-Page Text Selection Token Counter Instant Floating Pill (Local) Not Available
GitHub README Auto-Updating Cost Badge Button Injected on Repo Header Manual URL Copy

1. Instant Toolbar LLM Cost Calculator

Estimate daily, monthly, and annual API spend across 60+ models (OpenAI, Anthropic, Google, DeepSeek, Meta, Mistral, xAI). Supports prompt cache hit-rate sliders, 50% Batch API discounts, hidden reasoning-token multipliers, team seats, and cloud hosts (Direct API, AWS Bedrock, Azure OpenAI, Google Vertex AI, OpenRouter, Groq).

2. 60-Second AI Outage & Latency Badge

Polls official status endpoints for Claude, ChatGPT, Gemini, and Cursor every 60 seconds, updating your toolbar badge with live ping latency and optional desktop outage/recovery alerts.

3. Prompt Linter & Trimmer in Chrome Side Panel

Open Chrome Side Panel right beside ChatGPT, Claude, or Gemini to score any prompt from 0–100 across an 8-point structure audit (Task, Output Format, Length Limit, Context, Role, Constraints, Audience, Example), count tokens across OpenAI, Claude, Llama 3, and DeepSeek, and trim filler across 4 compression levels (Gentle → Extreme).

4. In-Page Token Counter & GitHub README Badges

  • Highlight text on any webpage (or right-click → Count tokens with TokenCalcAI) to see instant token count and input cost locally.
  • Click AI Cost Badge on any GitHub repository to auto-detect its AI SDK and copy a live, auto-updating SVG price badge.

Privacy by Design

All token counting, prompt auditing, and trimming run 100% locally in your browser. No prompt text, webpage content, or API keys ever leave your machine.

Download the free 75 KB .zip (30-second Load Unpacked install):

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.