A small program on your computer. It sends your token counts to the build room at aiworkflowbuilders.live, so the board runs by itself. Nobody types a number.
This is a public repository, so that any member can read exactly what it sends. The source lives in the private app repository, in reporter/; this repository is a copy of that folder.
One report, after each tool call and at the end of each turn:
{
"source": "claude-code",
"client_version": "0.2.0",
"surface": "local",
"events": [
{
"kind": "counter",
"session": "mcciTdXkuHDNhKQYB9s1ozo4",
"model": "claude-fable-5-2",
"project": "my-app",
"source_key": "3ClqrOzBih3dTnUV6oiWeVHM",
"input": 490,
"output": 445348,
"cache_write": 1340949,
"cache_read": 96454862
}
]
}- The four numbers are running totals for the session. The room counts only the growth.
projectis the name of your repository or folder. It is private: only you see it, on the room's Me screen. Other people see "Private project" until you give the project a public name there and turn its public switch on.surfacesays where the session runs:local(your computer),remote_control(a local session with Remote Control connected, which may be your phone or a different computer), orcloud(claude.ai/code, also when started from the Claude phone app). It comes from variables that Claude Code sets.sessionandsource_keyare short codes. They are made with a secret that stays on your computer, so the room cannot work out your session id or your folder path.
Your prompts. The agent's replies. Your code. File names and file paths. The address of your repository. Branch names. Your email.
The room refuses a report that holds any other field. Run /token-meter:preview to see the exact report before any is sent.
- In the build room, open Me, then Connect your agent. Pick "Claude Code", name your device, and press Make key.
- Paste these two lines into Claude Code, one at a time:
/plugin marketplace add Pattern-Engine/token-meter /plugin install token-meter@pattern-engine - When Claude Code asks for the "Room key", paste the key.
- Ask Claude: "What is the build room status?" It answers with the room's counts.
The page says "Connected" when the first report arrives. Claude Code's documents say that a value like this key is kept in your computer's secure store, so you do this one time and it still works after a restart. This was not checked on every kind of Claude Code install.
Not tested yet. Claude Code's documents (read 1 December 2026) say that a cloud session does not load plug-ins that you installed on a computer, and it has no settings dialog for the key. The meter reads the key from AWB_API_KEY. The build-room tools take the key from the plug-in's settings, and Claude Code's documents do not say if that works in a cloud session (read 2 December 2026), so the tools may not work there.
- In the build room, make a key with the agent "Claude Code in the cloud".
- Add the plug-in to your Claude account at claude.ai/customize/plugins, from the marketplace
Pattern-Engine/token-meter. - In the settings of your cloud environment, add the variable
AWB_API_KEYwith the key. Anyone who uses that environment can read it.
| Part | What it does |
|---|---|
| The meter (hooks) | Sends exact token counts after each reply. Counts only. |
The build-room tools (an MCP connector at /mcp) |
Let Claude see your projects and shipped things, mark a thing as shipped, change a name, blurb or link, and take back its last change for 24 hours. They use the same key. |
The build-room skill |
Tells Claude when to use the tools: it asks "mark this shipped?" when a pull request merges or a release goes out, and it never makes a thing public. You do that on the Me screen. |
| Command | What it does |
|---|---|
/token-meter:preview |
Shows the exact report that would be sent. Sends nothing. |
/token-meter:status |
Says if reports go out, and when the last one went. |
/token-meter:project <name> |
Names this folder's project. /token-meter:project off turns reports off for this folder. |
/token-meter:pause and /token-meter:resume |
Stops and starts reports from this computer. |
- A file named
.awb-projectin the folder, or in a folder above it. Its one line is a project name, or the wordoff. - A git repository. All worktrees of one repository are one project. A remote is not needed, and the repository can be private. Nothing is sent to GitHub.
- No git: the name of the folder where the agent started.
Claude Code writes the token numbers of each model reply to the session transcript on your disk. The reporter reads only those numbers.
- One reply is written on several lines with the same numbers. The reporter counts each reply one time. (Checked on a real session on 1 December 2026: adding every line gives about 3 times the real total.)
- Sub-agents write to their own files next to the session's file. The reporter reads those too, and reports them under the same session.
- It reads only what is new since its last run.
- After each tool call it sends at most one report every 3 seconds. At the end of each turn it always sends, so the last numbers of a turn arrive.
The reporter never stops or slows your agent. With no network, a wrong key or an odd file, it stops with no message. /token-meter:status says if the last report arrived, and if the room refused the key. It cannot say why the room refused the key; the room's Connect screen says that. If the room refuses the key, the reporter does not try again until you give it a new key.
- That every Claude Code install has
nodeon its path. The hook runsnode. - That a resumed session does not copy old replies into a new session file. If it does, those replies count again under the new session.
- That the key prompt shows at install time on every surface (terminal, desktop app, VS Code). The docs say it shows when the plug-in is enabled.
- Agents other than Claude Code. There is no reporter for them yet.
npm test runs the tests in the test folder: the counting rules, and the real hook file against a small local server. claude plugin validate plugins/token-meter checks the plug-in files.