Persian Tools is a TypeScript toolkit for processing Persian text and numbers and for validating Iranian identifiers, phone numbers, bank cards, IBANs, and related regional data. It is for applications running in Node.js, Bun, or a browser that need Persian-language and Iranian locale utilities. The catalogue entries expose its utilities as skills and instructions.
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 skills/persian-tools/persian-tools/digitsnpx skills add persian-tools/persian-tools --skill digitsgit clone --depth 1 https://github.com/persian-tools/persian-toolsWrote 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/persian-tools/persian-tools/digits)<a href="https://agentmods.dev/skills/persian-tools/persian-tools/digits"><img src="https://agentmods.dev/badge/skills/persian-tools/persian-tools/digits.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.1 | $0.00108 | $0.01404 |
| Opus 5 | $0.00054 | $0.00702 |
| Sonnet 5 | $0.00022 | $0.00281 |
| Haiku 4.5 | $0.00011 | $0.00140 |
Grade A, and why
digits 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 6d 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 — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
digits — Persian/Arabic/English numeral conversion
import {
digitsEnToFa,
digitsEnToAr,
digitsFaToEn,
digitsFaToAr,
digitsArToEn,
digitsArToFa,
autoConvertDigitsToEN,
} from "@persian-tools/persian-tools";
// CommonJS
const {
digitsEnToFa,
digitsEnToAr,
digitsFaToEn,
digitsFaToAr,
digitsArToEn,
digitsArToFa,
autoConvertDigitsToEN,
} = require("@persian-tools/persian-tools");
What this module exports
// Converters
digitsEnToFa(value: string | number): string
digitsEnToAr(value: string | number): string
digitsFaToEn(value: string): string
digitsFaToAr(value: string): string
digitsArToEn(value: string): string
digitsArToFa(value: string): string
// Auto-converter — accepts mixed Persian + Arabic, normalizes to English
autoConvertDigitsToEN(value: string): string
// Constants
enNums: string[] // ["0".."9"]
faNums: string[] // ["۰".."۹"]
arNums: string[] // ["٠".."٩"]
enDigitsRegex: RegExp // /[0-9]/g
faDigitsRegex: RegExp // /[۰۱۲۳۴۵۶۷۸۹]/g
arDigitsRegex: RegExp // /[٠١٢٣٤٥٦٧٨٩]/g
// Types
type DigitsConverter<I = string, O = string> = (value: I) => O
The three numeral systems
| System | Sample | Unicode range |
|---|---|---|
| English | 0123456789 |
U+0030 – U+0039 |
| Persian (Farsi) | ۰۱۲۳۴۵۶۷۸۹ |
U+06F0 – U+06F9 |
| Arabic-Indic | ٠١٢٣٤٥٦٧٨٩ |
U+0660 – U+0669 |
These are three disjoint code-point ranges. Persian digits ≠ Arabic-Indic digits even though casual users often use the terms interchangeably.
Pick the right function
import { digitsEnToFa, digitsFaToEn, autoConvertDigitsToEN } from "@persian-tools/persian-tools";
digitsEnToFa("Card 1234"); // "Card ۱۲۳۴"
digitsEnToFa(2025); // "۲۰۲۵"
digitsFaToEn("شماره ۰۹۱۲"); // "شماره 0912"
digitsArToFa("٧٨٩"); // "۷۸۹"
// When input may contain BOTH Persian and Arabic digits — most user input
autoConvertDigitsToEN("تماس ۰۹۱۲ یا ٠٩١٣"); // "تماس 0912 یا 0913"
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.
- 6d ago First seen · 124 lines · 108 tokens per session scan A eacdbb94624c
digits is a skill published in the GitHub repository persian-tools/persian-tools (1,210 stars, last pushed 1mo ago), licensed MIT. It adds 108 tokens to every session and 1,404 once invoked, about $0.0005 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.
Other skills, from other repositories
chinese-documentation
中文文档排版参考——中英文空格、全半角标点、术语保留、链接格式、中文文案排版指北约定。仅在用户显式 /chinese-documentation 时调用,不要根据上下文自动触发。.
azure-ai-translation-text-py
Azure AI Text Translation SDK for real-time text translation, transliteration, language detection, and dictionary lookup. Use for translating text content in applications. Triggers: "text translation", "translator", "translate text", "transliterate", "TextTranslationClient".
i18n-localization
Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.
harden
Improve interface resilience through better error handling, i18n support, text overflow handling, and edge case management. Makes interfaces robust and production-ready. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.
seedance-vocab-ja
This skill should be used when the user asks for Japanese Seedance 2.0 prompt wording, Japanese cinematic vocabulary, or translation of camera, lighting, action, VFX, audio, and production terms into Japanese.
i18n-helper
国际化/本地化助手 — 扫描代码中的硬编码文本、生成 i18n 配置、批量翻译.