Borrowing it
Nothing to install: this file belongs to peiris/token-cost. 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/peiris/token-cost/main/CLAUDE.mdgit clone --depth 1 https://github.com/peiris/token-costWrote 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/peiris/token-cost/claude-md)<a href="https://agentmods.dev/instructions/peiris/token-cost/claude-md"><img src="https://agentmods.dev/badge/instructions/peiris/token-cost/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/peiris/token-cost/claude-md"><img src="https://agentmods.dev/badge/instructions/peiris/token-cost/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.00982 | $0.00982 |
| Opus 5.5 | $0.00393 | $0.00393 |
| Sonnet 5.5 | $0.00196 | $0.00196 |
| Haiku 4.5 | $0.00098 | $0.00098 |
Grade A, and why
token-cost 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 1mo 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 — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.
token-cost — project rules
No legacy support, at all
This plugin is a work in progress with a single user (the author, for testing). The current ledger format is the only format.
- Never write code that reads, repairs, migrates, or improves rows written by older plugin versions — no version-aware branches, no post-hoc fix-up passes, no "this field may be missing on old rows" fallbacks, no display states that mean "recorded before we tracked this".
- When the ledger format changes: bump
ledger.FORMATand the plugin version. A project whose format stamp disagrees is rebuilt from its own transcripts by that project's nextsync()— SessionStart there,/token-cost, the UI, or--backfill. Rebuilds are staged (scratch file, one rename, stamp written last,.bakleft beside) so a killed hook leaves either the old world or a finished rebuild. Lossless only while Claude Code still keeps the transcripts (~30 days), so a format bump wants releasing promptly. - The plugin acts on the current project only. Nothing — code or agent — may enumerate, rebuild, or write other projects' ledgers. Healing happens where the user actually runs token-cost, never machine-wide.
- Version numbers are burned: never reuse or roll back one — the plugin cache is keyed by the version string.
The one distinction that is NOT legacy support: robustness toward Claude
Code's own transcript format (e.g. is_human_prompt()'s field fallbacks).
Those files are input we read but don't control, and old ones legitimately
sit on disk.
Publishing ends at the local install, not at the push
The author's own Claude Code runs the installed plugin, not this checkout, so a release the local install never received changed nothing.
- Publish without being asked. Finishing a change means releasing it: once the work is done and verified, run the full publish sequence below as part of the same task — don't stop at the working tree and offer to release.
- Publish = bump the plugin version, commit, push, then both
installs:
claude plugin update token-cost@token-costfor the CLI — the bare name doesn't resolve; the@token-costmarketplace suffix is required — andpython3 dev/resync_claudeai.pyfor Claude Desktop. Each needs its own restart to apply. - Push before updating: the marketplace pulls from GitHub, not from this directory. And without a version bump there is nothing for it to pull — the cache is keyed by the version string.
- Claude Desktop is a second install, and it wins. Where a plugin
exists both locally and on claude.ai, the desktop runs the claude.ai
copy and ignores the one the CLI installed. claude.ai only re-clones
the repo when asked — the marketplace says
auto_sync_on_pushbut has no webhook behind it — soclaude plugin updatealone leaves the desktop on whatever commit claude.ai last saw, with its Update button reading "On latest version".dev/resync_claudeai.pyis the ask; it exits non-zero unless claude.ai lands on HEAD. - A re-sync that changes hooks or executables comes back flagged
exec_surface_changed. That is claude.ai noting the plugin's exec surface moved, not a failed sync — the new version is stored.
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.
- 1mo ago First seen · 79 lines · 982 tokens per session scan A 14e7bdbc5d73
token-cost CLAUDE.md is an instructions file published in the GitHub repository peiris/token-cost (2 stars, last pushed 2mo ago), licensed MIT. It adds 982 tokens to every session, about $0.0039 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-31.
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.