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 skills add persian-tools/persian-tools --skill iranian-validation-expertgit 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/iranian-validation-expert)<a href="https://agentmods.dev/skills/persian-tools/persian-tools/iranian-validation-expert"><img src="https://agentmods.dev/badge/skills/persian-tools/persian-tools/iranian-validation-expert/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/persian-tools/persian-tools/iranian-validation-expert"><img src="https://agentmods.dev/badge/skills/persian-tools/persian-tools/iranian-validation-expert.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.00112 | $0.02491 |
| Opus 5 | $0.00056 | $0.01246 |
| Sonnet 5 | $0.00022 | $0.00498 |
| Haiku 4.5 | $0.00011 | $0.00249 |
Grade A, and why
iranian-validation-expert 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 10d 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 — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Iranian identifier validation — algorithms and rules
Every checksum below is already implemented in this repo. The first job of this skill is to make sure agents reuse the existing function instead of re-implementing it (and re-introducing the bugs we already fixed). The second job is to document the algorithm so changes to the existing code are made with full understanding.
Quick lookup — which function for which identifier?
| Identifier | Verifier | Generator / Parser | Source |
|---|---|---|---|
| National ID (کد ملی, 10 digits) | verifyIranianNationalId |
getPlaceByIranNationalId, plus create-national-id helpers |
src/modules/nationalId/, src/modules/getPlaceByIranNationalId/ |
| Legal ID (شناسه ملی, 11 digits) | verifyIranianLegalId |
— | src/modules/legalId/ |
| Card number (16 digits) | verifyCardNumber |
extractCardNumbers, getBankNameFromCardNumber |
src/modules/verifyCardNumber/, src/modules/extractCardNumbers/, src/modules/getBankNameFromCardNumber/ |
Sheba / IBAN (IR + 24 digits) |
isShebaValid, getShebaInfo |
shebaPattern, shebaPatternCode |
src/modules/sheba/ |
| Bill ID + payment ID | Bill class |
— | src/modules/bill/ |
| Mobile number | phoneNumberValidator and friends |
getPhoneNumberPrefix, getPhoneNumberDetail |
src/modules/phoneNumber/ |
| Plate number | numberPlate |
— | src/modules/numberplate/ |
| Bank-code regex | banksRegex constants |
— | src/modules/banksRegex/ |
1. National ID (کد ملی) — 10 digits
The standard 10-digit code with a check digit. The implementation lives at src/modules/nationalId/index.ts.
Algorithm
- Reject if length ≠ 10 or non-numeric.
- Reject if all digits are identical (e.g.
1111111111) — covered byinvalidNationalIdSequences. - Optionally reject if the 3-digit prefix is not in
validNationalIdPrefixes(a city-code prefix list). This is strict mode; the default inverifyIranianNationalIdexposes an option for it. - Compute the check digit:
sum = Σ digits[i] * (10 - i) for i in 0..8 r = sum mod 11 expected = r < 2 ? r : 11 - r valid = digits[9] === expected
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.
- 10d ago First seen · 146 lines · 112 tokens per session scan A bc897932b246
iranian-validation-expert is a skill published in the GitHub repository persian-tools/persian-tools (1,210 stars, last pushed 1mo ago), licensed MIT. It adds 112 tokens to every session and 2,491 once invoked, about $0.0006 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
audit-support
Support SOX 404 compliance with control testing methodology, sample selection, and documentation standards. Use when generating testing workpapers, selecting audit samples, classifying control deficiencies, or preparing for internal or external audits.
kyc-doc-parse
Parse an investor or client onboarding packet into structured KYC fields — identity, ownership, control, source of funds, and document inventory. Use as the first step of KYC screening; output feeds the rules engine.
fiscaliste
Fiscaliste IA pour la fiscalité personnelle des particuliers français : optimisation et déclaration de l'impôt sur le revenu, IFI, revenus du capital, revenus fonciers, equity salarial, crypto-actifs et PER. Couvre le calcul de l'IR (barème, quotient familial, décote, PAS, CEHR, revenus exceptionnels), la déclaration…
regulatory-analysis
Analyzes documents and processes against FINRA, SEC, Federal Reserve, and CFPB regulatory frameworks. Identifies compliance gaps, classifies findings by severity, and recommends remediation. Use when performing compliance audits, regulatory reviews, gap analyses, or verifying policy adherence to financial regulations.
subcontractor-payment-tracker
Track subcontractor payments, lien waivers, and compliance. Manage payment schedules and documentation.
tax-optimizer
Tax optimization strategies including tax-loss harvesting, wash sale rule navigation, asset location optimization, Roth conversion analysis, and charitable giving strategies.