Skip to content
m4bwav edited this page Oct 31, 2026 · 2 revisions

tokenwright

The hub. Use it when a session feels expensive, the context is filling, or you want to know why a task cost so much. It sorts the habits into four families:

  1. Don't load or reload data. Search, then read a range. Don't re-read after an edit. Skip unchanged re-reads with tw.py changed. Trim output at the source. Send big sweeps to a subagent.
  2. Shortcut the whole process. Stop when the answer is known, answer from an index, batch calls, clear between tasks.
  3. Script a process that repeats.
  4. Script what you solved the first time.

Its references/ folder holds the habits catalogue, the Claude Code and API levers, and the waste vocabulary. The agent reads them only when it needs them.

tokenwright-script

Use it when a job keeps coming back, or right after solving something fiddly. It turns the steps into a script with a dry run and a short result, so the next run costs one command. tw.py repeats finds candidates.

tokenwright-skills

Use it when writing or reviewing a skill or plugin. It ranks savings by where they are paid: in every session (the description), when the skill triggers (SKILL.md), or on demand (references). tw.py skill does the counting. For the whole catalog, use tokenwright-catalog.

tokenwright-catalog

Use it when the wrong skill fires, two skills overlap, descriptions are too long, or the whole catalog costs too much. It was the skill-tidy plugin until 0.2.0. Its tidy.py lints descriptions and finds pairs that compete for the same prompts. It checks that a rewrite keeps every trigger before writing it. It also splits long skill bodies into references, parks rarely used skills behind a one-line index, and audits the always-loaded startup files. Run it through tw.py catalog or directly.

Clone this wiki locally