digits

digits is a skill for Claude Code, Codex from persian-tools/persian-tools. It costs 108 tokens per session (1,404 once invoked), scanned A, original, MIT.

Numeral conversion between Persian digits such as ۱۲۳, Arabic-Indic digits such as ١٢٣, and English digits such as 123.

In plain words
What is it for?
Use it to normalize user input, convert numbers for Persian or Arabic interfaces, and process text containing different digit styles.
Why use it?
It prevents mixed numeral systems from breaking searches, validation, pattern matching, or display formatting.

Skill for Claude CodeCodex

About the project

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.

persian-tools/persian-tools · 1,210 stars · on GitHub · persian-tools.usestrict.dev

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 skills/persian-tools/persian-tools/digits
Any agent
npx skills add persian-tools/persian-tools --skill digits
Clone the repo
git clone --depth 1 https://github.com/persian-tools/persian-tools

Made for: Claude Code, Codex.

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 digits

README.md
[![agentmods](https://agentmods.dev/badge/skills/persian-tools/persian-tools/digits.svg)](https://agentmods.dev/skills/persian-tools/persian-tools/digits)
Your own site
<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>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,404 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.00108 $0.01404
Opus 5 $0.00054 $0.00702
Sonnet 5 $0.00022 $0.00281
Haiku 4.5 $0.00011 $0.00140

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

Security

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.

skills/digits/SKILL.md · 124 lines

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"

Read the full file on GitHub · 124 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. 6d ago First seen · 124 lines · 108 tokens per session scan A eacdbb94624c

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories

chinese-documentation

中文文档排版参考——中英文空格、全半角标点、术语保留、链接格式、中文文案排版指北约定。仅在用户显式 /chinese-documentation 时调用,不要根据上下文自动触发。.

jnMetaCode/superpowers-zh · 62 tokens

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".

microsoft/skills · 60 tokens

i18n-localization

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

vudovn/ag-kit · 27 tokens

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.

fengshao1227/ccg-workflow · 62 tokens

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.

Emily2040/seedance-2.0 · 50 tokens

i18n-helper

国际化/本地化助手 — 扫描代码中的硬编码文本、生成 i18n 配置、批量翻译.

laolaoshiren/claude-code-skills-zh · 33 tokens