Gate Tests
vercel/next.js
How to use the @gate / @force-gate test directives instead of it.skip or fake-green skip patterns.
What the gates cannot tell you about adding or changing a zh-TW rule - why assets/ruleset.json is the only place a vocabulary rule lives, the false-friend problem and the four gates that answer it…
$ npx skills add sysprog21/zhtw-mcp --skill zhtw-rules -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install sysprog21/zhtw-mcp zhtw-rules --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/sysprog21/zhtw-mcp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/zhtw-rules .claude/skills/zhtw-rules && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "zhtw-rules" agent skill from https://github.com/sysprog21/zhtw-mcp/tree/main/.claude/skills/zhtw-rules into .claude/skills/zhtw-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zhtw-rules", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/sysprog21/zhtw-mcp/tree/main/.claude/skills/zhtw-rulesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add sysprog21/zhtw-mcp --skill zhtw-rules -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install sysprog21/zhtw-mcp zhtw-rules --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sysprog21/zhtw-mcp.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/zhtw-rules .agents/skills/zhtw-rules && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "zhtw-rules" agent skill from https://github.com/sysprog21/zhtw-mcp/tree/main/.claude/skills/zhtw-rules into .agents/skills/zhtw-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zhtw-rules", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sysprog21/zhtw-mcp --skill zhtw-rules -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install sysprog21/zhtw-mcp zhtw-rules --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sysprog21/zhtw-mcp.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/zhtw-rules .cursor/skills/zhtw-rules && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "zhtw-rules" agent skill from https://github.com/sysprog21/zhtw-mcp/tree/main/.claude/skills/zhtw-rules into .cursor/skills/zhtw-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zhtw-rules", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/sysprog21/zhtw-mcp.git --path .claude/skills/zhtw-rules--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add sysprog21/zhtw-mcp --skill zhtw-rules -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install sysprog21/zhtw-mcp zhtw-rules --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sysprog21/zhtw-mcp.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/zhtw-rules .gemini/skills/zhtw-rules && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "zhtw-rules" agent skill from https://github.com/sysprog21/zhtw-mcp/tree/main/.claude/skills/zhtw-rules into .gemini/skills/zhtw-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zhtw-rules", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install sysprog21/zhtw-mcp zhtw-rulesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add sysprog21/zhtw-mcp --skill zhtw-rules -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/sysprog21/zhtw-mcp.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/zhtw-rules .github/skills/zhtw-rules && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "zhtw-rules" agent skill from https://github.com/sysprog21/zhtw-mcp/tree/main/.claude/skills/zhtw-rules into .github/skills/zhtw-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zhtw-rules", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sysprog21/zhtw-mcp --skill zhtw-rules -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install sysprog21/zhtw-mcp zhtw-rules --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sysprog21/zhtw-mcp.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/zhtw-rules .opencode/skills/zhtw-rules && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "zhtw-rules" agent skill from https://github.com/sysprog21/zhtw-mcp/tree/main/.claude/skills/zhtw-rules into .opencode/skills/zhtw-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zhtw-rules", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
zhtw-rulesWhat the gates cannot tell you about adding or changing a zh-TW rule - why assets/ruleset.json is the only place a vocabulary rule lives, the false-friend problem and the four gates that answer it…
Zhtw Rules is an agent skill from sysprog21/zhtw-mcp. What the gates cannot tell you about adding or changing a zh-TW rule - why assets/ruleset.json is the only place a vocabulary rule lives, the false-friend problem and the four gates that answer it, the corpus thresholds a rule has to clear, why positions are byte offsets through NFC, and how a rule reaches the scanner, the fixer and the browser build. Use when adding or disabling a rule, when a rule fires on native zh-TW prose, when a fix lands at the wrong offset, or when touching src/engine/scan.
Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The repository describes itself as: A linguistic linter for Traditional Chinese (zh-TW). The licence is MIT.
Read from SKILL.md and the folder at commit 5b385b3. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
makeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Zhtw Rules loads about 1.7k tokens when it runs. Until then it costs about 129 tokens; SKILL.md has 782 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from sysprog21/zhtw-mcp at commit 5b385b3, republished under its MIT licence (© sysprog21). 782 words, ~1,663 tokens.
.claude/skills/zhtw-rules/SKILL.md (or your agent's skills folder).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.
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.The two terms above took different answers, which is the point of having four.
文件 to 檔案 is disabled, because a sentence holding it reads correctly under
either meaning. 字體 to 字型 ships enabled behind context_clues, because the
typeface sense travels with words the rule can look for.
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 assertions in tests/corpus-evaluation.rs are what settles whether a rule
pays for itself. make corpus prints their table, but it does not gate: cargo
autodiscovers that target, so make check has already run every one of them.
There are ten, not the three the printed table draws the eye to:
CLAUDE.md records as the contract, and 99% on both the zh-CN conversion and
the native corpora.Three more assert each corpus is still big enough to mean anything. 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.
expected_issues and expected_fixed in a corpus fixture are deliberately
independent: the scanner reports confusable and clue-gated rules that the
lexical_safe fixer will not touch, so an issue without a replacement is
correct and not an omission.
Every offset a rule produces is a byte offset into the original text, mapped
back through NFC normalization and, for markdown, through pulldown-cmark event
ranges. Computing one on the normalized string alone gives a number that is
right for ASCII, right for most CJK, and wrong the moment a composed character
or a markdown construct appears before it. src/engine/normalize.rs holds the
offset map and src/engine/lineindex.rs turns an offset into a line and
column, in UTF-16 code units by default because that is what LSP clients read.
A rule reaches the CLI, the MCP server and the browser extension. The last one
is the one that gets forgotten: the extension builds the library with
browser-wasm and no native, and anything touching std::fs, dirs or
rayon has to be behind #[cfg(feature = "native")] or that build breaks.
make check lints the two non-default feature shapes for exactly this reason.
The fixer is the second consumer worth naming. A scanner detection is not
automatically a fix: src/fixer.rs applies only what is safe to apply without
reading the sentence, and a rule whose correction depends on context belongs in
context_suggestions rather than in the safe fixer.
src/engine/scan/spelling.rs Vocabulary rules out of the ruleset
src/engine/scan/case_rule.rs Casing of Latin technical terms
src/engine/scan/punctuation.rs Half-width to full-width, context sensitive;
emits the quote issues quotes.rs decided on
src/engine/scan/quotes.rs Which quotation marks convert at all, the
depth-based pairing fix, hierarchy validation
src/engine/scan/spacing.rs CJK to Latin and CJK to digit spacing
src/engine/scan/ellipsis.rs Non-standard ellipsis to the MoE …… form
src/engine/scan/repetition.rs Consecutive duplicates, an ASR and paste tell
src/engine/scan/acronym.rs Rejoins a spaced acronym, C P U to CPU
src/engine/scan/grammar.rs A-not-A, bare 是, nominalization, prepositions
src/engine/scan/rule_ir.rs The matcher spelling.rs drives; the 臺/台 family
is variant rules behind variant_normalization
src/engine/scan/overlap.rs Resolves detections that cover the same span
src/engine/s2t.rs Simplified to traditional, from the OpenCC tablestests/unit/engine/scan/tests_generated.rs is misnamed and is not generated: it
holds the hand-written scanner tests split out of scan/mod.rs. Add a scanner
test there or in the pass's own test file under tests/unit/, never in the pass
itself, and add the corpus fixture separately when the rule is meant to move a
metric. zhtw-verify has the #[path] declaration a module uses to reach its
tests.
© sysprog21, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/zhtw-rules of sysprog21/zhtw-mcp.
Open the folder on GitHubat commit 5b385b3
Zhtw Rules next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Zhtw Rules this skillsysprog21/zhtw-mcp | 488 | — | ~1.7k | Automated safety check: Pass | MIT | |
| Gate Testsvercel/next.js | 143k | — | ~2.7k | Automated safety check: Pass | MIT | |
| Gateplugin87/ux-ui-agent-skills | 1.5k | — | ~532 | Automated safety check: Pass | MIT | |
| Brain Ingest Gategarrytan/gbrain | 31k | — | ~3.9k | Automated safety check: Pass | MIT | |
| Delivery Gateaffaan-m/ECC | 275k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Skill Release Gaterohitg00/ai-engineering-from-scratch | 66k | — | ~1k | Automated safety check: Pass | MIT |
vercel/next.js
How to use the @gate / @force-gate test directives instead of it.skip or fake-green skip patterns.
plugin87/ux-ui-agent-skills
Run the one-command quality gate and report the real N/N result.
garrytan/gbrain
Pre-write quality gate for content entering the brain. An agent skill from garrytan/gbrain.
affaan-m/ECC
Stop hook that blocks Claude from finishing until quality checks pass.
rohitg00/ai-engineering-from-scratch
Evaluates an Agent Skill bundle before release for structure, trigger quality, artifact improvement, script correctness, safety, installed-tree integrity and host portability.
nexu-io/open-design
Safely track pull request feedback, resolve review comments or merge conflicts, validate fixes, and use a read-only cross-review before committing or pushing follow-up changes.
sysprog21/zhtw-mcp
The zhtw-mcp conventions no gate enforces - the register a comment, a commit message and a PR reply are written in, where Chinese belongs in the tree and where it does not, the untracked working…
sysprog21/zhtw-mcp
How a zhtw-mcp change is validated - make check as the gate, the generated tables and the ruleset normalization that have to be current before it passes, the formatter chain in scripts/indent.sh…
What the gates cannot tell you about adding or changing a zh-TW rule - why assets/ruleset.json is the only place a vocabulary rule lives, the false-friend problem and the four gates that answer it…. Zhtw Rules is an agent skill from sysprog21/zhtw-mcp.json is the only place a vocabulary rule lives, the false-friend problem and the four gates that answer it, the corpus thresholds a rule has to clear, why positions are byte offsets through NFC, and how a rule reaches the scanner, the fixer and the browser build.
Zhtw Rules fits situations like: disabling a rule; A rule fires on native zh-TW prose; A fix lands at the wrong offset; touching src/engine/scan.
Run `npx skills add sysprog21/zhtw-mcp --skill zhtw-rules -a claude-code`. Or copy the skill folder (.claude/skills/zhtw-rules in sysprog21/zhtw-mcp) into .claude/skills/zhtw-rules in your project. Claude Code loads it when a task matches its description.
Run `npx skills add sysprog21/zhtw-mcp --skill zhtw-rules -a codex`. Or copy the skill folder (.claude/skills/zhtw-rules in sysprog21/zhtw-mcp) into .agents/skills/zhtw-rules in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sysprog21/zhtw-mcp --skill zhtw-rules -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/zhtw-rules, .gemini/skills/zhtw-rules, .github/skills/zhtw-rules and .opencode/skills/zhtw-rules in your project.
Going by SKILL.md and its folder, Zhtw Rules needs the command-line tools its instructions call (make). Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Zhtw Rules is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Zhtw Rules: Gate Tests (vercel/next.js, 143k stars), Gate (plugin87/ux-ui-agent-skills, 1.5k stars), Brain Ingest Gate (garrytan/gbrain, 31k stars) and Delivery Gate (affaan-m/ECC, 275k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
sysprog21 (a GitHub organization) maintains it in sysprog21/zhtw-mcp, which has 488 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 5, 2026.
Source: sysprog21/zhtw-mcp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.