tokf CLAUDE.md

tokf CLAUDE.md is an instructions file for coding agents from mpecan/tokf. It costs 2,341 tokens per session, scanned A, original, MIT.

Development instructions for tokf, including its open-source principles, commit format, transparency rules, and testing expectations.

In plain words
What is it for?
Use them when committing code, changing filters or command-line behavior, adding tests, or updating continuous-integration checks.
Why use it?
They help changes match the project's contribution rules and keep its command-line behavior clear to users.

Instructions file

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/mpecan/tokf/claude-md
Clone the repo
git clone --depth 1 https://github.com/mpecan/tokf

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mpecan/tokf/claude-md.svg)](https://agentmods.dev/instructions/mpecan/tokf/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/mpecan/tokf/claude-md"><img src="https://agentmods.dev/badge/instructions/mpecan/tokf/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,341 This file is loaded in full into every session.
When invoked 2,341 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 $0.02341 $0.02341
Opus 5 $0.01171 $0.01171
Sonnet 5 $0.00468 $0.00468
Haiku 4.5 $0.00234 $0.00234

Measured 4d ago against content hash 015df1a4f3e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tokf 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 4d 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 · 205 lines

How it starts

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

tokf — Development Guidelines

Project Philosophy

tokf is an open source project built for the community. We are not looking for profits — this exists for open source sake. Every decision should prioritize:

  • End-user experience — whether the user is a human or an LLM, the tool should be intuitive, fast, and transparent about what it's doing.
  • Visibility — users should always understand what tokf is doing. Stderr notes, --timing, --verbose flags. Never hide behavior.
  • Transparency — clear error messages, honest documentation, no dark patterns.

Commits

Use Conventional Commits strictly:

<type>(<scope>): <description>

[optional body]

[optional footer]

Types: feat, fix, refactor, test, docs, chore, ci, perf, build

Scopes: config, filter, runner, output, cli, hook, tracking, history

Examples:

  • feat(filter): implement skip/keep line filtering
  • fix(config): handle missing optional fields in git-status.toml
  • test(filter): add fixtures for cargo-test failure case
  • ci: add clippy and fmt checks to GitHub Actions

Keep commits atomic — one logical change per commit. Don't bundle unrelated changes.

Code Quality

Testing

  • Minimum 80% coverage, target 90%.
  • Every module gets unit tests. Every filter gets integration tests with fixture data.
  • Fixture-driven: save real command outputs as .txt files in tests/fixtures/. Tests load fixtures, apply filters, assert on output. No dependency on external tools in tests.
  • Declarative filter tests: place test cases in a <stem>_test/ directory adjacent to the filter TOML (e.g. filters/git/push_test/ next to filters/git/push.toml). Each case is a TOML file with name, inline or fixture, exit_code, and [[expect]] blocks. Run with tokf verify. Every filter in the stdlib must have a _test/ suite — CI enforces this with tokf verify --require-all.
  • Run cargo test after every meaningful change. Tests must pass before committing.

Read the full file on GitHub · 205 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. 4d ago First seen · 205 lines · 2,341 tokens per session scan A 015df1a4f3e2

Subscribe to this mod's changes

tokf CLAUDE.md is an instructions file published in the GitHub repository mpecan/tokf (196 stars, last pushed yesterday), licensed MIT. It adds 2,341 tokens to every session, about $0.0117 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.