Measurement-driven model router for Claude Code. An agent skill from majiayu000/claude-skill-registry.

MITAuto-check passedAI & LLM Engineering

Install Tokenwise

skills CLI
$ npx skills add majiayu000/claude-skill-registry --skill tokenwise -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install majiayu000/claude-skill-registry tokenwise --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/majiayu000/claude-skill-registry.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ai-llm/tokenwise .claude/skills/tokenwise && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tokenwise
GitHub stars
666
Used in
2 other repos
Token cost
~932 tokens
SKILL.md length
393 words
Files
2
Skills in repo
971
Repo updated
First seen
Licence
MIT

At a glance

Measurement-driven model router for Claude Code. An agent skill from majiayu000/claude-skill-registry.

  • Tasks that involve Model routing and gateways
  • SKILL.md covers Overview, When to use, Subcommands and Routing taxonomy, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve A/B testing

What it does

Tokenwise is an agent skill from majiayu000/claude-skill-registry. 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.

Its SKILL.md is about 930 tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `metadata.json`).

It sits in AI & LLM Engineering, covering Model routing and gateways and A/B testing. The repository describes itself as: Searchable Claude Code skills catalog with source-linked guides and generated registry artifacts. The licence is MIT.

When your agent uses it

  • Tasks that involve Model routing and gateways
  • Tasks that involve A/B testing

Example prompts

  • “/tokenwise”

What it can do on your machine

Read from SKILL.md and the folder at commit 000116a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tokenwise loads about 932 tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 393 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~932

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from majiayu000/claude-skill-registry at commit 000116a, republished under its MIT licence (© majiayu000). 393 words, ~932 tokens.

Download SKILL.mdSave it as .claude/skills/tokenwise/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
tokenwise
description
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.
category
developer-tools
risk
critical
source
community
source_repo
CodeShuX/tokenwise
source_type
community
date_added
2026-05-12
author
CodeShuX
tags
model-routing, token-optimization, cost-reduction, anthropic, haiku, sonnet, opus, claude-code, ab-testing, measurement
tools
claude
license
MIT

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-run mode
  • /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
Show full SKILL.md (192 more words)Show less

Routing taxonomy

TierModelTask class
MechanicalHaiku 4.5file reads, grep, format, rename, simple edits, doc lookups
Scoped reasoningSonnet 4.6single-file refactor, scoped research, test writing
SynthesisOpus 4.7architecture 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

© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/ai-llm/tokenwise of majiayu000/claude-skill-registry.

  • SKILL.md
  • metadata.json

Open the folder on GitHubat commit 000116a

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in majiayu000/claude-skill-registry, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Tokenwise next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tokenwise compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tokenwise this skillmajiayu000/claude-skill-registry6662 repos~932Automated safety check: PassMIT
Olore Tensorzero Latestolorehq/olore103—~1.6kAutomated safety check: PassMIT
Explore Runlllllllama/RigorPilot-Skills4972 repos~833Automated safety check: PassMIT
Skill Forge BenchmarkAgriciDaniel/skill-forge177—~1.4kAutomated safety check: PassMIT
Shogun Bloom Configyohey-w/multi-agent-shogun1.4k—~3.1kAutomated safety check: PassMIT
Codemie Analyticscodemie-ai/codemie-code294—~7.5kAutomated safety check: PassApache-2.0

Similar skills

  • Local TensorZero documentation reference (latest). An agent skill from olorehq/olore.

    103 GitHub stars~1.6k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Explore Run

    lllllllama/RigorPilot-Skills

    Rigor Improve / Rigor Explore run leaf skill for bounded exploratory evidence in deep learning research repositories.

    497 GitHub starsUsed in 2 repos~833 tokens
    AI & LLM EngineeringAuto-check passed
  • Skill Forge Benchmark

    AgriciDaniel/skill-forge

    Benchmark Claude Code skill performance with variance analysis, tracking pass rate, execution time, and token usage across iterations.

    177 GitHub stars~1.4k tokensUpdated 5 mo ago
    AI & LLM EngineeringAuto-check passed
  • Shogun Bloom Config

    yohey-w/multi-agent-shogun

    Interactive wizard: guided questions with multiple-choice options about subscriptions, then outputs a ready-to-paste capabilitytiers YAML + fixed agent model assignments.

    1.4k GitHub stars~3.1k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Codemie Analytics

    codemie-ai/codemie-code

    CodeMie Analytics expert — use this skill whenever the user asks about CodeMie usage data, AI adoption metrics, user leaderboards, CLI insights, spending, LiteLLM costs, token usage, or wants to…

    294 GitHub stars~7.5k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Model Router

    nidhi-singh02/agent-router

    A skill your agent uses when the user asks to pick a model, subscription, or reasoning effort, or to run router status, usage refresh, or resume a router session.

    110 GitHub stars~1.2k tokensUpdated 10 days ago
    AI & LLM EngineeringAuto-check passed

More from majiayu000/claude-skill-registry

All 971 skills in this repo
  • Deep Research

    majiayu000/claude-skill-registry

    Multi-source deep research using firecrawl and exa MCPs. An agent skill from majiayu000/claude-skill-registry.

    666 GitHub starsUsed in 6 repos~1.1k tokens
    Auto-check passed
  • Exa Search

    majiayu000/claude-skill-registry

    Neural search via Exa MCP for web, code, and company research.

    666 GitHub starsUsed in 5 repos~856 tokens
    Auto-check passed
  • Fal AI Media

    majiayu000/claude-skill-registry

    Unified media generation via fal.ai MCP — image, video, and audio.

    666 GitHub starsUsed in 5 repos~1.7k tokens
    Auto-check passed
  • Bgpt Paper Search

    majiayu000/claude-skill-registry

    Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server.

    666 GitHub starsUsed in 4 repos~619 tokens
    Auto-check: notes
  • Bio Alignment Pairwise

    majiayu000/claude-skill-registry

    Perform pairwise sequence alignment using Biopython Bio.Align.PairwiseAligner.

    666 GitHub starsUsed in 4 repos~1.7k tokens
    Auto-check passed
  • Open Notebook

    majiayu000/claude-skill-registry

    Self-hosted, open-source alternative to Google NotebookLM for AI-powered research and document analysis.

    666 GitHub starsUsed in 4 repos~2.4k tokens
    Auto-check passed

Questions about Tokenwise

What does Tokenwise do?

Measurement-driven model router for Claude Code. An agent skill from majiayu000/claude-skill-registry. Tokenwise is an agent skill from majiayu000/claude-skill-registry. Measurement-driven model router for Claude Code.

When should I use Tokenwise?

Tokenwise fits situations like: tasks that involve Model routing and gateways; tasks that involve A/B testing.

How do I install Tokenwise in Claude Code?

Run `npx skills add majiayu000/claude-skill-registry --skill tokenwise -a claude-code`. Or copy the skill folder (skills/ai-llm/tokenwise in majiayu000/claude-skill-registry) into .claude/skills/tokenwise in your project. Claude Code loads it when a task matches its description.

How do I install Tokenwise in Codex?

Run `npx skills add majiayu000/claude-skill-registry --skill tokenwise -a codex`. Or copy the skill folder (skills/ai-llm/tokenwise in majiayu000/claude-skill-registry) into .agents/skills/tokenwise in your project. Codex loads it when a task matches its description.

Can I use Tokenwise in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/claude-skill-registry --skill tokenwise -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tokenwise, .gemini/skills/tokenwise, .github/skills/tokenwise and .opencode/skills/tokenwise in your project.

What does Tokenwise need to run?

SKILL.md names no scripts, command-line tools or credentials: Tokenwise is instructions for the agent only.

Does Tokenwise access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Tokenwise safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Tokenwise use?

Tokenwise is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tokenwise use?

About 932 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Tokenwise?

Skills that share tags, products or a category with Tokenwise: Olore Tensorzero Latest (olorehq/olore, 103 stars), Explore Run (lllllllama/RigorPilot-Skills, 497 stars), Skill Forge Benchmark (AgriciDaniel/skill-forge, 177 stars) and Shogun Bloom Config (yohey-w/multi-agent-shogun, 1.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tokenwise?

majiayu000 (a GitHub user) maintains it in majiayu000/claude-skill-registry, which has 666 GitHub stars. The repository holds 971 skills in this directory. The repository was last updated on October 7, 2026.

Source: majiayu000/claude-skill-registry on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.