Skip to Main Content

TokenLenz

Built at The Persistent Context Sprint Hackathon | Live at MongoDB .Local Build Fest · Aug 13, 2026 · San Francisco, CA

Demo video · www.loom.com/…

Claude Token Counter Real-Time AI Cost & Environmental Impact Tracking The Problem: Developers using Claude Code have no visibility into prompt costs before sending them, leading to budget surprises and wasted resources. Our Solution: A Claude Code plugin that pauses every prompt to show: - 💰 Real-time cost — Exact USD (cache-aware pricing) - 📝 ML-predicted reply length — Trained on 12k+ real API calls - 💧 Environmental impact — Water usage of inference - 📊 Session totals — Cumulative spending tracker - 🔄 Prompt optimization — AI suggests rewrites with token % savings (LangGraph + OpenRouter + MongoDB) Tech Stack: - Node.js plugin (UserPromptSubmit hook) - Python ML service (scikit-learn, 1.8 MB model) - 224 automated tests, production-ready - Graceful degradation (never blocks users) Impact: Developers make informed decisions, prevent budget overruns, quantify environmental cost of AI.

Team