Skip to content

About

An agent skill that helps AI assistants write Persian (Farsi) that reads as Persian, not as English rendered word for word.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

persian-writing

An agent skill that helps AI assistants write Persian (Farsi) that reads as Persian, not as English rendered word for word.

It is a standard SKILL.md skill, built and tested in Claude Code. Codex and other agents that read the same folder format can load it too.

فارسی

دستیارهای هوش مصنوعی معمولاً فارسی را از روی انگلیسی می‌نویسند. جمله‌ها از نظر دستوری درست‌اند، ولی بوی ترجمه می‌دهند: ترتیب کلمه‌ها انگلیسی است، برای هر کلمه اولین معادل فرهنگ لغت آمده و گاهی کلمه‌ای ادبی یا من‌درآوردی جای کلمه روزمره را گرفته است.

این مهارت (Skill) روش کار دستیار را عوض می‌کند. دستیار اول متن انگلیسی را کامل می‌خواند و از مطلبش یادداشت برمی‌دارد. بعد متن انگلیسی را کنار می‌گذارد و متن فارسی را از روی یادداشت‌ها می‌نویسد. در پایان عددها و اسم‌ها را با متن اصلی مقایسه می‌کند و متن فارسی را به خواننده‌ای می‌دهد که متن انگلیسی را ندیده است تا ایرادهایش را بگوید.

این مهارت این‌ها را هم دارد: فهرست الگوهای ترجمه‌زدگی و شکل درست هر کدام، کلمه‌هایی که نویسنده‌های ایرانی خودشان به کار می‌برند، راهنمای متن‌های رابط کاربری و اسکریپتی که غلط‌های املایی و نیم‌فاصله‌ای را پیدا می‌کند.

The problem

Persian written from an English source usually comes out grammatical and wrong at the same time. Take this English:

The company says the new model allows developers to build agents that can work for hours without supervision. However, independent testers found that it still suffers from hallucinations on long tasks.

Sentence by sentence, an assistant writes:

شرکت می‌گوید مدل جدید به توسعه‌دهندگان اجازه می‌دهد عامل‌هایی بسازند که می‌توانند برای ساعت‌ها بدون نظارت کار کنند. با این حال، آزمایش‌کنندگان مستقل دریافتند که این مدل همچنان در وظایف طولانی از توهم رنج می‌برد.

Every word is defensible and the whole is English. A Persian writer says:

به گفته شرکت، توسعه‌دهندگان با مدل جدید می‌توانند عامل‌هایی بسازند که ساعت‌ها بدون نظارت کار کنند. ولی آزمایش‌های مستقل نشان می‌دهد مدل در کارهای طولانی هنوز دچار توهم می‌شود.

A terminology review does not catch the first version, because the terms are accurate. The skill addresses it by changing how the Persian is written and how it is checked.

What the assistant does with this skill

  1. Decides who reads the text and where, which sets the register.
  2. Takes notes of the content: facts, numbers, who said what, how sure they were.
  3. Closes the English and writes the Persian from the notes.
  4. Names things the way Iranians in that field name them, and searches for usage when unsure instead of inventing a word.
  5. Checks every number, name, negation and hedge against the source.
  6. Rereads the Persian alone with three tests: would I say this to a colleague, can I rebuild the English from it, did I read anything twice.
  7. Hands the Persian, and only the Persian, to a fresh reader, fixes what it finds, and repeats with a new reader.
  8. Runs the spelling check.

It guards against three faults equally: English sentence shapes in Persian words, bookish or invented words chosen to avoid a common one, and stiff office Persian («می‌باشد»، «نمایید»، «جهتِ»).

What is inside

Everything is under skills/persian-writing/.

File What it holds
SKILL.md The method, the three faults, how to choose a word, register by surface
references/translationese.md The shapes of translated Persian with repairs, and a list of things not to "fix"
references/word-choice.md Everyday words against bookish ones; AI, software and business terms as Iranian writers use them
references/articles.md Attribution, numbers, hedges, headings, charts and marketing pages
references/interface-text.md Labels, messages, errors, help text, assistant replies and accounting words
references/spelling.md Half-space, letters, digits, numbers, dates, punctuation
references/sources.md Where the guidance comes from, how it was tested, what is unconfirmed
scripts/fa_check.py Mechanical spelling checks, plus a list of phrases worth a second look
evals/ Four test tasks

Install

With the skills CLI:

npx skills add ZharfAI/persian-writing

As a Claude Code plugin:

claude plugin marketplace add ZharfAI/persian-writing
claude plugin install persian-writing@zharfai

By hand: copy the skills/persian-writing folder into ~/.claude/skills/ (Claude Code), ~/.codex/skills/ (Codex), or your project's .claude/skills/.

Use

Ask for Persian as you normally would. The skill loads when the task involves Persian text:

  • "Write the Persian version of this article."
  • "Add Persian strings for the new settings screen."
  • "This Persian paragraph sounds translated. Fix it."

The checker also runs on its own:

python3 skills/persian-writing/scripts/fa_check.py article.fa.md Component.tsx

It reports two kinds of finding. Spelling faults a script can decide (an Arabic yeh or kaf, a missing half-space in «می‌رود», Latin digits or commas in a Persian sentence) should be fixed, unless the text is quoting a fault on purpose. Version numbers, codes and identifiers in Latin digits are left alone. Phrases that often mark translated, bookish or office-form Persian are candidates to reread in their sentence, not verdicts. A clean run means those mechanical checks passed; it does not prove the spelling, and it says nothing about the prose.

Your project's own rules

Brand spellings, product vocabulary, units and status labels differ between products. Put yours in the project's instructions (CLAUDE.md, AGENTS.md). The skill tells the assistant that the project's rules and the product's existing wording come first.

How it was tested, and its limits

  • Readers were AI models. Every reader in the tests saw only the Persian, and every one was an AI model. No professional Persian editor has reviewed the skill line by line.
  • One long article. A 4,000-word article went through three rounds of fresh readers. The first reader called the first rewrite a careful retelling of an English text. After fixes, the second judged about 60 percent of the paragraphs to be native Persian, and the third 75 to 80 percent.
  • Four short tasks, compared blind. A reader who did not know which version was which preferred the one written with the skill in three tasks and the one without it in the fourth. This is a small test with one reader, and the skill's reference pages contain examples from the same scenarios, so it overstates what the skill does on unseen tasks.
  • It costs time. Tasks took two to four times as long with the skill, almost all of it in the reader rounds.
  • The word lists are narrow. They lean toward AI, software and business writing. Other fields need their own terms.

Details are in skills/persian-writing/references/sources.md.

Corrections welcome

If you edit Persian for a living and something here is wrong or too strict, please open an issue with the sentence, your wording, and why. Real before-and-after pairs are the most useful contribution.

Licence and sources

The skill's own text and code are under the MIT licence. Short example sentences and quotations from Persian editors, style guides, publications and products are used for commentary and are not covered by it; see NOTICE.md.

Made by ZharfAI (ژرف).

About

An agent skill that helps AI assistants write Persian (Farsi) that reads as Persian, not as English rendered word for word.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages