Skip to main content

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. extractCardNumbersverifyCardNumberdigits) 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

While the public skills registry CLI is being finalised, copy the skills/ folder into your project’s .claude/skills/ (or your agent’s equivalent) directly — the on-disk format is final.

What every SKILL.md contains

Each card follows the Claude Code Skills front-matter spec:
The body always includes:
  1. Import signature — exact import { … } from "@persian-tools/persian-tools" plus the CommonJS equivalent.
  2. Public exports — function/class signatures pulled directly from src/modules/<name>/.
  3. Behaviour rules — input shapes, return-type unions, what triggers throws.
  4. Edge cases — empty input, mixed-digit, Arabic-keyboard, ZWNJ-laden inputs.
  5. Common pitfalls — drift between popular community docs and current code; “this function doesn’t exist” warnings.
  6. Composition recipes — typical pipelines combining 2–3 utilities.
  7. 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:
A typical agent retrieval flow:
  1. User says: “validate this card number from a chat message”
  2. Retriever picks: extractCardNumbers (primary) + verifyCardNumber + digits (digit normalization)
  3. 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

  1. Each skill lives in skills/<module-name>/SKILL.md with valid YAML front-matter.
  2. The description field is what the retriever matches on — include literal triggers (function names, Persian terms, common synonyms).
  3. The import signature must match the real src/modules/<name>/ exports. If the source changes, the skill should change with it.
  4. Cross-reference other skills by name (see the X skill) — don’t duplicate their content.
  5. 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 documents

npm package

@persian-tools/persian-tools