piper-plus: Skill for Claude Code

.claude/skills/check-loanword/SKILL.md

check-loanword is a skill for Claude Code from ayutaz/piper-plus. It costs 117 tokens per session (1,666 once invoked), scanned A, original, MIT.

A consistency checker for a dictionary of Chinese-English mixed words used by a text-to-speech pronunciation system. It compares one Python source file with copies used by Rust, Go, C#, WebAssembly, C++, and test fixtures.

In plain words
What is it for?
Use it after editing the dictionary or adding an entry to verify file contents, data format, and all listed runtime and test copies.
Why use it?
It detects when one copy of the dictionary differs from the others, preventing different language runtimes from pronouncing the same input differently.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

This is ayutaz/piper-plus's own configuration. It tells Claude Code how to work on piper-plus itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything piper-plus configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/check_loanword_consistency.py.

Reuse

Borrowing it

Nothing to install: this file belongs to ayutaz/piper-plus. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ayutaz/piper-plus/dev/.claude/skills/check-loanword/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ayutaz/piper-plus

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 check-loanword

README.md
[![agentmods](https://agentmods.dev/badge/skills/ayutaz/piper-plus/check-loanword/github.svg)](https://agentmods.dev/skills/ayutaz/piper-plus/check-loanword)
Your own site
<a href="https://agentmods.dev/skills/ayutaz/piper-plus/check-loanword"><img src="https://agentmods.dev/badge/skills/ayutaz/piper-plus/check-loanword/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for check-loanword

Your own site · 80×15
<a href="https://agentmods.dev/skills/ayutaz/piper-plus/check-loanword"><img src="https://agentmods.dev/badge/skills/ayutaz/piper-plus/check-loanword.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,666 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 109
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
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.00117 $0.01666
Opus 5 $0.00059 $0.00833
Sonnet 5 $0.00023 $0.00333
Haiku 4.5 $0.00012 $0.00167

Measured 10d ago against content hash c2a6dcd858b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

check-loanword 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 10d ago.

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/check-loanword/SKILL.md · 110 lines

How it starts

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

ZH-EN Loanword Consistency Check

ZH-EN code-switching (Issue #384) で使う loanword 辞書 (zh_en_loanword.json) を 5 ランタイムに展開する際の同期チェック。pua-contract.toml の PUA 同期と同じ哲学で、Python source を 唯一の真実 とし、CI で 7 copy + 6 fixture mirror が byte-for-byte 一致することを保証する。

何をチェックするか

docs/reference/zh-en-loanword/README.md の不変条件:

  1. 7 mirror byte-for-byte sync — Python source と以下の 6 mirror が SHA256 一致:
    • Python runtime (src/python_run/piper_plus/phonemize/data/zh_en_loanword.json)
    • Rust 2 crate (src/rust/piper-plus-g2p/data/, src/rust/piper-core/data/)
    • Go (src/go/phonemize/data/zh_en_loanword.json)
    • C# (src/csharp/PiperPlus.Core/Phonemize/Data/zh_en_loanword.json)
    • WASM (src/wasm/g2p/data/zh_en_loanword.json)
    • C++ (src/cpp/data/zh_en_loanword.json)
  2. Schema validation — Python の _load_loanword_data と同じ書式 ('<section>.<key>' must be list[str]) でエラーを出すこと
  3. 6 fixture mirror synctests/fixtures/g2p/zh_en_loanword_matrix.json と以下の mirror が一致:
    • src/go/phonemize/testdata/
    • src/csharp/PiperPlus.Core.Tests/Phonemize/TestData/
    • src/cpp/tests/fixtures/
    • src/wasm/g2p/test/fixtures/
    • src/rust/piper-plus-g2p/tests/fixtures/, src/rust/piper-core/tests/fixtures/
  4. Forward-compat (YELLOW-5) — 各ランタイムの loader が schema_version: 2 未来の追加フィールドを silent ignore すること

実行ステップ

1. ローカルで sync 状態を確認

python scripts/check_loanword_consistency.py

期待: OK All 7 copies + 6 fixture mirrors in sync で終了 (exit 0)。

2. drift 発見時は自動修復

Python source を canonical とした 一方向コピー で復元:

python scripts/check_loanword_consistency.py --diff   # 差分確認 (dry-run)
python scripts/check_loanword_consistency.py --fix    # 6 mirror + 6 fixture を Python source に揃える

注意: Mirror を直接編集しても --fix で上書きされる。JSON 変更を提案する場合は 必ず Python source (src/python/g2p/piper_plus_g2p/data/zh_en_loanword.json) を編集 すること。

3. Schema validation のみ確認 (CI 用)

python scripts/check_loanword_consistency.py --schema-only

Read the full file on GitHub · 110 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. 10d ago First seen · 110 lines · 117 tokens per session scan A c2a6dcd858b6

Subscribe to this mod's changes

check-loanword is a skill published in the GitHub repository ayutaz/piper-plus (204 stars, last pushed 8d ago), licensed MIT. It adds 117 tokens to every session and 1,666 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-08-30.

Related

Other skills, from other repositories

transform-model

Add a Hugging Face or local checkpoint to TensorRT-Model-Connect as a self-contained family, or extend the family that already owns it.

NVIDIA/TensorRT-Model-Connect · 33 tokens

compiler-port

Port a compiler pass from TypeScript to Rust. Gathers context, plans the port, implements in a subagent with test-fix loop, then reviews.

react/react · 35 tokens

migrate-xunit-to-xunit-v3

Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…

dotnet/skills · 149 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens

adk-setup

Sets up a local ADK Python development environment in a git clone of the open-source adk-python repository: a uv virtual environment, all dependency extras, pre-commit hooks, and a first unit-test run. Runs only when explicitly requested, never on its own. Use when asked to set up, bootstrap, or repair a development…

google/adk-python · 146 tokens

python

Python development with ruff, mypy, pytest - TDD and type safety.

alinaqi/maggy · 18 tokens