rule-string-transform

Installation
SKILL.md

When to use

For rule-based string transforms (pig latin, atbash, rot, etc.).

Rules

  • Encode the rules as an ordered list of (predicate, transform) pairs
  • For each word, walk the list; apply the FIRST matching rule and stop
  • Order matters — specific rules MUST come before general ones
  • ALWAYS test each rule in isolation before combining
  • NEVER apply multiple rules to the same word

Pig latin specifics

  1. "qu" or consonant-cluster-ending-in-qu counts as a unit — "quick" → "ickquay", "square" → "aresquay"
  2. "y" acts as a consonant at the start but a vowel in the middle — "yellow" → "ellowyay", "rhythm" → "ythmrhay"
  3. Rule order: starts-with-vowel-or-xr-or-yt → append "ay"; starts-with-consonant(s)-then-"qu" → move cluster+qu, append "ay"; starts-with-consonants-up-to-first-"y"-or-vowel → move the consonants, append "ay"; fallback → append "ay"

Example

Installs
3
Repository
knoopx/pi
GitHub Stars
59
First Seen
May 24, 2026
rule-string-transform — knoopx/pi