Agent skill

Zhtw Verify

by sysprog21 in 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…

MITAuto-check passedDevelopment

Install Zhtw Verify

skills CLI
$ npx skills add sysprog21/zhtw-mcp --skill zhtw-verify -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sysprog21/zhtw-mcp zhtw-verify --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sysprog21/zhtw-mcp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/zhtw-verify .claude/skills/zhtw-verify && rm -rf skills-src

Use ~/.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/

Facts

Skill name
zhtw-verify
GitHub stars
488
Token cost
~2.8k tokens
SKILL.md length
1,530 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

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…

  • Tasks that involve Linting and formatting
  • SKILL.md covers What skips, and why that matters, The indent gate is the one…, Drift is the usual failure and The corpus thresholds, plus 5 more sections
  • Calls make, cargo and python3
  • Tasks that involve Database schema design

What it does

Zhtw Verify is an agent skill from 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, the git hooks and their own suite, the corpus thresholds a new rule has to clear, and the lanes that need a network or a browser and therefore sit outside. Use before calling work done, when a gate fails on drift rather than on a bug, when adding a rule or a test, or when a change touches src/engine.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Linting and formatting and Database schema design. It works with Model Context Protocol and Git. The repository describes itself as: A linguistic linter for Traditional Chinese (zh-TW). The licence is MIT.

When your agent uses it

  • Tasks that involve Linting and formatting
  • Tasks that involve Database schema design

Example prompts

  • “/zhtw-verify”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 5b385b3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • make
    • cargo
    • python3
    • sh
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Zhtw Verify loads about 2.8k tokens when it runs. Until then it costs about 127 tokens; SKILL.md has 1,530 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~127
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from sysprog21/zhtw-mcp at commit 5b385b3, republished under its MIT licence (© sysprog21). 1,530 words, ~2,776 tokens.

Download SKILL.mdSave it as .claude/skills/zhtw-verify/SKILL.md (or your agent's skills folder).
name
zhtw-verify
description
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, the git hooks and their own suite, the corpus thresholds a new rule has to clear, and the lanes that need a network or a browser and therefore sit outside. Use before calling work done, when a gate fails on drift rather than on a bug, when adding a rule or a test, or when a change touches src/engine.

Validating a zhtw-mcp change

One gate, and it is the thing to run:

sh
make check       # cargo test, clippy on three feature shapes, the formatters,
                 # the ruleset lint, the hook suite, shellcheck
make check-size  # the release binary has to stay under 20 MiB

Python 3 is a build requirement, not just a test requirement: make regenerates src/engine/s2t_data.rs from the pinned OpenCC dictionaries before it builds.

What skips, and why that matters

Every formatter lane skips when its tool is missing rather than failing, and that is every tool scripts/indent.sh drives: commentflow, cargo, black, shfmt and python3, plus shellcheck in the Makefile. That is right on a laptop and wrong on a runner, so CI installs them on the Linux leg and sets ZHTW_REQUIRE_TOOLS=1 there, which turns a skip into a hard failure. The macOS leg still skips, and the verdict line names what it skipped. A green local run is therefore weaker evidence than a green CI run, and so is what the local gate leaves out: CI also holds a pull request's own commit messages to the rules, runs cargo audit against Cargo.lock, builds the browser extension, and runs the whole suite on macOS and Windows. Two of the three Windows-only regressions this project has shipped were found by that last one and by nothing else.

The indent gate is the one that surprises people

scripts/indent.sh --check copies the tree, runs the whole formatter chain over the copy, and diffs: comment reflow with commentflow, then cargo fmt, black, shfmt, and the assets/ruleset.json normalization that scripts/check-ruleset.py owns. Checking the composition rather than each tool is not a flourish. commentflow puts a blank line before a comment inside a method chain and cargo fmt takes it straight back out, so commentflow --check alone can never be satisfied on Rust. make indent runs the same script with --write, so the fix for a failure is always that one command.

The chain runs to a fixed point rather than once. commentflow wraps a comment against the indentation it finds, and cargo fmt or shfmt can then reindent the block around it, leaving the comment wrapped for the width it used to have. One pass would let make indent write a tree the gate rejects.

No formatter here takes a style flag. shfmt reads .editorconfig and commentflow reads ColumnLimit from .clang-format, which exists for that one number and for no C in this tree: without it, commentflow's search walks out of the repository and the limit becomes whatever it finds or its own default. Both files travel into the copy the check runs against, along with Cargo.toml and scripts/schema-facts.json, so the copy is judged by the rules that wrote the tree.

The copy carries a one-newline stub at src/engine/s2t_data.rs, because rustfmt follows the module declaration that names it and the real file is generated and gitignored.

Drift is the usual failure

Two trees are generated, and a failure there is not a bug in your change; it means the source moved and the output did not.

sh
python3 scripts/gen-s2t-tables.py       # src/engine/s2t_data.rs, then rustfmt it
python3 scripts/check-ruleset.py        # rewrites assets/ruleset.json in place
python3 scripts/check-ruleset.py --lint # reports conflicts without rewriting

UPDATE_SCHEMA_FACTS=1 cargo test schema_facts_file_is_current  # scripts/schema-facts.json

Never hand-edit src/engine/s2t_data.rs; it is 43k generated lines. Never hand format assets/ruleset.json either: check-ruleset.py owns its dedup, sort and field order, and the indent gate compares the committed bytes against what it would write.

The corpus thresholds

tests/corpus-evaluation.rs has no [[test]] stanza, so cargo autodiscovers it and the cargo test inside make check already runs every assertion in it. make corpus is the same suite with --nocapture, and the only thing it adds is the printed table of precision, recall, false-positive rate and safe-fix rate over the synthetic corpora in tests/corpus/. Run it to read the numbers, not to gate on them; a green make check has already cleared them.

Those assertions are the gate, and there are ten. Aggregate precision at 90% or better; two native zh-TW false-positive rates, per fixture and repeat-weighted, each at 5% or less; three safe-fix rates, 85% on the AI-generated corpus and 99% on the zh-CN conversion and native ones; and a per-corpus loop at the end gating recall and precision on each positive corpus, 94% and 91% for AI-generated, 98% and 96% for the zh-CN conversion.

A rule that is a false friend, valid zh-TW with a different meaning, stays disabled or gets gated by context_clues, negative_context_clues or exceptions. See zhtw-rules.

The git hooks

Any cargo build installs them, through build.rs, and make hooks does it on its own, unless core.hooksPath points outside the repository hooks directory. scripts/git-pre-commit.sh runs rustfmt, black, shellcheck, shfmt, commentflow and the ruleset lint over a checkout of the index, so an unstaged edit neither fails a commit nor rides along in one. It does not build, test or regenerate anything; that is what the gate is for. scripts/git-commit-msg.sh holds the message to the rules in zhtw-conventions, and scripts/git-pre-push.sh replays them over commits a rebase or an amend rewrote after the fact. CI runs the same script over a pull request's own commits, so the rules bind someone who never installed the hooks as well.

The hooks have their own suite. scripts/test-git-hooks.sh builds a scratch repository with GIT_CONFIG_GLOBAL and GIT_CONFIG_SYSTEM pointed at /dev/null, so a contributor's own core.hooksPath cannot pull the cases into a hooks directory somebody is using. The message and push cases run through the installed wrapper and the rest call the scripts directly. It covers the messages that must be rejected, a CJK subject accepted at one width and rejected at another, the template splice above a commit -v scissors line, a staged file failing while the same edit unstaged does not, a staged file whose child module is the generated one, and a push carrying a commit that skipped the hook. It runs in make check, so editing a hook without running it is caught there.

Show full SKILL.md (607 more words)Show less

The comment prose gate

scripts/check-comments.sh is the other lane no formatter covers: no em dash anywhere in a comment, and no backtick outside a /// or //! doc comment. It runs in make check and in the pre-commit hook over the staged files. Both rules were swept out of the tree in one pass, and the gate is what keeps the sweep from growing back a comment at a time. Run it on its own with ./scripts/check-comments.sh, or on named files.

Writing a test

No test body goes under src/. Integration suites sit beside the ones already in tests/; a unit test goes to tests/unit/ plus the module path plus the module name, and the module it covers points at it:

rust
#[cfg(test)]
#[path = "../../tests/unit/engine/excluded/tests.rs"]
mod tests;

The #[path] is relative to the directory holding the source file. These are still unit tests, so they keep private access and need no item made pub; see zhtw-conventions for what legitimately stays in src/ and what does not.

tests/unit/engine/scan/tests_generated.rs is misnamed: it holds the hand-written scanner tests mechanically split out of scan/mod.rs, which is why tests/unit/engine/scan/tests.rs ends in an include! of it. Edit it like any other test file, and jump to the relevant test rather than reading the whole file. tests/unit/engine/scan/grammar/legacy.rs is the other one to know: nine legacy scanners kept only so the parity differential tests can check the Aho-Corasick dispatch against them.

Positions are byte offsets mapped back through NFC normalization and pulldown-cmark event ranges. A test that computes a position on the post-normalization string alone is asserting the wrong number, and it will pass until the first composed character reaches it.

What no gate here can enforce

Four things, worth knowing before trusting a green run:

  • The pre-commit hook that runs is the one in the working tree, while the checks it performs read the index. Staging a change to a hook and restoring the working copy therefore commits through the old hook. The staged copy is not unexamined: it gets sh -n, shellcheck, commentflow --check and shfmt -d like any staged shell, and staging any hook script also runs the staged scripts/test-git-hooks.sh. What no hook can do is judge itself, so make check and the CI commit-log job remain the backstop.
  • scripts/check-comments.sh reads full-line comments only. Telling a trailing comment from a string literal that happens to hold a backtick needs a parser rather than a grep, and a gate that fails a line nobody broke is a gate people learn to argue with. A trailing comment is short by nature and rarely carries either character, but it is unchecked.
  • The commit-message rules are mechanical. Nothing checks that a body says the premise and the trade rather than retelling the diff, which is the rule that matters most and the one only a reader can apply. See zhtw-conventions.
  • A rule's linguistic correctness. The corpus gates measure whether a rule fires where the fixtures say it should, not whether the zh-TW term is the one the Ministry of Education actually publishes. python3 scripts/check-ruleset.py --verify checks a term against Wikipedia and the MoE dictionary, needs a network, and is not in any gate.

What is deliberately outside the gate

sh
cargo test --test anchor-benchmark -- --ignored  # needs network
python3 scripts/check-ruleset.py --verify        # Wikipedia and MoE dict lookups
sh extension/build-wasm.sh                       # needs wasm-pack
npm test --prefix extension                      # extension helpers
python3 scripts/measure-tokens.py                # telemetry calibration

CI runs the extension build and its tests, but only on a push to main, on a pull request, or on a manual dispatch: a push to a topic branch runs nothing. The two network lanes are run by hand when the vocabulary they check has moved.

--verify is the only thing in the binary that reaches the network, and ZHTW_NO_NETWORK refuses it. Set that when running the gate somewhere the tree should not be able to phone out; the run continues and reports api_ok=false.

© sysprog21, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/zhtw-verify of sysprog21/zhtw-mcp.

Open the folder on GitHubat commit 5b385b3

Compare with similar skills

Zhtw Verify 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.

Zhtw Verify compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Zhtw Verify this skillsysprog21/zhtw-mcp488—~2.8kAutomated safety check: PassMIT
Self Healingpskoett/pskoett-ai-skills310—~5.3kAutomated safety check: NotesNone
Zed Configwcygan/dotfiles196—~930Automated safety check: PassNone
Saleor Commit Workflowsaleor/saleor23k—~575Automated safety check: PassBSD-3-Clause
Qt Cpp ReviewSerial-Studio/Serial-Studio7.2k—~4.3kAutomated safety check: PassCustom licence
Qt Qml ReviewSerial-Studio/Serial-Studio7.2k—~3.7kAutomated safety check: PassCustom licence

Similar skills

  • Self Healing

    pskoett/pskoett-ai-skills

    Active runtime recovery for coding agents: when something breaks mid-task, diagnose the root cause, write a fix, VERIFY by re-running the broken thing, then file a HEAL- entry to .learnings/HEALS.md…

    310 GitHub stars~5.3k tokensUpdated 2 days ago
    DevelopmentAuto-check: notes
  • Zed Config

    wcygan/dotfiles

    Zed editor configuration expert. An agent skill from wcygan/dotfiles.

    196 GitHub stars~930 tokensUpdated 4 days ago
    Agent WorkflowsAuto-check passed
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Qt Cpp Review

    Serial-Studio/Serial-Studio

    Qt6/C++ deep code review for Serial Studio. An agent skill from Serial-Studio/Serial-Studio.

    7.2k GitHub stars~4.3k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Qt Qml Review

    Serial-Studio/Serial-Studio

    Qt6/QML deep code review for Serial Studio. An agent skill from Serial-Studio/Serial-Studio.

    7.2k GitHub stars~3.7k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Lint Commit PR

    Tresjs/tres

    Lint local changes, auto-fix, conventional commit, and optionally create PR

    3.8k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed

More from sysprog21/zhtw-mcp

  • Zhtw Conventions

    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…

    488 GitHub stars~2k tokensUpdated 3 days ago
    Auto-check passed
  • Zhtw Rules

    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…

    488 GitHub stars~1.7k tokensUpdated 3 days ago
    Auto-check passed

Categories

Questions about Zhtw Verify

What does Zhtw Verify do?

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…. Zhtw Verify is an agent skill from sysprog21/zhtw-mcp.sh, the git hooks and their own suite, the corpus thresholds a new rule has to clear, and the lanes that need a network or a browser and therefore sit outside.

When should I use Zhtw Verify?

Zhtw Verify fits situations like: tasks that involve Linting and formatting; tasks that involve Database schema design.

How do I install Zhtw Verify in Claude Code?

Run `npx skills add sysprog21/zhtw-mcp --skill zhtw-verify -a claude-code`. Or copy the skill folder (.claude/skills/zhtw-verify in sysprog21/zhtw-mcp) into .claude/skills/zhtw-verify in your project. Claude Code loads it when a task matches its description.

How do I install Zhtw Verify in Codex?

Run `npx skills add sysprog21/zhtw-mcp --skill zhtw-verify -a codex`. Or copy the skill folder (.claude/skills/zhtw-verify in sysprog21/zhtw-mcp) into .agents/skills/zhtw-verify in your project. Codex loads it when a task matches its description.

Can I use Zhtw Verify in Cursor, Gemini CLI or GitHub Copilot?

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-verify -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-verify, .gemini/skills/zhtw-verify, .github/skills/zhtw-verify and .opencode/skills/zhtw-verify in your project.

What does Zhtw Verify need to run?

Going by SKILL.md and its folder, Zhtw Verify needs the command-line tools its instructions call (make, cargo, python3, sh and npm). Our summary lists: Python 3.

Does Zhtw Verify access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Zhtw Verify safe to install?

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.

What licence does Zhtw Verify use?

Zhtw Verify is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Zhtw Verify use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Zhtw Verify?

Skills that share tags, products or a category with Zhtw Verify: Self Healing (pskoett/pskoett-ai-skills, 310 stars), Zed Config (wcygan/dotfiles, 196 stars), Saleor Commit Workflow (saleor/saleor, 23k stars) and Qt Cpp Review (Serial-Studio/Serial-Studio, 7.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Zhtw Verify?

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.