claude

tokenwright

Spend fewer tokens on the same result in any AI agent work: a habits catalogue in four families (don't load or reload data, shortcut the process, script what repeats, script what you solved once) with measured savings, a skill-cost review, and a standard-library CLI that skips unchanged re-reads with a diff, ranks a transcript's token sinks by carried cache cost, finds repeated command runs and costs a skill. Optional hooks, off by default. Evergreen.

0 on GitHubby Mark Rogersv0.3.1MITupdated 2 days ago
/

Plugin tokenwright from marketplace tokenwright in m4bwav/tokenwright. Commands read from the repo's manifest — 2 days ago.

This plugin runs code on your machine — its hooks fire automatically on events like tool use. The exact commands are listed below; read them before installing.

What it installs

Skills (4)

  • tokenwright-catalog

    Cut what the whole skill catalog costs and fix skills that fire on each other's prompts: lint descriptions, explain clashes, split long bodies, park rarely used skills, audit startup files. Use on 'why did the wrong skill fire', 'skills overlap', 'shorten my skill descriptions', 'how many tokens do

  • tokenwright-script

    Turn a repeating or already-solved agent process into a script, so the next run is one command: finds candidates (tw.py repeats) and writes the script with inputs, a dry run and idempotence. Use on 'script this', 'we keep doing this', 'make this one command', 'automate what you just did', 'next time

  • tokenwright-skills

    Review one skill or plugin for token cost and rank the savings: description length, always-loaded text, references to load on demand, steps that should be scripts or subagents. Runs tw.py skill. Use on 'is this skill too big', 'make this skill cheaper', 'token cost of my plugin', 'review this SKILL.

  • tokenwright

    Spend fewer tokens on the same result in any agent work: habits (don't load or reload data, shortcut the process, script repeats) and tw.py (diff instead of re-read, rank a session's token sinks). Use on 'save tokens', 'this is expensive', 'context is filling', 'why did that cost so much', 'score th

Hooks (2)

  • PreToolUse

    python "${CLAUDE_PLUGIN_ROOT}/skills/tokenwright/scripts/tw.py" hook pre

  • PostToolUse

    python "${CLAUDE_PLUGIN_ROOT}/skills/tokenwright/scripts/tw.py" hook post

View source on GitHub

Similar plugins

Appends two or three short follow-up questions after a substantive answer to help users check key facts, probe the reasoning, and notice missing context

19 skills

anthropics/skills 193,780

Token usage tracking, model cost attribution per agent, budget alerts, and optimization recommendations

24 skills · 1 command · 1 agent · hooks

ruvnet/ruflo 81,589

Skill: add headroom-ai compress() to a Python or TypeScript app to cut LLM input tokens (tool outputs, logs, JSON, chat history). No API key.

1 skill

headroomlabs-ai/headroom 79,508

mem0

claudecodex

Cross-session memory and token savings for coding agents.

6 skills · 1 agent · 1 MCP server · hooks

mem0ai/mem0 68,893

context7

claudecodex

Up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your coding agent's context.

1 MCP server

upstash/context7 64,709

Perform AI code review on Git diffs — supports workspace changes, branch ranges, and single commits with concurrent per-file analysis, codebase search, and deep context-aware review.

2 commands

alibaba/open-code-review 50,068

Maintain tokenwright?

This page updates itself from your repo. Add the badge to your README, or get it Featured to pin it above the organic results with a followed link to your site.

claude & codex pluginslisted