Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

zh-writing-check

БесплатноЗапускает вложенные скриптыНе проверен

Check or polish Chinese text for clarity and naturalness (清晰、自然、地道) — 翻译腔, 长句, 的字堆叠, 啰嗦, 歧义, 术语不一致, 标点和中英文空格, and 和原文意思不一致 when an English source is given…

tsaolот tsaol★ 69 звёзд на GitHub

Об этом скилле

zh-writing-check

/zh-writing-check <file-or-folder> [--source-en <file-or-folder>] [--glossary <file>]
                  [--level plain|technical|formal] [--apply] [--reviewers deepseek,qwen,opus]

Pipeline: rules.py (offline, $0) → check.py (3 reviewers per chunk, in parallel) → decide.py (Opus editor picks the edits, script checks each one mechanically) → report.md + changes.diff → apply only if asked.

How to run

S=~/.claude/skills/zh-writing-check/scripts
PY=~/.local/share/claude-skills-venv/bin/python   # any python with boto3; rules.py needs no packages
OUT=~/tmp/zh-writing-check/<short-name>

# 0. free first pass (always do this; often enough for format problems)
$PY $S/rules.py <paths> [--glossary G] [--level L]

# 1. cost estimate, then the real check (stops if the estimate is over --budget, default $5)
$PY $S/check.py <paths> [--source-en SRC] [--glossary G] [--level L] [--reviewers ...] --out $OUT --estimate-only
$PY $S/check.py <paths> [--source-en SRC] [--glossary G] [--level L] [--reviewers ...] --out $OUT

# 2. editor step: writes $OUT/decisions.json + $OUT/changes.diff, changes nothing
$PY $S/decide.py $OUT

# 3. only after the user says yes (or --apply was given): apply exactly the edits in decisions.json
$PY $S/decide.py $OUT --apply            # backups in $OUT/backup/
$PY $S/decide.py $OUT --apply --target DIR   # or apply to a copy of the folder instead

Map the slash-command flags straight onto these scripts. Use --out under ~/tmp/.

  • --source-en: a file (for one input file) or a folder. A folder is matched by relative path, and x.zh.md ↔ x.en.md, README_CN.md needs the file given directly (--source-en README.md). Given the same folder as the input, workshop index.zh.md pages find their index.en.md twins. Folder input skips *.en.* files and files that are mostly English.
  • --glossary: Markdown table with a "Do not use / 禁用" column (for example a docs/zh-glossary.md in your repo), or lines 错误说法 => 推荐说法. Rules flag banned terms; reviewers and the editor treat the glossary as top priority.
  • --level: plain (default: short, simple sentences for engineers, about B1 — never make text more 文雅), technical (precise docs), formal (reports, external documents). Also sets the long-sentence limit (70/90/110 字).
  • --reviewers: default deepseek,qwen,opus. Also known: kimi, glm (may be throttled by a daily quota; a failed reviewer is reported, the others still count). Any Bedrock model as name=model-id.
  • Other: --space require|forbid|off (中英文之间空格的约定, default require), --max-chunk 6000, --budget 5, --rules-only, --region ap-northeast-1.

Credentials come from the normal AWS chain; never print or echo them. Text is sent to Bedrock as is (nothing masked), so do not run the model steps on files the user marked confidential unless they said Bedrock is OK for them.

How to read the report

$OUT/report.md (Chinese), per file:

  • 模型审校: each place as 原文 → each reviewer's 建议, with 类型, 必改/建议, 理由 and 提出:(which reviewers). Places several reviewers raised come first and are more trustworthy. ⚠ marks suggestions that touch code/links (the apply step will refuse to change those parts).
  • 规则(离线): deterministic findings. 格式 (空格, 标点, 全角) and 必改 (术语, 重复词) are reliable; 建议 (长句, 的字堆叠) is a judgement; 提示 (翻译腔信号) is a hint and may be a false alarm.
  • Cost line: actual tokens and $ per model. decide.py prints the editor cost.

Then read changes.diff yourself before showing it. Expect: DeepSeek and Qwen give many taste edits and sometimes wrong reasons; Opus is the most precise; the editor usually rejects half or more. If a kept edit changes meaning, fights the glossary, or only makes the text more formal, remove it from decisions.json (or tell the user) before applying.

What to show the user

Unless --apply was given: show a short summary (files, number of kept edits by type, cost), the most important edits from changes.diff (原文 → 改后), and ask before applying. With --apply: apply, then show what changed. After applying, run git diff (if in git) and rules.py again on the changed files.

Safety rules (built in — do not work around them)

  • Never change code blocks, inline code, commands, URLs, link targets, image lines, file names, numbers, front matter, HTML, or directive syntax (::alert[...]{...}, :::expand{...}, :::). The prose inside ::alert[...] may change.
  • decide.py applies an edit only if its old text occurs exactly once, it touches no protected span (tokens inside it must stay identical and in order), numbers stay the same, it adds no line breaks and does not overlap another edit; then the whole file's protected tokens must equal the original's, or nothing is written.
  • --apply always copies the original to $OUT/backup/ first; --apply reuses decisions.json, so what is applied is what the user saw (--redecide asks the editor again).
  • Do not apply
Полный SKILL.md на GitHub

Установить zh-writing-check в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

scripts/check.pyscripts/common.pyscripts/decide.pyscripts/mdmask.pyscripts/rules.py

FAQ

Что делает скилл zh-writing-check?

Check or polish Chinese text for clarity and naturalness (清晰、自然、地道) — 翻译腔, 长句, 的字堆叠, 啰嗦, 歧义, 术语不一致, 标点和中英文空格, and 和原文意思不一致 when an English source is given. Works on Markdown / text files or whole folders (e.g. workshop zh pages, README_CN, blog drafts). Free offline rule pass first, then three reviewers on Bedrock (DeepSeek V3.2 + Qwen3-235B, Chinese-native, + Claude Opus 5.5) and an Opus editor that keeps only real fixes. Report-only by default; applies edits only on request. Use when the user asks to check / review / proofread / 润色 / 检查中文表述 / 看看中文顺不顺, or runs /zh-writing-check.

Как установить скилл zh-writing-check?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл zh-writing-check запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить zh-writing-check с