Dualkit
/plugin install dualkit@dualkit
npm i @dualkit/format
npm i @dualkit/starter
npx dualkit check https://your-site.com/ar
npx dualkit@beta convert --mode bilingual
claude mcp add dualkit -- npx -y @dualkit/mcp
Install the skills
/plugin install dualkit@dualkit

Docs

The skills teach your agent, the library does the formatting, and the components are yours to change.

Skills

The skills are listed in the Claude plugin directory, so you can install them from there in Claude Code, Cowork and the Claude apps. Or, in Claude Code, add the marketplace and install the plugin. In Cursor, copy cursor/rules into your project’s .cursor/rules.

Any other agent that reads skills, such as Codex or Cursor:

Four skills load on their own when the task calls for them: RTL layout, type pairing, Gulf formats and bilingual copy. A fifth, dualkit-convert, walks your agent through converting an English app.

@dualkit/format

formatMoney(1234.5, { currency: "AED" })AED 1,234.50AED, SAR, QAR, KWD, BHD or OMR. Dinars and rials get three decimals. Add locale: "ar" and numerals: "arab" for Arabic.
formatHijri(date, { timeZone: "Asia/Riyadh" })1 Ramadan 1447 AHUmm al-Qura dates. The time zone is required.
toWesternDigits("٠٥٠١٢٣٤٥٦٧")0501234567Normalise typed digits before you validate or store them.
parseUaePhone("+971 50 123 4567"){ ok: true, value: { e164, type } }Every common way of writing a UAE mobile or landline.
parseSaudiPhone("+966 55 123 4567"){ ok: true, value: { e164, type } }The same for Saudi mobiles and landlines.
parseGulfPhone("+974 3312 3456"){ ok: true, value: { country, e164, type } }A number from any of the six GCC countries. It needs a + or 00 and the country code.
parseQatarPhone("3312 3456"){ ok: true, value: { e164, type } }Also parseKuwaitPhone, parseBahrainPhone and parseOmanPhone, each with format and isValid.
parseEmiratesId("784-1990-1234567-6"){ ok: true, value: { formatted, year } }Checks the 784 prefix and the Luhn check digit.
parseNationalId("1012345672", "SA"){ ok: true, value: { country, strength, holder } }Reads national IDs for the UAE, Saudi Arabia, Kuwait, Qatar and Bahrain. strength says whether a check digit matched or only the shape was checked.
parseIban(value, { country: "AE" }){ ok: true, value: { formatted, bankCode } }All six countries. Length per country and mod 97.
parseSaudiVatNumber("310 1223 9350 0003"){ ok: true, value: "310122393500003" }15 digits that start and end with 3. Also formatSaudiVatNumber and isValidSaudiVatNumber.
gulfWeek("AE"){ weekend: [6, 7], firstWorkday: 1 }Weekend days as ISO weekdays for AE, AE-SH, SA, QA, KW, BH and OM. isGulfWeekend(date, region, { timeZone }) checks one date.
currencySign("SAR")the U+20C1 signA sign for SAR, AED and OMR, and null for the rest. Most fonts do not draw it yet.

The parse functions never throw. They return { ok: false, error: { code, message } }, and the code is stable, so you can map it to your own Arabic and English copy.

Starter components

Each of the eight installs with the shadcn CLI as source you own, along with the shared tokens and styles.

Swap amount for button, date-display, digit-input, field, sheet, tabs or toast. Then import components/dualkit/tokens.css and styles.css once.

Gulf components

Five inputs for a shadcn project: phone, IBAN, national ID, amount and Hijri date. They use your own shadcn theme instead of the Starter tokens, work with and without shadcn init --rtl, and every check comes from @dualkit/format.

Swap gulf-phone-input for gulf-iban-input, gulf-national-id-input, gulf-amount or gulf-hijri-date. Each brings the shared gulf-field file with it. All labels, help text and error messages come in as props. The ID input takes a country: the UAE, Saudi Arabia (ID or Iqama), Kuwait, Qatar or Bahrain. Try each one in English and Arabic on the Gulf components page.

Check a screen

Point it at any page, local or live. It runs 34 Arabic and right-to-left rules and writes a report you can share.

Install the browser once:

Then check a page:

In CI, add uses: dualkit/dualkit/action@main to a workflow. It scores every pull request and uploads the report; the inputs are in the Action README. Every rule is in RULES.md.

Experimental: add --review and a vision model reads a screenshot for problems the rules cannot measure. It uses GEMINI_API_KEY (the default model, gemini-flash-lite-latest, has a free tier) or OPENROUTER_API_KEY with --review-model provider:model, so any cost is on your own key. Not yet measured against hand labels, so treat its findings as suggestions. They are marked review, carry a confidence, and never change the score or the exit code.

Lint your source

Run it in your project folder. It reads your CSS, HTML, Vue, Svelte, JavaScript and TypeScript, and CSS inside styled and css templates, against 8 source rules by default, needs no browser, and skips what your .gitignore skips.

Add --json for the findings as JSON, --fail-on warning or --fail-on note to fail on more than errors (warnings and notes are listed but do not fail the run by default), and --config to point at a dualkit.config.json. To turn a rule off for one line, put dualkit-disable-next-line source/physical-css -- reason in a comment above it.

In CI, use the same Action with mode: lint under with:. It needs no browser, fails the job on errors, and comments the findings on the pull request; paths and fail-on are in the Action README. Every rule and its known limits are in LINT.md.

Convert an English app

Run it in a React or Next.js app with a clean git tree. It makes a new branch, rewrites the layout to logical properties, moves every English string into a translation file and lists each one for you or your agent to put into Arabic. It makes no model calls.

Use --mode bilingual for English and Arabic with a language switch, or --mode arabic for an Arabic-only app. Fill the Arabic in dualkit-strings.json, then run npx dualkit@beta convert --finish. It checks that every English page still looks the same, runs the 34 check rules on each Arabic page, runs your tests and writes dualkit-convert.md. Add --start and --port so it can open the app. Details are in the convert README. See a real app before and after on the convert page.

MCP server

@dualkit/mcp gives any MCP client the Gulf formats, the validators and the rules. It runs on your machine over stdio, needs no browser and makes no network calls. In Claude Code:

It has four tools. format formats money, Hijri dates, numerals and phones. validate checks an IBAN, national ID, Saudi VAT number or GCC phone and returns format’s result unchanged. rules lists the 34 check rules or returns one with its fix. check_html runs the rules on an HTML string in jsdom: 16 of them can run there, and the other 18 are listed as needing a browser, so use npx dualkit check for those. Input is capped at 512 KB and each check stops after 10 seconds. The lines for Cursor and Codex are in the MCP README.

Figma plugin

Coming to Figma Community. It has two commands. Check frame runs 16 of the 34 rules on the text layers of the selected frame and lists the other 18 as not checked in Figma, each with a reason. Fill Gulf samples replaces the selected text with phones, IBANs and national IDs that pass format, amounts, and Gregorian and Hijri dates.

It is not on Figma Community yet, and we have not tried it in Figma on a real Arabic frame. The code is in apps/figma.

Source

Everything is MIT licensed and lives at github.com/dualkit/dualkit. Open an issue if any Arabic reads wrong.