なぜ設定するのか

入力欄の下に、今のモデルとコンテキストの使用率が常に出ます。圧縮(compact)が近いことに気づけるので地味に効きます。

この例は jq が必要です。標準入力に JSON が来るので、任意のスクリプトに差し替えられます。

設定方法

  1. ~/.claude/settings.json を開く(なければ作る)
  2. スニペットを JSON の中に統合する。既存の設定は消さず、キーを足す形で入れる
  3. Claude Code を起動し直す
既定値
未設定(表示なし)
書く場所
~/.claude/settings.json
型
object with type set to "command" and a command string, plus optional padding as a number of characters, refreshInterval as a number of seconds, minimum 1, and hideVimModeIndicator as a Boolean
置ける場所
Any file

公式ドキュメントの説明

Run your own command to render a status line below the prompt with context such as the model, cost, or git branch. Optional fields adjust spacing, add periodic re-runs, and hide the built-in vim mode indicator when your script renders vim.mode itself.

公式リファレンスを見る