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.
npx skills add strikersam/autonomous-ai-agency --skill tokenizer-diagnosticsgit clone --depth 1 https://github.com/strikersam/autonomous-ai-agencyWrote 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/skills/strikersam/autonomous-ai-agency/tokenizer-diagnostics)<a href="https://agentmods.dev/skills/strikersam/autonomous-ai-agency/tokenizer-diagnostics"><img src="https://agentmods.dev/badge/skills/strikersam/autonomous-ai-agency/tokenizer-diagnostics/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/skills/strikersam/autonomous-ai-agency/tokenizer-diagnostics"><img src="https://agentmods.dev/badge/skills/strikersam/autonomous-ai-agency/tokenizer-diagnostics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00000 | $0.00914 |
| Opus 5 | $0.00000 | $0.00457 |
| Sonnet 5 | $0.00000 | $0.00183 |
| Haiku 4.5 | $0.00000 | $0.00091 |
Grade A, and why
tokenizer-diagnostics 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 11d 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 — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Skill: tokenizer-diagnostics
Purpose
Deep-dive diagnostics for tokenizer behavior in LLM training and inference. Tokenizer bugs are uniquely dangerous because they're silent — the model trains fine, but on subtly wrong data.
Trigger
Use when:
- Switching tokenizers between training phases
- Seeing unexpected token counts for known inputs
- Model performs poorly on specific input types (numbers, code, non-English)
- Vocabulary size was changed and you need to verify embedding alignment
Background
From LLM-from-scratch practitioners:
"We switched from a byte-level BPE to a unigram tokenizer mid-project. The model kept failing on numeric inputs. Turns out the new tokenizer split '2024' into ['20', '24'] while the old one kept it as ['2024']. Three weeks of investigation, one config line to fix."
Key lessons:
- Tokenizer consistency across train/eval/inference is critical — any mismatch is a silent bug
- Number tokenization varies wildly — test your tokenizer on numbers explicitly
- Whitespace handling — leading space matters in many BPE tokenizers (▁hello ≠ hello)
- Unknown token rate — >0.1% unk tokens in training data is a warning sign
- Vocabulary coverage — check domain-specific terms (code keywords, medical terms, etc.)
Checks Performed
1. Round-trip Consistency
# text -> tokens -> text should be lossless
original = "Hello, world! This is a test: 2+2=4"
tokens = tokenizer.encode(original)
decoded = tokenizer.decode(tokens)
assert original == decoded, f"Round-trip failed: {original!r} != {decoded!r}"
2. Numeric Tokenization
Test suite for numbers:
Integer: 42, 1000, 1000000
Float: 3.14, 0.001, 1e-10
Negative: -42, -3.14
Year: 2024, 1999
Phone: 555-1234
Report: tokens per number, consistency, surprising splits
3. Whitespace Handling
Test: "hello" vs " hello" vs "hello " vs " hello"
Report: whether leading/trailing space creates different tokens
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.
- 11d ago First seen · 104 lines · 0 tokens per session scan A 3be667a29c97
tokenizer-diagnostics is a skill published in the GitHub repository strikersam/autonomous-ai-agency (8 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 914 tokens. 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 skills, from other repositories
spark-optimization
Optimize Apache Spark jobs with partitioning, caching, shuffle optimization, and memory tuning. Use when improving Spark performance, debugging slow jobs, or scaling data processing pipelines.
guardrails-ai-setup
Guardrails AI validation framework setup for LLM applications. Implement input/output validation, safety checks, and structured output enforcement.
mem0-integration
Mem0 memory layer integration for AI agents. Implement persistent, semantic memory for long-term context retention and personalization.
langsmith-tracing
LangSmith tracing and debugging setup for LLM applications. Configure observability, capture traces, and enable debugging for LangChain/LangGraph agents.
behavior-contract
Bug condition/postcondition formalization as testable Behavior Contracts. Defines invariants that must be preserved across fixes.
quality-hooks
Language-specific auto-lint/format/typecheck pipeline. Supports Python (ruff+pyright), TypeScript (prettier+eslint+tsc), Go (gofmt+golangci-lint). Auto-fix and convergence loops.