zhtw-rules

zhtw-rules is a skill for Claude Code from sysprog21/zhtw-mcp. It costs 119 tokens per session (1,246 once invoked), scanned A, original, MIT.

A guide for maintaining rules that flag incorrect or potentially misleading Traditional Chinese wording. It explains how the rule file, validation checks, text positions, and surrounding context work together.

In plain words
What is it for?
It helps add, edit, test, and format zh-TW vocabulary rules. It is for maintaining a language linter, which is a tool that checks text for unwanted wording.
Why use it?
It reduces false warnings where a term is correct in Traditional Chinese but has a different meaning in Simplified Chinese. It also gives a repeatable way to check rule changes before they are accepted.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sysprog21/zhtw-mcp/zhtw-rules
Any agent
npx skills add sysprog21/zhtw-mcp --skill zhtw-rules
Clone the repo
git clone --depth 1 https://github.com/sysprog21/zhtw-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for zhtw-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/sysprog21/zhtw-mcp/zhtw-rules.svg)](https://agentmods.dev/skills/sysprog21/zhtw-mcp/zhtw-rules)
Your own site
<a href="https://agentmods.dev/skills/sysprog21/zhtw-mcp/zhtw-rules"><img src="https://agentmods.dev/badge/skills/sysprog21/zhtw-mcp/zhtw-rules.svg" alt="Measured on agentmods" height="20"></a>
Per session 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,246 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00119 $0.01246
Opus 5 $0.00060 $0.00623
Sonnet 5 $0.00024 $0.00249
Haiku 4.5 $0.00012 $0.00125

Measured today against content hash b8761643e28b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

zhtw-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/zhtw-rules/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Changing what zhtw-mcp flags

assets/ruleset.json is the source of truth. build.rs serializes it into the binary with postcard, scripts/check-ruleset.py owns its dedup, sort and field order, and src/rules/schema.rs is the type the two agree on through the generated scripts/schema-facts.json. Hand formatting is rewritten and the indent gate fails on it, so the loop is: edit, python3 scripts/check-ruleset.py --lint, make indent.

The false friend is the whole problem

A from term that is also valid zh-TW with a different meaning is the failure mode this project has to defend against, because it turns the linter into something people switch off. 文件 is "file" in zh-CN and "document" in zh-TW. 字體 is a typeface here and a font file there. An ungated rule for either fires on correct prose.

Four answers, in order of how much they cost the reader:

  • disabled: true when the term cannot be judged from the sentence at all.
  • context_clues and negative_context_clues when a nearby word settles it.
  • exceptions when a fixed phrase is the only safe carve-out.
  • editorial_confidence for the milder case, and context_suggestions when the correction itself differs by domain.

A rule that needs none of these is a rule where the zh-CN form has no zh-TW reading, which is most of the vocabulary list and none of the hard cases.

The corpus is the argument, not the opinion

make corpus is what settles whether a rule pays for itself, and the assertions in tests/corpus-evaluation.rs are the gate. There are six, not three: precision at 90% or better; two native zh-TW false-positive rates, per fixture and repeat-weighted, each at 5% or less, because each is blind to what the other catches; and three safe-fix rates, 85% on the AI-generated corpus, which is the figure CLAUDE.md records as the contract, and 99% on both the zh-CN conversion and the native corpora. A rule that drops a false-positive gate is a rule that fires on native-zh-tw.json, which is exactly the prose it is supposed to leave alone.

Read the full file on GitHub · 92 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 92 lines · 119 tokens per session scan A b8761643e28b

Subscribe to this mod's changes

zhtw-rules is a skill published in the GitHub repository sysprog21/zhtw-mcp (474 stars, last pushed yesterday), licensed MIT. It adds 119 tokens to every session and 1,246 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

fieldworks-localization-review

Review or change FieldWorks user-facing strings: LocalizationManager/XLIFF and legacy .resx resources, localization keys, the StringTable strategy for XML-configuration labels, Crowdin-facing assets, and localization-sensitive automation metadata. Use whenever a change adds or edits any user-visible text in WinForms…

sillsdev/FieldWorks · 94 tokens

chinese-documentation

中文文档排版参考——中英文空格、全半角标点、术语保留、链接格式、中文文案排版指北约定。仅在用户显式 /chinese-documentation 时调用,不要根据上下文自动触发。.

jnMetaCode/superpowers-zh · 62 tokens

azure-ai-translation-text-py

Azure AI Text Translation SDK for real-time text translation, transliteration, language detection, and dictionary lookup. Use for translating text content in applications. Triggers: "text translation", "translator", "translate text", "transliterate", "TextTranslationClient".

microsoft/skills · 60 tokens

i18n-localization

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

vudovn/ag-kit · 27 tokens

harden

Improve interface resilience through better error handling, i18n support, text overflow handling, and edge case management. Makes interfaces robust and production-ready. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.

fengshao1227/ccg-workflow · 62 tokens

new-app

Scaffold a new Atomic Agents project from scratch — create the directory, pyproject.toml, env file, first agent, and a runnable entry point. Use when the user asks to start a new atomic-agents project from scratch, says "scaffold" / "new project" / "start from zero", or runs /atomic-agents:new-app.

Eigenwise/atomic-agents · 76 tokens