なぜ設定するのか
入力欄の下に、今のモデルとコンテキストの使用率が常に出ます。圧縮(compact)が近いことに気づけるので地味に効きます。
この例は jq が必要です。標準入力に JSON が来るので、任意のスクリプトに差し替えられます。
設定方法
~/.claude/settings.jsonを開く(なければ作る)- スニペットを JSON の中に統合する。既存の設定は消さず、キーを足す形で入れる
- Claude Code を起動し直す
- 既定値
- 未設定(表示なし)
- 書く場所
~/.claude/settings.json- 型
- object with
typeset to"command"and acommandstring, plus optionalpaddingas a number of characters,refreshIntervalas a number of seconds, minimum1, andhideVimModeIndicatoras 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.