token-monitor: Instructions file for Codex

AGENTS.md

token-monitor AGENTS.md is an instructions file for Codex, OpenCode from Javis603/token-monitor. It costs 8,612 tokens per session, scanned A, original, MIT.

A project guide for token-monitor, an Electron desktop widget and Node.js service that collects AI tool usage data. It documents commands for running the widget, hub, collector, tests, linting, and verification.

In plain words
What is it for?
Use it to start the widget or services, run one-time or dry-run collection, execute tests and linting, and perform the full verification command.
Why use it?
It centralizes the commands and runtime requirements needed to develop, test, and operate the monitoring project.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is Javis603/token-monitor's own configuration. It tells Codex and OpenCode how to work on token-monitor itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything token-monitor configures →

About the project

Token Monitor is a local-first desktop widget that tracks token usage, costs, account limits, and session details across many AI coding tools. It is for developers who use tools such as Claude Code, Codex, Cursor, and OpenCode across multiple devices, with synchronized usage history and breakdowns.

Javis603/token-monitor · 2,089 stars · on GitHub · javis-ai.com

Reuse

Borrowing it

Nothing to install: this file belongs to Javis603/token-monitor. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Javis603/token-monitor/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Javis603/token-monitor

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for token-monitor AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/javis603/token-monitor/agents-md/github.svg)](https://agentmods.dev/instructions/javis603/token-monitor/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/javis603/token-monitor/agents-md"><img src="https://agentmods.dev/badge/instructions/javis603/token-monitor/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for token-monitor AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/javis603/token-monitor/agents-md"><img src="https://agentmods.dev/badge/instructions/javis603/token-monitor/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8,612 This file is loaded in full into every session.
When invoked 8,612 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.08612 $0.08612
Opus 5 $0.04306 $0.04306
Sonnet 5 $0.01722 $0.01722
Haiku 4.5 $0.00861 $0.00861

Measured today against content hash 149231e0ae38, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

token-monitor AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 182 lines

How it starts

The opening of the file, as written. The whole thing — 182 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

This is the single source of project guidance, shared by every coding agent (Claude Code, Codex, Cursor, …). CLAUDE.md is a Claude Code compatibility shim that just imports this file — edit this file, not CLAUDE.md.

Commands

npm start          # launch the Electron widget (= npm run widget / npm run dev)
npm run hub        # start the Node hub on port 17321
npm run agent      # start the headless collector→hub agent
npm run agent:once # one-shot collect+post, then exit (useful for cron/launchd)
npm test           # run the node:test suite (node --test "tests/**/*.test.js")
npm run lint       # ESLint flat config (eslint.config.js)
npm run verify     # lint + test (single local entry point)

Automated verification is npm run verify (= npm run lint && npm test); CI (.github/workflows/ci.yml) runs lint + test on push/PR across Node 22 & 24. The toolchain (ESLint 10 + the node:test glob) needs Node 22.13+ and DSH session decoding needs zlib.zstdDecompressSync (Node 22.15+), which is why engines.node is >=22.15.0 (Node 18 & 20 are both EOL as of 2026-06).

To dry-run the agent without posting: npm run agent:once -- --dry-run.

The app, headless-agent, and packaging scripts explicitly run ensure:tokscale before execution: every native target published by the upstream npm package gets the pinned binary from scripts/vendor/tokscale.json; source platforms without an upstream native package keep the npm fallback and cache a capability filter for unsupported clients. npm install/ci/hub/lint/test/verify never download it. The manifest's mode (override/upstream) only ever gates binary provenance — upstream stops ensure:tokscale from downloading/replacing (it still fails closed on a missing packaging-target npm package), while both verify-vendored-tokscale*.js gates keep running against whichever binary is authoritative, so CI still catches a client-coverage or DSH-parsing regression either way. Flipping mode back is a manifest edit, not new wiring.

Read the full file on GitHub · 182 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +1 lines · +102 tokens per session 149231e0ae38
  2. 5d ago Changed · +187 tokens per session ee897c62d5ed
  3. 6d ago Changed · +25 lines · +1,475 tokens per session 8a499f8ca2cf
  4. 7d ago Changed · +179 tokens per session 40f1d9cbd596
  5. 10d ago Changed · +4 lines · +79 tokens per session 7287c70e8917
  6. 12d ago First seen · 152 lines · 6,590 tokens per session scan A f5ec13a1b99f

Subscribe to this mod's changes

token-monitor AGENTS.md is an instructions file published in the GitHub repository Javis603/token-monitor (2,089 stars, last pushed today), licensed MIT. It adds 8,612 tokens to every session, about $0.0431 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,126 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens