ClaudeMods
☰
JA
● 0 人がオンライン ・閲覧 0 回
スポンサー作品を投稿
GitHub リポジトリ · 投稿者 Vatroslav

cc-mod-suggestion-sentence-case

Claude Code の mod です。prompt.suggest hook が、Tab で受け入れた薄い色のプロンプト候補を書き換え、大文字で始めてピリオドで終わる形にします。スラッシュコマンドはそのままです。

Vatroslav@Vatroslav

Vatroslav/cc-mod-suggestion-sentence-case/tree/main/plugin

翻訳済み

この mod について

Claude Code の mod です。ターンの後、Claude Code は空のプロンプトボックスに薄い文字で次のプロンプト候補を出し、Tab で受け入れられるようにします。候補は小文字で始まり、ピリオドがないことが多いため、プロンプトを文として書く場合は、受け入れるたびに送信前の修正が必要です。この mod は表示前に候補を書き換え、大文字で始め、ピリオドで終わらせます。

| Suggested | Shown | |---|---| | run the tests | Run the tests. | | why did it fail? | Why did it fail? | | čekaj da završi | Čekaj da završi. | | `npm test` again | `npm test` again. | | /commit | /commit |

ルール

  • 先頭の文字が英字の場合だけ大文字にします。コード、引用符、数字で始まる候補は先頭を変えません。
  • ., ?, !, …, : の後にはピリオドを追加しません。
  • スラッシュコマンドは完全にそのままです。
  • 両端のスペースを削除します。
  • 変わるのは候補だけです。入力または送信した内容には触れません。

仕組み

plugin/hooks/register.ts の1つの prompt.suggest hook がテキストを書き換え、next({ ...e, text }) で渡します。$ に対して何も呼び出しません。ファイル、プロセス、ネットワーク、モデル呼び出しはありません。

Claude Code 自身の候補と、別のプラグインが $.prompt.suggest 経由で提案した候補の両方を、すべて処理します。

インストール

claude plugin marketplace add <path-to-this-repo>
claude plugin install cc-mod-suggestion-sentence-case@cc-mod-suggestion-sentence-case --scope user

2.1.287 より前の Claude Code ビルドでは、インストールしたプラグインの function hook に ~/.claude/settings.json の env ブロックへ "CLAUDE_CODE_ENABLE_FUNCTION_HOOKS": "1" を追加する必要がある場合があります。Claude Desktop の Code タブで実機検証済みです。

確認とテスト:claude plugin validate ./plugin および claude plugin test ./plugin。

インストール

まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。

claude plugin marketplace add Vatroslav/cc-mod-suggestion-sentence-case
claude plugin install cc-mod-suggestion-sentence-case
原文 / README

cc-mod-suggestion-sentence-case

A Claude Code mod. After a turn, Claude Code proposes your next prompt as dim text in the empty prompt box, and Tab accepts it. The suggestion often comes in lowercase and without a full stop, so if you write your prompts as sentences, every accepted suggestion needs fixing before you send it. This mod rewrites the suggestion before it is shown: it starts with a capital letter and ends with a full stop.

| Suggested | Shown | |---|---| | run the tests | Run the tests. | | why did it fail? | Why did it fail? | | čekaj da završi | Čekaj da završi. | | `npm test` again | `npm test` again. | | /commit | /commit |

Rules

  • The first character is capitalized only if it is a letter. A suggestion that starts with code, a quote or a digit keeps its start.
  • No full stop is added after ., ?, !, … or :.
  • A slash command stays exactly as it is.
  • Spaces at either end are trimmed.
  • Only the suggestion changes. Nothing you type or send is touched.

How it works

One prompt.suggest hook in plugin/hooks/register.ts rewrites the text and passes it on with next({ ...e, text }). It calls nothing on $: no files, processes, network or model calls.

It handles every suggestion, both Claude Code's own and any that another plugin proposes through $.prompt.suggest.

Install

claude plugin marketplace add <path-to-this-repo>
claude plugin install cc-mod-suggestion-sentence-case@cc-mod-suggestion-sentence-case --scope user

On Claude Code builds before 2.1.287, function hooks of installed plugins may need "CLAUDE_CODE_ENABLE_FUNCTION_HOOKS": "1" in the env block of ~/.claude/settings.json. Verified live in the Code tab of Claude Desktop.

Check and test: claude plugin validate ./plugin and claude plugin test ./plugin.

関連作品