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 agentmods add agents/nickzaitsev/ru-normalizr/locale-encodinggit clone --depth 1 https://github.com/NickZaitsev/ru-normalizrWrote 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/agents/nickzaitsev/ru-normalizr/locale-encoding)<a href="https://agentmods.dev/agents/nickzaitsev/ru-normalizr/locale-encoding"><img src="https://agentmods.dev/badge/agents/nickzaitsev/ru-normalizr/locale-encoding.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.00390 |
| Opus 5 | $0.00000 | $0.00195 |
| Sonnet 5 | $0.00000 | $0.00078 |
| Haiku 4.5 | $0.00000 | $0.00039 |
Grade A, and why
locale-encoding scanned grade A with 1 finding 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
`write_text()`, and to `subprocess.run()` when capturing text. Never rely on What it actually says
Locale encoding and the Windows CI cell
The windows-latest CI runner is an English Windows image, so
locale.getencoding() there is cp1252, which cannot represent Cyrillic at
all. The primary development machine is a Russian Windows install with
cp1251, which can. Ubuntu cells are UTF-8.
This makes a whole class of bugs invisible locally: anything that falls back to the locale encoding works on cp1251 and on Linux, and fails only on the CI Windows cell. "It passes on my Windows machine" is therefore not evidence.
It has already happened once. The CLI wrote its result with sys.stdout's
locale encoding while --file/--output were pinned to UTF-8, so redirecting
CLI output on cp1252 died with UnicodeEncodeError and every CLI test failed
on windows-latest only.
Rules
- Always pass
encoding="utf-8"explicitly toopen(),read_text(),write_text(), and tosubprocess.run()when capturing text. Never rely ontext=Truealone — it decodes with the locale encoding. __main__.pycalls_use_utf8_stdio()first thing inmain(); keep any new stream it touches UTF-8 too.- To reproduce the CI environment on any platform, force the child's encoding:
subprocess.run(..., env=dict(os.environ, PYTHONIOENCODING="cp1252")). Seetest_cli_emits_utf8_under_a_non_cyrillic_locale_encodingintests/test_api.py. - To find latent cases, run the suite with
PYTHONWARNDEFAULTENCODING=1and look forEncodingWarningoutsidesite-packages.
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.
- 5d ago First seen · 30 lines · 0 tokens per session scan A 5de6a4ce98f2
locale-encoding is an agent published in the GitHub repository NickZaitsev/ru-normalizr (22 stars, last pushed 28d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 390 tokens. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
ai-polish-text-expert
Jestem agentem orkiestrującym zintegrowany system pracy z treściami tekstowymi w języku polskim. Zarządzam trzema wyspecjalizowanymi skills i kieruję każde żądanie do właściwego skill'a — automatycznie lub na podstawie komendy użytkownika.
compliance-checker
Agent ensuring compliance with Polish language standards and legal regulations (RODO/GDPR).
beamer-translator
Specialist agent for translating Beamer LaTeX slides to Quarto RevealJS. Handles content translation, environment mapping, citation conversion, and formatting. Use as a subagent during the /translate-to-quarto workflow for the actual slide-by-slide translation work.
RULES
Agent "RULES" from phel-lang/phel-lang, covering phel rules + cli, rules, new features (v0.30 – main), gotchas and cli.
babel
Localization & i18n - multi-language, RTL, locale-aware UX.
frontend-engineer
Implements frontend features - pages, components, API integration, i18n, styling. Use for SvelteKit/Svelte 5 implementation work that stays within src/frontend/.