Rime Schema
How To Use This Skill
Use this skill when the user is building or changing a Rime input method. Keep SKILL.md as the schema planning checklist; load full-reference only when exact YAML examples or option details are needed.
| Schema Type |
Main Translator |
Dictionary Code Shape |
| Pinyin, Jyutping, Bopomofo, other syllabic schemes |
script_translator |
syllables separated by spaces, such as zhong wen |
| Cangjie, Wubi, stroke, other table schemes |
table_translator |
code treated as one unit, usually no spaces |
| Minimal smoke test or echo scheme |
echo_translator |
no dictionary required |
Required Files
Place schema files in the Rime user data directory:
| File |
Purpose |
<schema_id>.schema.yaml |
schema definition, engine, speller, translators, filters |
<dict_name>.dict.yaml |
dictionary used by translator/dictionary |
Naming invariants:
schema/schema_id must match <schema_id>.schema.yaml.
translator/dictionary must match the name in <dict_name>.dict.yaml.
- Add the schema to
default.yaml under schema_list.
- Redeploy after changes.
Schema Build Order
- Choose
schema_id, display name, version, and dependencies.
- Choose switches such as
ascii_mode, full_shape, simplification, and ascii_punct.
- Choose an engine template:
- syllabic:
script_translator plus speller/algebra;
- table:
table_translator plus max_code_length and optional encoder;
- test:
echo_translator.
- Configure
speller.
- Configure translator namespace and dictionary.
- Add
punctuator, key_binder, recognizer, menu, and filters.
- Validate with deployment logs and generated files under
build/.
Typical Engine Templates
Syllabic schemes usually start with:
engine:
processors: [ascii_composer, recognizer, key_binder, speller, punctuator, selector, navigator, express_editor]
segmentors: [ascii_segmentor, matcher, abc_segmentor, punct_segmentor, fallback_segmentor]
translators: [punct_translator, script_translator]
filters: [simplifier, uniquifier]
Table schemes usually start with:
engine:
processors: [ascii_composer, key_binder, speller, punctuator, selector, navigator, express_editor]
segmentors: [ascii_segmentor, abc_segmentor, punct_segmentor, fallback_segmentor]
translators: [punct_translator, table_translator]
filters: [uniquifier]
For exact multi-line examples, load full-reference.
Cross-Skill Routing
| Need |
Use |
| Exact component behavior or options |
rime-gears |
speller/algebra, preedit_format, comment_format rules |
rime-spelling-algebra |
| Lua processors, segmentors, translators, or filters |
rime-lua |
| Installing a schema package |
rime-plum |
| Windows Weasel appearance or app behavior |
rime-weasel |
Validation Checklist
Before considering a schema fix complete, check:
- YAML indentation uses spaces, not tabs.
schema_id, file names, dictionary name, and translator dictionary agree.
- Engine components are in the expected order.
- Tags produced by segmentors match translator/filter
tag or tags.
default.yaml includes the schema in schema_list.
- Rime has been redeployed and logs do not show relevant
ERROR or WARNING lines.
Full Reference
Load full-reference when you need:
- complete top-level
schema.yaml structure;
- full metadata, switches, speller, translator, punctuator, key binder, recognizer, reverse lookup, or menu examples;
dict.yaml frontmatter, columns, entry format, import tables, or encoder rules;
- complete phonetic and table schema examples;
- the common error table.
1---2name: rime-schema3description: Router and checklist for creating, editing, or diagnosing a Rime input method schema. Covers schema.yaml/dict.yaml relationships, schema metadata, switches, engine component selection, speller/translator choices, reverse lookup, menu, and validation steps. Load references/full-reference.md for detailed YAML examples, option tables, and complete phonetic/table schemas.4---56# Rime Schema78## How To Use This Skill910Use this skill when the user is building or changing a Rime input method. Keep `SKILL.md` as the schema planning checklist; load [full-reference](references/full-reference.md) only when exact YAML examples or option details are needed.1112| Schema Type | Main Translator | Dictionary Code Shape |13|-------------|-----------------|-----------------------|14| Pinyin, Jyutping, Bopomofo, other syllabic schemes | `script_translator` | syllables separated by spaces, such as `zhong wen` |15| Cangjie, Wubi, stroke, other table schemes | `table_translator` | code treated as one unit, usually no spaces |16| Minimal smoke test or echo scheme | `echo_translator` | no dictionary required |1718## Required Files1920Place schema files in the Rime user data directory:2122| File | Purpose |23|------|---------|24| `<schema_id>.schema.yaml` | schema definition, engine, speller, translators, filters |25| `<dict_name>.dict.yaml` | dictionary used by `translator/dictionary` |2627Naming invariants:28291. `schema/schema_id` must match `<schema_id>.schema.yaml`.302. `translator/dictionary` must match the `name` in `<dict_name>.dict.yaml`.313. Add the schema to `default.yaml` under `schema_list`.324. Redeploy after changes.3334## Schema Build Order35361. Choose `schema_id`, display name, version, and dependencies.372. Choose switches such as `ascii_mode`, `full_shape`, `simplification`, and `ascii_punct`.383. Choose an engine template:39 - syllabic: `script_translator` plus `speller/algebra`;40 - table: `table_translator` plus `max_code_length` and optional `encoder`;41 - test: `echo_translator`.424. Configure `speller`.435. Configure translator namespace and dictionary.446. Add `punctuator`, `key_binder`, `recognizer`, `menu`, and filters.457. Validate with deployment logs and generated files under `build/`.4647## Typical Engine Templates4849Syllabic schemes usually start with:5051```yaml52engine:53 processors: [ascii_composer, recognizer, key_binder, speller, punctuator, selector, navigator, express_editor]54 segmentors: [ascii_segmentor, matcher, abc_segmentor, punct_segmentor, fallback_segmentor]55 translators: [punct_translator, script_translator]56 filters: [simplifier, uniquifier]57```5859Table schemes usually start with:6061```yaml62engine:63 processors: [ascii_composer, key_binder, speller, punctuator, selector, navigator, express_editor]64 segmentors: [ascii_segmentor, abc_segmentor, punct_segmentor, fallback_segmentor]65 translators: [punct_translator, table_translator]66 filters: [uniquifier]67```6869For exact multi-line examples, load [full-reference](references/full-reference.md).7071## Cross-Skill Routing7273| Need | Use |74|------|-----|75| Exact component behavior or options | `rime-gears` |76| `speller/algebra`, `preedit_format`, `comment_format` rules | `rime-spelling-algebra` |77| Lua processors, segmentors, translators, or filters | `rime-lua` |78| Installing a schema package | `rime-plum` |79| Windows Weasel appearance or app behavior | `rime-weasel` |8081## Validation Checklist8283Before considering a schema fix complete, check:84851. YAML indentation uses spaces, not tabs.862. `schema_id`, file names, dictionary name, and translator dictionary agree.873. Engine components are in the expected order.884. Tags produced by segmentors match translator/filter `tag` or `tags`.895. `default.yaml` includes the schema in `schema_list`.906. Rime has been redeployed and logs do not show relevant `ERROR` or `WARNING` lines.9192## Full Reference9394Load [full-reference](references/full-reference.md) when you need:9596- complete top-level `schema.yaml` structure;97- full metadata, switches, speller, translator, punctuator, key binder, recognizer, reverse lookup, or menu examples;98- `dict.yaml` frontmatter, columns, entry format, import tables, or encoder rules;99- complete phonetic and table schema examples;100- the common error table.