Borrowing it
Nothing to install: this file belongs to 851-labs/tokenmaxxing. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/851-labs/tokenmaxxing/main/AGENTS.mdgit clone --depth 1 https://github.com/851-labs/tokenmaxxingWrote 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.
[](https://agentmods.dev/instructions/851-labs/tokenmaxxing/agents-md)<a href="https://agentmods.dev/instructions/851-labs/tokenmaxxing/agents-md"><img src="https://agentmods.dev/badge/instructions/851-labs/tokenmaxxing/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.
<a href="https://agentmods.dev/instructions/851-labs/tokenmaxxing/agents-md"><img src="https://agentmods.dev/badge/instructions/851-labs/tokenmaxxing/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01212 | $0.01212 |
| Opus 5.5 | $0.00485 | $0.00485 |
| Sonnet 5.5 | $0.00242 | $0.00242 |
| Haiku 4.5 | $0.00121 | $0.00121 |
Grade A, and why
tokenmaxxing 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 34 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Repository Instructions
Effect Error Style
- Prefer native Effect errors over plain JavaScript
Errorsubclasses in Effect code. - Use
Data.TaggedErrorfor internal typed errors that stay inside the Effect error channel. - Use
Schema.TaggedErrorwhen an error is part of a public schema or wire contract. - Avoid
throwfor expected domain failures; returnEffect.fail(...)with a typed error instead.
Export Style
- Prefer local declarations first and grouped exports at the end of each authored source file.
- Use
export { ... }for runtime values andexport type { ... }for type-only exports. - Put default exports at the end too, using a named local value before
export default name;. - Do not hand-edit generated files just to satisfy this style rule.
Conventions
- Daily usage rows are keyed
(deviceId, date, source, model)and upserted; sync must stay idempotent. - Cost is frozen at first upload unless the usage (token counts) changes: the
usage_daysupsert keeps the storedcost_usdwhen all token columns match (ccusage re-prices unmarked Codex history with the device's current speed tier), takes the incoming cost when any token count differs, and prices a row stored at 0. Fixing already-stored cost means editing D1 directly; re-ingesting payloads with the same tokens is a no-op for cost. - Only a parser change may lower a re-sent day. Each raw-ingested
usage_daysrow recordscounted_by, the serverPARSER_VERSIONthat produced it. A re-sent (device, day, source) is kept when every stored row has the currentcounted_byand the uploading owner, and the stored total is higher than the re-count. Kept means never lowered or pruned, though models that are new or grew are still taken. A lower re-count from the same parser means the device lost logs (deleted or pruned, a narrower source root, a full re-sync past Claude Code's 30-day cleanup), not a correction. The decision is per whole day, so a model relabeled without a loss is still replaced and pruned. Any other re-send replaces the day as before. So a correction that has to lower or drop stored usage ships as aPARSER_VERSIONbump, also when it comes from a ccusage or CLI-side counting fix. A bump is required for any server change to the rows a report yields (parsing, model labels, plausibility limits). A bump re-counts every device's trailing window once, losses included. The structured/usage/syncpath writes NULL, which is always replaced. Known gaps: a timezone change moves usage near midnight into the next day while the earlier day keeps its higher count, and two concurrent ingests from one device can race the check. datecolumns are opaqueYYYY-MM-DDstrings (ccusage local-time buckets); never parse them into Date objects for bucketing. Do day arithmetic withshiftDayKey/utcDayKeyfrom@tokenmaxxing/api-contract(API windows live inapps/api/src/date-keys.ts).- Published CLIs bundle a frozen contract.
packages/api-contract/fixtures/(recorded CLI requests + the CLI endpoint OpenAPI slice) is a compatibility contract: review diffs there as breaking-change reviews, and add alegacy/fixture before changing a shape a released CLI sends. Responses go the other way:apps/api/src/http/cli-compat.test.tsdecodes every replayed response and typed CLI error with frozen copies of the released CLI decoders, so fields may be added but never dropped, renamed or retyped, and error_tags never change.fixtures/full-api.openapi.jsonsnapshots the whole API as a review aid; only the CLI slice is frozen. - CLI tokens (
tmx_prefix) never expire; revocation (revokedAt) is the only kill switch. - D1 caps a statement at 100 bound parameters, and the sqlite test harness (
apps/api/src/testing/sqlite-d1.ts) enforces it. Never bind an unbounded list: chunk it, or pass it as one JSON parameter throughjson_each. - Keep
bun run testoutput clean. A test that exercises a logging path captures and asserts the log (makeTestLoggerinapps/api/src/testing/logger.ts;vi.spyOn(console, ...)outside Effect) instead of letting it print.makeTestAppalready captures intoapp.logs. Captured Effect logs are replayed when a test fails.
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.
- 10d ago Changed · +1 lines · +300 tokens per session 7814d3a731e3
- 29d ago Changed · +7 lines · +239 tokens per session e9204b6e922f
- 1mo ago Changed · +1 lines · +102 tokens per session 65a19a618827
- 1mo ago Changed · +3 lines · +314 tokens per session b789bd7622a6
- 1mo ago Changed · -14 lines · -181 tokens per session c9a5139493e7
- 1mo ago First seen · 36 lines · 438 tokens per session scan A 525f14f2ec16
tokenmaxxing AGENTS.md is an instructions file published in the GitHub repository 851-labs/tokenmaxxing (84 stars, last pushed 4d ago), licensed MIT. It adds 1,212 tokens to every session, about $0.0048 per session on Opus 5.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.
Other instructions, from other repositories
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).
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.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
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.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
vscode model-prompts.instructions.md
Model-specific prompt authoring and registry guidelines.