AI Agent Skills
Persian Tools ships a set of 28 Agent Skill cards — one per public utility — under/skills in the repository. When you load them into an AI coding assistant (Claude Code, Cursor, Copilot, etc.), the retriever pulls the relevant SKILL.md on demand so the agent answers with the real function names, types, edge cases, and pitfalls — not invented APIs.
If you’ve ever asked an AI agent for
extractCardNumbers(...) and gotten back a confidently wrong signature for a
function that’s actually named extractCardNumber (singular), this is the fix.Why Skills?
Real signatures
Each SKILL.md is generated from the actual
src/modules/<name>/ exports. No hallucinated parameters or
non-existent helpers.Edge cases documented
Empty input, mixed Persian/Arabic digits, ZWNJ handling, return-type unions — captured per skill so the agent
doesn’t have to guess.
Composition recipes
Cross-references between skills (e.g.
extractCardNumbers → verifyCardNumber → digits) so the agent
assembles working pipelines.Tree-shake friendly
Each skill names its single import (
import { Bill } from "@persian-tools/persian-tools") so the agent
produces tree-shakable code by default.Install into your agent
What every SKILL.md contains
Each card follows the Claude Code Skills front-matter spec:- Import signature — exact
import { … } from "@persian-tools/persian-tools"plus the CommonJS equivalent. - Public exports — function/class signatures pulled directly from
src/modules/<name>/. - Behaviour rules — input shapes, return-type unions, what triggers throws.
- Edge cases — empty input, mixed-digit, Arabic-keyboard, ZWNJ-laden inputs.
- Common pitfalls — drift between popular community docs and current code; “this function doesn’t exist” warnings.
- Composition recipes — typical pipelines combining 2–3 utilities.
- References — tests and related skills.
The 28 skills, grouped by domain
🔢 Numbers & digits
📝 Text processing
🏛️ Iranian identifier validation
💳 Banking
🌍 Geography & vehicles
⏱️ Time
How retrieval composes
The skills are intentionally narrow — one per utility — and cross-reference each other rather than duplicate domain knowledge:- User says: “validate this card number from a chat message”
- Retriever picks:
extractCardNumbers(primary) +verifyCardNumber+digits(digit normalization) - Agent reads the three SKILL.md files and produces a correct pipeline — for example:
Maintainer-side skills
The 28 skills above are user-facing — one per public utility. For contributor-facing skills that guide adding new modules, writing tests, keeping the bundle small, or cutting a release, see the.agents/ directory:
Adding or editing a skill
- Each skill lives in
skills/<module-name>/SKILL.mdwith valid YAML front-matter. - The
descriptionfield is what the retriever matches on — include literal triggers (function names, Persian terms, common synonyms). - The import signature must match the real
src/modules/<name>/exports. If the source changes, the skill should change with it. - Cross-reference other skills by name (
see the X skill) — don’t duplicate their content. - Update the skills README table.
External references
Claude Code Skills spec
The official front-matter format and retrieval semantics
skills/ on GitHub
Browse all 28 SKILL.md files
Source code
The
src/modules/ directory each skill documentsnpm package
@persian-tools/persian-tools