日本語の表記ゆれチェック(行番号と統一案つき)
Japanese text consistency check with line numbers and unified forms
日本語の文書から「一番/1番」「できる/出来る」「サーバ/サーバー」、全角・半角の混在、です・ます調とだ・である調の混在などの表記ゆれを見つけ、行番号と統一案を一覧にします。
できること
日本語の文書(Markdown・テキスト・HTML)を読み取り専用で調べ、表記ゆれを行番号・列番号つきで報告します。
- 「一番/1番」「できる/出来る」「ください/下さい」「お断り/おことわり」「ご容赦ください/ご了承ください」「お問い合わせ/お問合せ」などの表記の混在
- 「サーバ/サーバー」「ユーザ/ユーザー」など長音の有無(ルールにない単語も、同じ文書内で両方の書き方があれば自動で検出)
- 全角と半角の英数字の混在、半角カタカナ
- です・ます調とだ・である調の混在(文末からの推定)
- コードブロック・インラインコード・URL・HTML タグは対象外にします
ルールは編集できる JSON ファイル(references/rules.json)にまとまっていて、社内の表記ルールに合わせて「どちらに統一するか」「混在時だけ指摘するか、常に指摘するか」を変更できます。エージェントは結果を文脈で確認し、誤検出を除いたうえで報告します。
使い方
python scripts/jp_consistency.py docs/ README.md --out report.md
python scripts/jp_consistency.py docs/ --format json --out report.json --rules my-rules.json
Claude・Codex・Hermes Agent・Cursor に「この文書の表記ゆれをチェックして」と頼むと、スクリプトを実行し、確認済みの指摘・統一案・人の判断が必要な箇所を一覧にします。修正は頼んだときだけ行います。
必要な環境
- Python 3(標準ライブラリのみ)
- 文字コードは UTF-8(Shift_JIS も読み込み可)
注意点
- 機械的な検出なので、順位の「1番」、意味が違う「ご容赦/ご了承」、引用文や固有名詞などは人の判断が必要です。
- 文体の判定は文末の形による推定で、体言止めの文などは判定しません。
- 集計はファイルごとです。複数ファイルにまたがるゆれは JSON 出力から確認してください。
- 元のファイルは書き換えません。
English description
Find notation inconsistencies in Japanese documents, such as kanji vs kana spellings, long vowel variants, full-width digits and mixed sentence styles, with line numbers and a proposed unified form.
What it does
Checks Japanese documents (Markdown, text, HTML) read-only and reports notation inconsistencies with line and column numbers.
- Mixed spellings such as ichiban in kanji vs "1-ban", dekiru and kudasai in kana vs kanji, okotowari in kanji vs kana, "please forgive" vs "please acknowledge" phrasing, and okurigana variants of inquiry and application
- Katakana words with and without the trailing long vowel mark (server, user and more), including words that are not in the rules file but appear both ways in the same document
- Full-width and half-width digits and letters mixed together, and half-width katakana
- Polite desu/masu sentences mixed with plain da/dearu sentences (estimated from sentence endings)
- Code blocks, inline code, URLs and HTML tags are skipped
All rules live in an editable JSON file (references/rules.json), so you can set the preferred form and choose between reporting only when variants are mixed or always enforcing a house style. The agent reviews each hit in context, removes false positives and reports the result.
How to use
python scripts/jp_consistency.py docs/ README.md --out report.md
python scripts/jp_consistency.py docs/ --format json --out report.json --rules my-rules.json
Ask Claude, Codex, Hermes Agent or Cursor to check a document for notation variants. The agent runs the script and lists confirmed findings, proposed unified forms and items that need a human decision. It edits files only when asked.
Requirements
- Python 3 (standard library only)
- UTF-8 text (Shift_JIS files can also be read)
Caveats
- Detection is mechanical: ranking numbers, wording with different meanings, quotations and proper nouns need human judgment.
- Sentence style is estimated from sentence endings; sentences ending in a noun are not classified.
- Counts are per file; check the JSON output for variants spread across files.
- Input files are never modified.
インストール方法
- ダウンロードしたZIPを展開します(中に
japanese-text-consistency-check/フォルダとSKILL.mdがあります)。 - フォルダごと、使うエージェントのスキル置き場にコピーします。
- Claude:
~/.claude/skills/(プロジェクト単位なら.claude/skills/) - Hermes Agent:
~/.hermes/skills/ - Codex:
~/.agents/skills//Cursor:~/.cursor/skills/ - Claude アプリ(claude.ai):「カスタマイズ → スキル」からZIPをアップロード
- Claude:
- エージェントを再起動し、スキル一覧に表示されることを確認します。
出品者
出品スキル 44 件