tunnel-cost

Reviewed at commit b468b10

MIDDLEWARE TUNNEL stage 2: Cost analyzer: estimates the call's token cost from the args size

Made by
ucsandman
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
Hooked events
Made this mod? Add a badge to your README

modsforClaude badge for tunnel-cost

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/tunnel-cost.svg)](https://modsforclaude.com/mods/tunnel-cost/)

← All mods