@bifurcate/claude-tool-tracer
v0.6.2
Published
Claude Code plugin that automatically tracks tool calls and token consumption per session — including subagents.
Downloads
58
Readme
Claude Tool Tracer
Claude Code plugin that automatically tracks tool calls and token consumption per session — including subagents.
Installation
Requires Bun (hooks run via bunx).
# Add the Bifurcate marketplace
/plugin marketplace add Bifurcate-Loops/bifurcate-plugins
# Install the plugin
/plugin install claude-tool-tracer@bifurcate-pluginsSkills
Once installed, three slash commands become available:
| Command | Description |
|---------|-------------|
| /report [session_id] | Markdown table of tool usage counts + token summary |
| /tui [session_id] | Interactive terminal dashboard (opens in new terminal window) |
| /tui-watch [session_id] | Live dashboard with auto-refresh; press u to fetch plan usage |
How It Works
The plugin registers hooks into the Claude Code session lifecycle:
SessionStart → PostToolUse (per tool call) → Stop / SubagentStop → SessionEndEach hook invokes bunx @bifurcate/claude-tool-tracer <subcommand> with the event payload on stdin. Session data is written to:
~/.claude/tracer/<project_key>/<session_id>.jsonData is project-scoped — each working directory gets its own tracer namespace.
TUI Dashboard
The interactive dashboard displays:
- Session metadata — id, model, working directory, timestamps
- Token usage — bar chart (input, output, cache read, cache write)
- Tool calls — sorted table of call counts per tool
- Plan usage — quota consumption per billing period (on-demand via
ukey in watch mode)
You can also launch it directly from the terminal:
bunx @bifurcate/claude-tool-tracer tui --cwd $PWD # latest session
bunx @bifurcate/claude-tool-tracer tui --cwd $PWD <session_id> # specific session
bunx @bifurcate/claude-tool-tracer tui --watch --cwd $PWD # live modeDevelopment
See CLAUDE.md for dev setup, commands, and architecture details.
License
MIT
