rhnfzl

Agent Usage Tracker — AI skill for Claude Code

AI community

Passive, subscription-safe token & model usage tracker for coding agents (Claude Code, Codex, Cursor, Pi).

How to install Agent Usage Tracker

This entry records only its repository, not the path inside it, so there is no exact command to give. Open rhnfzl/agent-usage-tracker and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agent Usage Tracker does

Passive, subscription-safe token & model usage tracker for coding agents (Claude Code, Codex, Cursor, Pi). Reads local logs, normalizes, ships to a self-hosted sink.

Alternatives in AI

  • Codeburn — Free, local tool to track AI coding token usage and cost across 37 tools and agents (Claude Code, Cursor, Code 9.7k ★
  • Manifest — Real-time cost observability for OpenClaw agents — track tokens, costs, messages, and model usage 4.1k ★
  • Token Monitor — Local-first desktop widget for tracking token usage, costs, and limits across 32+ AI coding tools—including Cl 1.8k ★

README

agent-usage-tracker (`aut`)

[![CI](https://github.com/rhnfzl/agent-usage-tracker/actions/workflows/ci.yml/badge.svg)](https://github.com/rhnfzl/agent-usage-tracker/actions/workflows/ci.yml) [![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/downloads/) [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE) ![Runtime dependencies](https://img.shields.io/badge/runtime%20deps-0-brightgreen) ![Platforms](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey)

Coding agents on a subscription do not tell you what they cost. There is no per-session invoice line, no dashboard that adds up across tools, and the flat monthly fee hides everything underneath it.

This reads the logs **Claude Code, Codex CLI, Cursor, and Pi already write to disk**, normalises every assistant turn into one event, and pushes it to a sink you host yourself (an n8n webhook by default, or Postgres/TimescaleDB directly over Tailscale).

Two collectors are opt-in because they need something the others do not:

  • cursor_sdk, for agents built on the Cursor Agent SDK. Those write no session logs, because the SDK returns usage in-process and the app persists it. Point cursor_sdk_manifests at the run manifest.json files such an app writes and their per-run tokens flow through the same pipeline.
  • cursor_api, for accurate Cursor usage. The local cursor collector is only a lower bound, and the cursor-agent CLI writes no token counts to disk at all. This one pulls your own per-event usage from Cursor's dashboard API using the locally stored session token, which the tool never persists. On a team plan it scopes strictly to your own user and re-checks every event, so a teammate's usage is never captured. It makes authenticated network calls, so it stays off until you set cursor_api = true.

Why not a proxy?

Because these agents log in with an **OAuth subscription, not an API key** (Cla