case-sensitive-units

case-sensitive-units is an agent for coding agents from NickZaitsev/ru-normalizr. It costs 0 tokens per session (539 once invoked), scanned A, original, MIT.

A unit parser that uses one shared registry to recognize measurement units and their accepted spellings, including some safe case corrections.

In plain words
What is it for?
It helps software read measurements such as 5 м, КГ, °C, Mb, and MB consistently, including selected metric prefixes in Latin and Cyrillic.
Why use it?
It prevents capitalization mistakes from changing the meaning of units, while preserving exact spelling when capitalization distinguishes bits from bytes or other meanings.

Agent

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 agents/nickzaitsev/ru-normalizr/case-sensitive-units
Clone the repo
git clone --depth 1 https://github.com/NickZaitsev/ru-normalizr

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 case-sensitive-units

README.md
[![agentmods](https://agentmods.dev/badge/agents/nickzaitsev/ru-normalizr/case-sensitive-units.svg)](https://agentmods.dev/agents/nickzaitsev/ru-normalizr/case-sensitive-units)
Your own site
<a href="https://agentmods.dev/agents/nickzaitsev/ru-normalizr/case-sensitive-units"><img src="https://agentmods.dev/badge/agents/nickzaitsev/ru-normalizr/case-sensitive-units.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 539 The whole file, excluding the scripts and references it only reads on demand.
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.1 $0.00000 $0.00539
Opus 5 $0.00000 $0.00269
Sonnet 5 $0.00000 $0.00108
Haiku 4.5 $0.00000 $0.00054

Measured 5d ago against content hash c9345d09fefa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

case-sensitive-units 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 5d 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.

docs/agents/case-sensitive-units.md · 37 lines

What it actually says

Регистрозависимые единицы

Единицы разрешает единый UnitRegistry. Порядок проверки фиксирован:

  1. точное написание;
  2. объявленное каноническое написание из совместимой таблицы;
  3. исправление регистра, только если вся casefold-группа обозначает одну и ту же единицу;
  4. иначе обозначение остаётся без раскрытия.

Для одиночных букв исправление регистра запрещено. Поэтому 5 м — пять метров, но повреждённое 5 М остаётся «пять М». Канонические заглавные символы (А, В, Н, Ф, а также A, V, N, F и другие) перечислены явно и не зависят от этой эвристики. Составные обозначения вроде °C одиночными буквами не считаются.

Неверный регистр многобуквенного обозначения можно исправить, если смысл однозначен: КГ читается как килограмм, а мМ и ММ — как миллиметр. Если регистр различает смыслы, принимаются только точные варианты: Mb/MB, Mbps/MBps, Mb/s/MB/s обозначают соответственно биты и байты.

Генерация приставок

Приставочные формы создаются из типизированного списка разрешённых семейств в unit_data.py. Это ограниченная генерация: у каждой базовой единицы собственный список приставок и явно заданные латинский и кириллический символы. Автоматической транслитерации и полного декартова произведения нет. Приставки массы присоединяются к грамму; «килокилограмм» не создаётся.

Молярность

Нельзя просто добавить мкм = микрометр в регистронезависимую таблицу: тогда мкМ можно ошибочно принять за ту же единицу. Сокращённые обозначения молярности М, мМ, мкМ и нМ намеренно не поддерживаются. Концентрация раскрывается только при полностью записанной единице: моль/л, ммоль/л, мкмоль/л или нмоль/л. Точное мкм при этом обозначает микрометр.

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. 5d ago First seen · 37 lines · 0 tokens per session scan A c9345d09fefa

Subscribe to this mod's changes

case-sensitive-units is an agent published in the GitHub repository NickZaitsev/ru-normalizr (22 stars, last pushed 29d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 539 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-30.