token-usage-monitoring-hook

Installation
SKILL.md

Token Usage Telemetry Hook Protocol (Anomaly Spike Detection)

Overview

When running autonomous agents with file inspection and browser tools, an unmonitored agent can silently ingest a 40,000-token minified JS file or 5MB raw HTML log without the developer or orchestrator noticing.

Silent token consumption causes:

  1. Financial Invoice Spikes: A looping agent burns $50+ in minutes.
  2. Invisible Performance Degradation: Sudden 15-second latency spikes caused by processing bloated input prompts.
  3. No Root-Cause Tracing: Developers cannot identify which specific tool call or turn introduced the token flood.

The Token Usage Telemetry Hook Protocol intercepts every model response and tool execution - logging exact input, output, and cache read metrics and triggering an alert when any single turn exceeds safe thresholds ($> 5,000\text{ tokens}$).


Invisible Token Leaks vs. Real-Time Telemetry Hook

Installs
1
GitHub Stars
2
First Seen
Oct 24, 2026