tokenwise
यह क्या करती है
TokenWise हर काम के लिए वह सबसे सस्ता AI model चुनकर AI के इस्तेमाल पर पैसे बचाने में मदद करता है, जो काम पूरा कर सके। यह हर task का खर्च record करता है और आपको यह टेस्ट करने देता है कि आपके लिए कौन सा model सबसे अच्छा काम करता है।
कब इस्तेमाल करें
- ✓जवाब की गुणवत्ता खोए बिना खर्च कम करने के लिए।
- ✓यह जांचने के लिए कि आपके कामों के लिए कोई सरल model काफ़ी है या नहीं।
- ✓यह समझने के लिए कि AI पर पैसा कहाँ खर्च हो रहा है।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/tokenwise/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं टेस्ट करना चाहता हूँ कि क्या Haiku model इस paragraph को आसान भाषा में दोबारा लिख सकता है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
TokenWise आपके task का विश्लेषण करता है और उसे सबसे उपयुक्त और किफ़ायती AI model को भेजता है। यह हर task का सटीक खर्च record करता है और आपको अलग-अलग models की तुलना करने देता है, ताकि आप सबसे अच्छा विकल्प इस्तेमाल करें।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
TokenWise — Measurement-Driven Model Router
Overview
A Claude Code skill that auto-routes subtasks to the cheapest model that can handle them (Haiku for grunt work, Sonnet for scoped reasoning, Opus only for synthesis), then logs every routed task to a local NDJSON with real token + cost numbers. Includes an A/B test subcommand that runs the same task across multiple tiers and scores quality, so the routing decisions are verified against the user's real workload — not estimated.
Anthropic's own bug tracker (Issue #27665) reports 93.8% of Max-subscriber Claude Code tokens flow to Opus. Existing routers (claude-router, wshobson, VoltAgent) either pin models statically or route by vibes-based heuristics with no measurement. TokenWise fills the measurement gap.
When to use
- Cutting Claude Code token spend without sacrificing output quality
- Validating whether Haiku/Sonnet is "good enough" for a specific task class before trusting auto-routing
- Auditing where Opus tokens are actually being burned
- Logging per-session cost data for finance or chargeback
Subcommands
/tokenwise:install— guided installer with diff preview, automatic backups, and--dry-runmode/tokenwise:report— per-session token + cost summary vs all-Opus baseline/tokenwise:summary [--week|--month|--all]— historical aggregate with trend/tokenwise:ab "<task>"— A/B test the same task at multiple tiers, generates a markdown comparison/tokenwise:undo— restore CLAUDE.md / settings.json from backup
Routing taxonomy
| Tier | Model | Task class |
|---|---|---|
| Mechanical | Haiku 4.5 | file reads, grep, format, rename, simple edits, doc lookups |
| Scoped reasoning | Sonnet 4.6 | single-file refactor, scoped research, test writing |
| Synthesis | Opus 4.7 | architecture decisions, multi-file refactor, security review |
Safety caps:
- Haiku never spawns further subagents
- Max spawn depth = 2
- Subagents that need a smarter model return to parent — they never escalate on their own
- Tasks under 100 chars with no file context run inline (subagent overhead > savings)
- Subagent context >30k tokens bumps a tier
Privacy
Zero telemetry. All logs in .tokenwise/log.ndjson local to the project. Task descriptions truncated to 80 chars and stripped of file contents before logging. No analytics endpoint exists in the source.
Install
In any Claude Code session:
/plugin marketplace add CodeShuX/tokenwise
/plugin install tokenwise@tokenwise
Then run /tokenwise:install and follow the guided prompts.
Limitations
- Token counts approximate to ±2% vs Anthropic billing
- A/B test mode costs extra tokens (one task × N tiers) — intentional one-time validation
- Anthropic-only by design (use LiteLLM or OpenRouter for cross-vendor)
- Subagent
model:param has known silent-fail bugs on some Claude Code builds — skill probes for this at install and refuses to configure if routing is broken
Source
- Repo: https://github.com/CodeShuX/tokenwise
- License: MIT
- Author: CodeShuX
अक्सर पूछे जाने वाले सवाल
TokenWise सही model कैसे चुनता है?
यह एक तय सूची इस्तेमाल करता है: सरल और जल्दी होने वाले कामों के लिए Haiku, थोड़ी ज़्यादा सोच-विचार वाले कामों के लिए Sonnet, और software architecture की planning जैसे जटिल कामों के लिए Opus। अगर कोई task उम्मीद से ज़्यादा मुश्किल निकले, तो यह model को upgrade भी कर सकता है।
क्या TokenWise मेरा data कहीं भेजता है?
नहीं, यह पूरी तरह private है। सारी खर्च की जानकारी और tasks सिर्फ़ आपके computer पर save होते हैं, और संवेदनशील data सुरक्षित रहता है।
A/B test क्या है?
यह एक सुविधा है जिससे आप एक ही task को अलग-अलग AI models पर एक साथ चला सकते हैं। इससे आप देख सकते हैं कि आपके खास काम के लिए कौन सा model सबसे अच्छी गुणवत्ता देता है, ताकि बचत से नतीजों को नुकसान न हो।
जानकारी
लेखक का मूल विवरण
Measurement-driven model router for Claude Code. Routes Haiku/Sonnet/Opus per task class, logs every routed task with real $ numbers, and A/B tests cheaper tiers before you trust the savings.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #6303
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।