Preface¶
In DeepSeek Harness (DSH) or agent workflows, the Chinese output by models often mixes Traditional and Simplified characters, contains Cantonese colloquialisms, or includes Japanese Shinjitai (new character forms) and Japanese vocabulary. If a project requires consistent storage and publication using Traditional (or Simplified) written language, relying solely on prompts is unstable; manual post-processing is also costly. Here we introduce the community plugin chinese-script-policy: the same logic serves as a DSH plugin for pre-write checks and can also perform offline conversion, without relying on runtime fetching of external tables like OpenCC.
What is this¶
chinese-script-policy is published by maintainer KSF1216, with the repository at KSF1216/chinese-script-policy. The README positions it as a harness-neutral tool: the same codebase functions simultaneously as a DSH bundle, Agent Skill, npm package, CLI, and Web library. There is no separate “DSH build” vs. “general build,” avoiding drift between two implementations.
It solves two types of problems: Checking whether your specified Chinese writing conforms to the target (optionally filtering Cantonese colloquialisms and Japanese-specific characters/words); Converting steps such as Traditional/Simplified conversion, Cantonese colloquial to written language, and Japanese Shinjitai to Chinese can be toggled individually as needed. The tool declares no position on which Chinese character system is “correct”; it only reports or rewrites based on your set target.
Core Features¶
Checking: One Script Axis + Two Independent Filter Axes¶
Script Axis (Mutually exclusive, cannot be enabled simultaneously):
- When the target is Traditional, it reports Simplified-specific glyphs appearing in the text (the README records a total of 2,637).
- When the target is Simplified, it reports Traditional-specific glyphs (3,083).
You specify the target, and the tool reports glyphs that “do not belong to that target.” The README explicitly warns: do not enable both directions of the script axis simultaneously, otherwise almost any Chinese document will be judged non-compliant.
Filter Axes (Independent toggles, unrelated to the script axis direction):
- Cantonese Colloquial Register.
- Japanese-specific characters and words (367 Shinjitai/Kokuji + 123 Japanese words). This axis captures content that “looks like Chinese but is actually Japanese”; pure Simplified character lists cannot cover this type of issue.
On the DSH Plugin (Plugins page card): The script axis can be chosen from Require Traditional (default) / Require Simplified / No Check; Cantonese and Japanese filters can be turned off separately. The CLI defaults to --variant traditional; the offline web page defaults to checking the Traditional direction and both filters; the write hook in Claude Code format is fixed to “Require Traditional” with both filters enabled (no Simplified side).
Conversion: Three Optional Steps + Wording Preferences¶
Conversion is divided into three independently executable steps (all require explicit activation; there is no default for “full auto/full change”):
| Step | CLI Example | Default |
|---|---|---|
| Trad ↔ Simp | --to-traditional / --to-simplified |
Direction must be selected |
| Cantonese Colloquial → Written | --to-written |
Off |
| Japanese Shinjitai → Chinese | --convert-japanese |
Off |
Optional Wording Preferences (--wording, a checkbox on the web, default off): Beyond glyph conversion, it selects local vocabulary lists based on the target writing system (e.g., Simplified→Traditional: 软件→軟體; Traditional→Simplified: 軟體→软件). When off, only glyph-level conversion is performed (e.g., 軟件 is considered correct in a Traditional context).
Other Documented Capabilities¶
- Single-file offline page
dist/tradzh.html: Double-click to use; no Node, no uploads, does not modify original files. - Zero runtime dependencies: Mapping tables are compiled into the product as JSON within the repository;
dependenciesis empty, and results do not vary based on whether OpenCC is installed locally. - Auto-detects UTF-8, BOM, UTF-16, Big5, GB18030; does not silently guess when encoding cannot be determined.
- The same decision function is used for CLI, write hooks, DSH plugins, and web pages, ensuring consistent behavior.
The current version of the npm package is 1.4.0 (see package.json), License MIT.
Installation and Activation¶
DSH Web-side installation (command from README):
dsh plugin --profile web add chinese-script-policy
After installation, find the plugin card on the DSH Plugins page to configure the script axis (Traditional / Simplified / No Check) as well as the Cantonese and Japanese filter toggles.
If you only need local conversion, have no Node on the machine, or prefer not to open a terminal, you can download dist/tradzh.html from the repository for offline use without installation. For long-term CLI or CI usage, use npx chinese-script-policy … or npm i -g chinese-script-policy (command names tradzh, chinese-script).
Typical Usage¶
DSH Plugin¶
- Execute the aforementioned
dsh plugin --profile web add chinese-script-policy. - Open the Plugins page, select “Require Traditional” or “Require Simplified” according to project conventions, and turn off Cantonese/Japanese filters as needed.
- Work in conjunction with the DSH write flow to intercept non-compliant glyphs or filter axis hits using the same set of rules before content is written to disk.
CLI Check and Conversion (Excerpts from README behavior descriptions)¶
Check (defaults to Traditional direction; Cantonese and Japanese require adding flags):
npx chinese-script-policy --variant traditional your_file.txt
To check for both Cantonese written language and Japanese, the CLI requires --written and --japanese respectively (unlike the DSH card which defaults to all on, filters on the CLI side must be explicitly opened).
Convert to Traditional and enable wording preferences:
npx chinese-script-policy --to-traditional --wording input.txt
You can also run it directly within the repository (no need for global installation if you already have the directory):
node scripts/tradzh.js …
For more complete parameter descriptions, see the repository’s CLI reference.
Use Cases and Notes¶
Suitable for: Projects that must distinguish between Traditional, Simplified, Cantonese colloquial writing, and Japanese Kanji; teams that need to manage policies uniformly via switches in the DSH Web interface; those seeking offline, auditable, runtime-dependency-free Traditional/Simplified and register conversion.
Notes:
- The plugin runs under the current dsh process permissions; please review the GitHub source code and MIT license yourself before installation.
- The community directory SkillHub Plugin Page has no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem follows “everything is a plugin,” and the directory is an independent community site.
- The “Cantonese → Written Language” step in conversion only handles parts that cannot appear in written language; the rest may still require model or manual polishing.
- For documents containing intentional Japanese citations, do not enable
--convert-japaneseby default to avoid incorrectly modifying citations.
Conclusion¶
chinese-script-policy consolidates “reporting non-compliant Chinese based on target” and “optional multi-step offline conversion” into a single implementation. On the DSH side, it can be connected to Web configuration cards with a single command. For further information, please refer to the community directory page and the repository README (including Chinese description).
- Directory Page: https://www.skillhub.cn/plugins/KSF1216/chinese-script-policy
- GitHub: https://github.com/KSF1216/chinese-script-policy