tunnel-cost
Reviewed
at commit b468b10
MIDDLEWARE TUNNEL stage 2: Cost analyzer: estimates the call's token cost from the args size
0 upvotes
Log in to upvote or save- Made by
- ucsandman
- Pinned commit
-
b468b10503c9104109141c45f93f4a373160d9d1 - What we checked
-
For Bash commands that contain the word "tunnel", logs a line with a rough token estimate of the command size and another with the estimated size of the result that goes back to Claude. Other commands are untouched. It is one stage of a four-part demo and does little more than print those log lines.
Review details
Static review of the source at the pinned commit; not run. Registers one tool.call handler filtered to Bash commands matching /tunnel/i. It writes $.ui.log lines (stage label, first 60 characters of the command, args size divided by 4 as a token estimate, result size divided by 4, elapsed ms), calls next(e) and returns the result unchanged. No files, network, processes or stored data.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: yes
- Blocks or changes tool calls: no
- Reads or writes files: no
- Runs programs on your machine: no
- Calls the model (uses tokens): no
- Sends data over the network: no
- Stores data: no
- Shows something on screen: yes
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/tunnel-cost/)