tokenroom CLAUDE.md

tokenroom CLAUDE.md is an instructions file for Claude Code, Codex from tyejcoleman/tokenroom. It costs 1,710 tokens per session, scanned A, original, Apache-2.0.

A set of working instructions for coding agents contributing to the Tokenroom repository, a project that manages usage limits and session context for agents.

In plain words
What is it for?
Use it when modifying Tokenroom to follow its architecture, decisions, work plan, procedures, and automated checks.
Why use it?
It tells the agent which project documents to read, which rules are mandatory, and which checks can block unsafe or unsupported changes.

Instructions file for Claude CodeCodex

Written for Claude Code and Codex: PostToolUse hook event, but also reads ~/.codex or $CODEX_HOME. Also seen: reads .claude/ paths; mentions Codex.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/tyejcoleman/tokenroom/claude-md
Clone the repo
git clone --depth 1 https://github.com/tyejcoleman/tokenroom

Made for: Claude Code, Codex.

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 tokenroom CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tyejcoleman/tokenroom/claude-md.svg)](https://agentmods.dev/instructions/tyejcoleman/tokenroom/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/tyejcoleman/tokenroom/claude-md"><img src="https://agentmods.dev/badge/instructions/tyejcoleman/tokenroom/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,710 This file is loaded in full into every session.
When invoked 1,710 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.01710 $0.01710
Opus 5 $0.00855 $0.00855
Sonnet 5 $0.00342 $0.00342
Haiku 4.5 $0.00171 $0.00171

Measured 5d ago against content hash 7ce6334e74a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

tokenroom CLAUDE.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 5d ago.

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.

CLAUDE.md · 108 lines

How it starts

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

Tokenroom — agent working context

Tokenroom is a resource-aware layer for coding agents. It makes the agent aware of its two scarcest resources — account rate-limit headroom (5h / 7d windows) and session context headroom (tokens before compaction) — so it can plan work to fit, spend efficiently, and use capacity that would otherwise expire.

Read this before any work

  1. docs/ARCHITECTURE.md — what talks to what: data flow, module map, extension points.
  2. docs/DECISIONS.md — the ADR log: every standing decision with its why. Do not silently violate an ADR; propose a new one instead.
  3. docs/PLAN.md — the phased plan; every task has acceptance criteria (AC).
  4. Background when needed: docs/ONE-PAGER.md (original design), docs/VALIDATION.md (assumption gates + eval methodology).

Hard gates (enforced, not advisory)

scripts/check-invariants.mjs runs after every Edit/Write you make (repo PostToolUse hook) and inside npm test/CI. It blocks: new dependencies or non-builtin imports (ADR-2), any network surface (ADR-1/G3), compliance tripwires (ADR-1/G4), and catch-free tap/hook entry points (ADR-5). If a gate blocks you and you believe you're right, stop and propose an ADR change — never work around a gate.

Procedures (repo slash-commands)

/release (version → CHANGELOG → tag → publish checklist) · /add-fixture (new payload shape → sanitized fixture + tests) · /run-evals (required for any stamp/skill/verdict wording change, per ADR-9).

Hard rules (compliance — non-negotiable)

These are the project's reason to exist responsibly. Any change that touches them is wrong:

  • Official extension points only: statusline stdin JSON, hooks (UserPromptSubmit, SessionStart, PreCompact, PreToolUse), MCP, OTel, and the user's own ~/.claude / ~/.codex files.
  • Never reuse a subscription OAuth token outside the official client, call undocumented endpoints (e.g. api/oauth/usage), spoof harness identity headers, read .credentials.json to make API calls, or burn interactive subscription quota headlessly. (The ADR-16 carve-out that once allowed user-armed headless spend is withdrawn — ADR-22 removed the ARM executor; autonomous continuation belongs to the separate Conductor package on in-session surfaces.)
  • Defensive parsing always: every field we read may be absent, malformed, or buggy (e.g. epoch values leaking into used_percentage). Degrade gracefully, clamp to valid ranges, never crash the statusline.

Read the full file on GitHub · 108 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. 5d ago First seen · 108 lines · 1,710 tokens per session scan A 7ce6334e74a2

Subscribe to this mod's changes

tokenroom CLAUDE.md is an instructions file published in the GitHub repository tyejcoleman/tokenroom (0 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 1,710 tokens to every session, about $0.0086 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-31.