More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    toknix — Cut the Tokens Your Coding Agent Wastes

    1

    A single test run can hand your agent 60 lines of PASSED before it reaches the one failure that matters.

    $1

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    toknix — Cut the Tokens Your Coding Agent Wastes

    toknix — Cut the Tokens Your Coding Agent Wastes

    Example session with this skill installed

    My Claude Code sessions are getting expensive and a lot of it seems to be test output. Install toknix, run my test suite through it, and show me what it saves.

    • Read your context and instructions
    • Compiled the toknix

    Summary

    toknix is installed and active. On your test suite it cut the output the agent reads from

    82 lines to 14 (−87% tokens), kept the one failing test in full, and kept the exit code. Restart Claude Code once so the hooks load in every new session.

    1. Install

    sh toknix/install.sh --from toknix
    toknix doctor
    
    toknix 0.3.1
      hook bash           installed
      hook read           installed
      hook session-start  installed
      hook prompt         installed
      hook agent          installed
      statusLine          toknix
      rules               v1 in ~/.claude/CLAUDE.md
    

    Your original settings.json and CLAUDE.md were backed up to ~/.toknix/backups/.

    2. Your test run, through toknix

    toknix run -- "python -m pytest -v"
    
    tests/test_cart.py::test_coupon_case_insensitive FAILED
    
    =================================== FAILURES ===================================
    _________________________ test_coupon_case_insensitive _________________________
    
        def test_coupon_case_insensitive():
    >       assert total([(50, 2)], coupon='save10') == 90
    E       AssertionError: assert 100 == 90
    E        +  where 100 = total([(50, 2)], coupon='save10')
    
    tests/test_cart.py:188: AssertionError
    =========================== short test summary info ============================
    FAILED tests/test_cart.py::test_coupon_case_insensitive - AssertionError
    ========================= 1 failed, 61 passed in 0.05s =========================
    [toknix: 82 → 14 lines; full output: toknix recall 94450e; exit 1]
    

    The 61 PASSED lines and the session header were dropped. The failure, the summary and exit 1 reached me unchanged. If you need the full output: toknix recall 94450e.

    The bug itself: total() compares the coupon with "SAVE10" case-sensitively, so save10 gets no discount. Fix: if coupon and coupon.upper() == "SAVE10":.

    3. What it saved so far

    toknix gain
    
    FilterRunsSaved
    generic (unittest -v)110.2k tokens
    gitlog (git log)19.0k tokens
    pytest (pytest -v)11.3k tokens
    passthrough (pip install)10
    Total20.5k tokens saved directly, ≈ 46k ETU with cache re-reads

    Next steps

    1. Restart Claude Code so the hooks apply to every Bash, Read and subagent call.
    2. Open toknix ui to see each cut side by side with the original.
    3. After a few days, run toknix waste --days 7 for a list of what else costs you tokens, each with a fix.
    4. Want proof that quality held? I can set up a tasks.json and run toknix bench + toknix compare (this runs a real agent, so it costs real tokens: I will tell you the run count first).

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Your coding agent reads a lot of noise. You pay for every line.

    On 9 real command outputs, toknix cut 77% of the tokens without dropping a single error line. One command to install, and your own savings report to prove it.

    A single test run can hand your agent 60 lines of PASSED before it reaches the one failure that matters. git log dumps 1,500 lines. A 900-line file gets read whole to find one function. Then all of it sits in the context and is re-read, as cache, on every request that follows.

    toknix sits between your agent and that noise. It is a small CLI (Python ≥ 3.9, standard library only, zero dependencies) that this skill installs and teaches your agent to use.

    What it does

    ✂️Cuts wasteFilters test, build, install and git output. Blocks reads of lock files, node_modules and huge files. Reads one function instead of the whole file.
    📏Measures ittoknix gain, report, waste and a live local dashboard show what was saved, in tokens and in dollars.
    ✅Proves quality heldA/B runs of a real agent on your own tasks, with an ACCEPT / REJECT / INCONCLUSIVE verdict.

    The numbers

    Measured on real outputsResult
    Tokens across 9 real command outputs22,535 → 5,105 (−77%)
    Error lines kept54 / 54, always
    git log (1,500 lines)−96%
    pytest -v with 2 failures−72%
    Reading one function vs the whole file−78% to −83%
    toknix refs on a 2,000-file repo0.19 s

    Short outputs (40 lines or fewer) pass through untouched. Your exit codes are preserved. Anything that was cut is one toknix recall <id> away, byte for byte.

    Features

    • Smart output filters for pytest, jest, go test, cargo, gradle, make, npm, pip, git, docker and more. Failures, summaries and exit codes stay; passing tests, progress bars and download logs go.
    • Error lines are never cut, even when they alone exceed the budget.
    • Read guard: stops whole reads of generated, vendored and lock files, files over 800 lines, and the third identical read of an unchanged file, and tells the agent how to read instead.
    • Code by name: outline, symbol, refs, map for Python, JS/TS, Go, Java, Rust, PHP, Ruby, Dart, Kotlin and C#.
    • Cheaper subagents: Explore tasks go to Haiku, routine reading and implementing to Sonnet; design, planning and debugging keep your model. Never routes up, never overrides a model you chose.
    • Cost reports from your own transcripts: cost by model, cache hit rate, top sessions, and a waste report with a fix for each item. toknix context shows what your CLAUDE.md, MCP servers and skills cost on every request.
    • Status line for Claude Code: context used, session cost, tokens saved.
    • A/B bench: toknix bench + toknix compare run your tasks in throwaway git worktrees and give a statistical verdict (bootstrap 95% CI).

    Safe by design

    • 🔒 Nothing leaves your machine. All data lives in ~/.toknix/.
    • ↩️ Clean uninstall. Every file it edits is backed up first; toknix uninstall restores them byte for byte.
    • 📦 Zero dependencies, full source bundled in the skill (MIT). No download needed to install.
    • 🧪 488 tests, CI on Linux, macOS and Windows.
    • Hooks never block your agent: on any error they exit silently.

    Install

    Ask your agent: "Install toknix from the skill and check it with doctor." Or run it yourself:

    sh toknix/install.sh --from toknix
    # then restart Claude Code
    toknix doctor
    

    Works on macOS, Linux and Windows (Git Bash). Full hooks for Claude Code; Codex CLI and Gemini CLI get the rules block and the commands.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    • Token counts in toknix gain are estimates (about 4 characters per token for text). report, waste and context use the exact usage numbers from your transcripts.
    • Full hook integration is for Claude Code. Codex CLI and Gemini CLI have no hooks yet: they get the rules block and call toknix run / toknix outline themselves. Gemini transcripts are not read.
    • A permission rule like Bash(npm test:*) may not match the rewritten toknix run -- 'npm test', so Claude Code can ask where it did not before. Add a rule for the wrapped form.
    • Code outline is exact for Python (ast) and regex-based for JS/TS, Go, Java, Rust, PHP, Ruby, Dart, Kotlin and C#; minified code can confuse it. Swift, C and C++ are not supported.
    • Subagent routing guesses the task from its description and prompt (English and Vietnamese keywords); a task it cannot place keeps your main model. Turn it off with "route_subagents": false.
    • Windows works through Git Bash and is tested in CI, but has seen less real-world use than macOS and Linux.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 9 days ago

    Accounts
    GitHub
    Software
    Python 3.9+Git
    Claude Code
    orCodex CLI
    orGemini CLI
    jestNode.js
    Optional
    uv (Python tool runner)

    Claude Code gets full hooks; Codex CLI and Gemini CLI get rules and commands.

    Permissions

    Terminal / Shell
    Write Files
    Network Access
    Read Files
    Environment Variables

    Allowed Hosts

    raw.githubusercontent.com

    File Scopes

    ~/.toknix/**
    ~/.claude/settings.json
    ~/.claude/CLAUDE.md
    ~/.claude/projects/**/*.jsonl

    Terminal: installs the toknix CLI and runs your test, build and git commands through `toknix run` to filter their output. Read files: outline/symbol/refs read source files by name; reports read Claude Code transcripts in ~/.claude/projects to compute costs. Write files: the installer adds hooks to ~/.claude/settings.json and a rules block to ~/.claude/CLAUDE.md (and ~/.codex/AGENTS.md / ~/.gemini/GEMINI.md if present), backing each file up to ~/.toknix/backups first; `toknix uninstall` restores them byte for byte. Network: only during the one-time install (pip/uv may fetch the setuptools build backend); toknix itself makes no network calls and nothing leaves your machine. Environment variables: optional TOKNIX_RAW, TOKNIX_DEBUG, TOKNIX_HOME. `toknix ui` serves a read-only page on 127.0.0.1 only.

    Listed9 days ago

    What's inside

    Frequently Asked Questions

    Error lines are never cut, even when they alone exceed the token budget (54 of 54 kept on the benchmark). Exit codes are preserved. Outputs of 40 lines or fewer pass through untouched. Anything that was cut stays on disk and `toknix recall <id>` prints it byte for byte, or just the part you need with `--grep` or `--lines`.

    On 9 real command outputs it cut 77% of tokens (22,535 → 5,105); git log −96%, pytest −72%, builds 11–56%. Reading one function instead of the whole file saves 78–83%. Your own numbers depend on your work: `toknix gain` shows what was cut, `toknix report` and `toknix waste` show where your tokens and dollars go, and `toknix bench` + `toknix compare` prove it on your own tasks.

    Claude Code gets everything: output filters, read guard, subagent routing, status line. Codex CLI and Gemini CLI get the rules block and every command (`toknix run`, `outline`, `symbol`, `refs`, `map`). It runs on macOS, Linux and Windows (Git Bash) with Python 3.9+ and no other dependencies.

    No. toknix makes no network calls. Everything it records (saved outputs, stats, backups) lives in `~/.toknix/`. The `toknix ui` dashboard is read-only and listens on 127.0.0.1 only.

    Yes. Every file toknix edits (`~/.claude/settings.json`, `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`) is backed up before the change, and `toknix uninstall` restores them byte for byte. `sh toknix/install.sh --uninstall` also removes the command and the PATH lines. Your stats stay in `~/.toknix` until you delete that folder.

    Yes. You do not pay per token, but every token counts against your context window and your usage limits. Less noise means sessions run longer before /compact, the agent sees the failure instead of 60 passing lines, and you hit limits later. The dollar figures in reports are API list prices, shown for comparison.

    New in LLM Ops