Add pluggable language packs, starting with Arabic (v2.10.0) - #205
Open
AHMED-HOMISHAN wants to merge 1 commit into
Open
Add pluggable language packs, starting with Arabic (v2.10.0)#205AHMED-HOMISHAN wants to merge 1 commit into
AHMED-HOMISHAN wants to merge 1 commit into
Conversation
The 33 patterns are documented with English examples, so non-English text was only ever handled by analogy. This adds language behavior to the core skill and moves language-specific tells into loadable packs. SKILL.md gains a small LANGUAGE PACKS section: edit in the source language rather than round-tripping through English, match the source register and variety instead of normalizing dialects to the standard form, use the language's own punctuation and numerals, and load languages/<code>.md when one exists. Behavior degrades to those neutral rules when no pack is available, and the skill says so rather than claiming full coverage. First pack: languages/ar.md, patterns AR1-AR14. It covers the tells that patterns 1-33 do not describe in Arabic, including "mimma yaakis" analysis tails, "tamma"/"qama bi" bloat, "haythu" as universal glue, doubled synonyms, sermon-like endings, calqued idiom, noun-chain constructs, Arabic punctuation and stray tashkeel, and uniform "inna"-led rhythm. It also lists Arabic false positives so quoted scripture, poetry, proverbs, religious formulas, and deliberate rhymed prose are never rewritten. Adding a language is now a drop-in: copy languages/TEMPLATE.md, add one registry row to SKILL.md and one table to README.md. validate-package.py discovers packs by glob and checks each pack's frontmatter range against its headings, its registry row, and its README table, so new languages need no validator change. SKILL.md is back under the 500-line budget with packs capped at 250 lines each. Verified: the skills CLI ships languages/ alongside SKILL.md on install, and a separate Claude Code session loaded languages/ar.md, cited the AR pattern numbers it applied, preserved Gulf and Egyptian dialect, and left an untouched human paragraph byte-identical. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What This Adds
The 33 core patterns documented in this project currently use English examples. As a result, non-English users often have to translate text into English before applying the patterns, then translate it back—introducing the very translation artifacts the skill is designed to eliminate.
This update introduces language packs, allowing language-specific patterns to live alongside the core skill without expanding the main prompt.
SKILL.mdA new Language Packs section (approximately 20 lines) explains how language-specific support works:
languages/<code>.mdwhen it exists. If no pack is available, explicitly say so rather than claiming unsupported coverage.languages/ar.mdThe first language pack implements AR1–AR14, covering Arabic-specific writing patterns that are outside the scope of the core 33 patterns. Examples include:
The pack also documents common false positives that should not be rewritten, including quoted Qur'anic verses, hadith, poetry, proverbs, religious formulas, and deliberate سجع, as well as characteristics of naturally written Arabic that should be preserved.
Why Separate Language Files?
Embedding every language in
SKILL.mdwould eventually make the file too large to remain practical. Language packs keep the runtime prompt compact:SKILL.mdremains under 500 lines.Adding a new language requires only three steps:
languages/TEMPLATE.mdtolanguages/<code>.md.SKILL.md.README.md.The validator (
scripts/validate-package.py) discovers language packs via glob patterns and verifies numbering automatically, so it does not need to be modified.Core pattern numbering remains 1–33. Language-specific patterns use prefixed identifiers (for example,
AR1), so the core numbering never changes.Verification
The following checks all pass:
python3 scripts/validate-package.pynpx skills add . --listclaude plugin validate .Additional verification included:
languages/es.mdto confirm the validator detects both numbering mismatches and missing registry entries.npx skills addin a fresh project to verify that thelanguages/directory is packaged alongsideSKILL.md.languages/ar.md, identified the appliedARpatterns, removed Arabic-specific AI tells while preserving every numeric value, retained Gulf and Egyptian dialects instead of normalizing them to Modern Standard Arabic, and produced a byte-for-byte identical result when no changes were necessary.Documentation
README.mdnow includes:AR1–AR14pattern set.The version number has been updated to 2.10.0 in:
SKILL.mdREADME.mdplugin.json