Borrowing it
Nothing to install: this file belongs to gglucass/headroom-desktop. 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/gglucass/headroom-desktop/main/CLAUDE.mdgit clone --depth 1 https://github.com/gglucass/headroom-desktopWrote 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/gglucass/headroom-desktop/claude-md)<a href="https://agentmods.dev/instructions/gglucass/headroom-desktop/claude-md"><img src="https://agentmods.dev/badge/instructions/gglucass/headroom-desktop/claude-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/gglucass/headroom-desktop/claude-md"><img src="https://agentmods.dev/badge/instructions/gglucass/headroom-desktop/claude-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.02782 | $0.02782 |
| Opus 5 | $0.01391 | $0.01391 |
| Sonnet 5 | $0.00556 | $0.00556 |
| Haiku 4.5 | $0.00278 | $0.00278 |
Grade A, and why
headroom-desktop 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 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.
How it starts
The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md - headroom-desktop
This file holds only what the model cannot derive: project invariants, environment quirks, and concrete commands. Generic coding-style coaching (write simply, read before editing, state the bug and stop) was removed on 2026-08-03 — modern models do it unprompted and the harness enforces the rest. Do not re-add it.
Testing Rules
- After any code change, run the relevant tests/checks before declaring the task done. Do not ask the user to verify.
- Rust changes:
cargo test --manifest-path src-tauri/Cargo.toml --lib <filter>for the affected module, pluscargo check --manifest-path src-tauri/Cargo.tomlif the change crosses module boundaries. - Frontend changes:
npx tsc --noEmitand any relevant Vitest suite. For visual changes, see Styling Rules. - If a test cannot be run in this environment, say so explicitly rather than skipping silently.
Wheel Bump Rules
- Before changing
HEADROOM_PINNED_VERSION: diff upstreamsavings_tracker.py,prometheus_metrics.py, andserver.pybetween the old and new pins, and check every consumed field againststats_contract_pins_every_consumed_pathin state.rs. Upstream has silently redefined persisted savings fields before (0.36.0 widenedcompression_savings_usd); the savings-rate canary in state.rs is the runtime tripwire, this diff is the compile-time one. - Re-pick every platform's wheel URL/sha256 when bumping (see the pin comment in tool_manager.rs).
- Diff
rollout.py's FEATURES registry between the old and new pins. The app declaresHEADROOM_ROLLOUT_CHANNEL=beta(tool_manager.rs), so any new feature withdefault_enabled_inat or below beta auto-enables for every user on the bump; any feature the app requests whoseavailable_inmoved above beta silently turns off (this is how 0.37.0 disabled the output shaper on stable). - Diff
headroom/transforms/between the pins. This is the compression ENGINE and nothing else in these rules covers it; the 0.35.0 -> 0.37.0 bump changed it by +421 lines and shipped unexamined. Diff it, but do NOT assume a diff means a behaviour change. Bisected 2026-09-02 with a fixed workload replayed on both wheels installed from PyPI (uv venv+uv pip install headroom-ai==<v>, about 3s per version):ContentRouter.compress()AND the fullContentRouter.apply()path returned BYTE-IDENTICAL output on 0.35.0 and 0.37.0 (tok_before 62,384 -> tok_after 57,068, identical transforms list, on both). The engine is EXONERATED. The real production drop (fable-5 500k+: 4.64% / 25,631 tokens per request down to 0.45% / 2,463 at matched model and size) is therefore caused by the INPUT reaching the compressor, not the compressor. Six hypotheses are refuted and must not be restated as fact: the prefix-replay guard (identical on full-replay and floor builds), workload/model mix (matched), the TTL-aware net-cost gate (flag-gated behindHEADROOM_NET_COST_POLICY=1, not set, zeronetcost:skipmarkers across 925 requests), protection rate (0.35 vs 0.32 per request), router acceptance thresholds (min_ratio_*identical), and content granularity (today's messages are BIGGER, 3,053 vs 1,982 tok/msg, which should compress better). What the router logs do show: more messages compressed per request (4.0 -> 5.1) each yielding far less, at an unchanged frozen fraction (86.8% -> 85.2%). Investigate session shape next, not the wheel. - The #3380 prefix-floor vendor is exact-pin gated to wheel
0.37.0. Any bump makes it INERT, silently: replay falls back to the full-replay guard, compression drops by roughly half (measured 13,568 -> 6,831 tokens/request on the 0.9.4->0.9.5 swap), and nothing errors. So on every bump, check whether the new wheel actually carries #3380: if it does, delete the vendor; if it does not, re-pin the vendor to the new version and re-runcargo test --manifest-path src-tauri/Cargo.toml --lib vendored_prefix_flooragainst the installed runtime. That test self-skips when the vendor does not bind, so a green suite is NOT evidence the floor still works after a bump. - Three more 0.37.0-pinned vendors live in the same sitecustomize (upstream PRs #3482 thinking signatures, #3483 fresh cache_control, #3484 Kompress marker gate; kill switches HEADROOM_THINKING_SIG_TOKENS, HEADROOM_FRESH_CC_COMPRESS, HEADROOM_KOMPRESS_MARKER_GATE; probe
scripts/verify-compression-vendors.py, testcompression_vendors_behave_against_the_installed_wheel). On a bump, difftokenizers/base.py(thinking branch), the router's cache_control skip, and the Kompress marker gate against the new wheel: drop each vendor the wheel carries, re-pin the rest. The probe self-skips when a vendor does not bind, so green is not evidence. - When a wheel ships upstream #3460 (conversation
clustersin the output-savings ledger), purge BOTH ledger arms once on that bump: extendledger_bytes_without_control(tool_manager.rs) totreatmentunder a new stamp. Legacy accumulators carry no clusters so they cannot clear the 5-conversation gate, but the moment new records add clusters the whole accumulator, old requests included, re-enters the mean. Treatment has also accrued since 2026-07 while control was purged 2026-08-19, so the arms describe different months until both restart together. Also drop the holdout boost (output_holdout_for) back to a flat 3% only if the fleet's measured coverage says so; it is evidence-gated per machine on purpose.
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.
- today Changed · +2 lines · +326 tokens per session 117da87e9891
- 3d ago Changed · +5 lines · +276 tokens per session 85019c42b1e7
- 5d ago Changed · +11 lines · +1,324 tokens per session 71f833aebcb5
- 9d ago First seen · 35 lines · 856 tokens per session scan A ae00461fcd3d
headroom-desktop CLAUDE.md is an instructions file published in the GitHub repository gglucass/headroom-desktop (541 stars, last pushed today), licensed MIT. It adds 2,782 tokens to every session, about $0.0139 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.
Other instructions, from other repositories
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.
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.
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).
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).
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.
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.