0xGondarxyz/claude-code-mods/tree/main/dashless
dashless
Claude の返信、Write/Edit ツールの内容、git commit / gh pr メッセージから em dash と en dash を確定前に取り除き、ステータス行に件数を表示する Claude Code プラグインです。
この mod について
dashless
Claude が書く内容から、確定前に em dash を取り除きます。TypeScript 約 80 行です。
| 場所 | 修正するもの |
| --- | --- |
| Write ツール | ファイルの内容 |
| Edit ツール | new_string のみ(old_string はファイルと一致する必要があるため、触りません) |
| Bash | git commit と gh pr / gh issue の create、edit、comment のみ。他のコマンドはそのまま実行 |
| 返信 | 保存前の Claude の返信にあるテキストブロック |
書き換え規則:
| 入力 | 出力 |
| --- | --- |
| 単語の間の em dash | カンマ区切りの形 |
| 行頭の em dash | 削除し、インデントは維持 |
| 行末の em dash | 削除 |
| 空白で囲まれた en dash | カンマ区切りの形 |
| 数値範囲の en dash | 変更しない |
| --force、-- file | 変更しない |
ステータス行には累計件数 dashless: 3 em dashes fixed が表示されます。
使い捨ての git リポジトリで同じプロンプトを2回実行してテストしました(ファイルを書き、コミットし、em dash を1つ含む文で返信するテストをそれぞれ行います)。プラグインなしでは em dash が 4 個残り、ありでは 0 個でした。
テストの実行:claude plugin test dashless
インストール
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add 0xGondarxyz/claude-code-mods claude plugin install dashless
原文 / README
dashless
Removes em dashes from what Claude writes, before it lands. About 80 lines of TypeScript.
| Where | What gets fixed |
| --- | --- |
| Write tool | the file content |
| Edit tool | new_string only (old_string must match the file, so it is never touched) |
| Bash | only git commit and gh pr / gh issue create, edit, comment; every other command runs as is |
| Replies | text blocks in Claude's responses, before they are stored |
Rewrite rules (<code>—</code> is the em dash, <code>–</code> the en dash):
<!-- Dashes in this file are HTML entities on purpose. With literal characters, dashless rewrites its own examples whenever Claude edits this file. -->| Input | Output |
| --- | --- |
| <code>a — b</code>, <code>a—b</code> | a, b |
| <code>— item</code> at line start | item (indentation kept) |
| <code>done —</code> at line end | done |
| <code>note: — x</code> | note: x |
| <code>a – b</code> (spaced en dash) | a, b |
| <code>1990–2000</code> (range) | unchanged |
| --force, -- file | unchanged |
The status line shows a running count: dashless: 3 em dashes fixed.
Tested by running the same prompt twice in a throwaway git repo (write a file, commit it, reply with a sentence, each with an em dash). Without the mod 4 em dashes landed; with it, 0.
Run its tests: claude plugin test dashless
