Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude loads one when your task matches it, or you run it by name.
Claude Code asks for these when you enable the plugin. Sensitive values are stored in your system keychain.
handoff 作成を促す context 使用率 (%)threshold
context 使用率がこの値以上になったとき、handoff ドキュメントの作成を促す (1〜99)
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
context 使用率が閾値を超えたときに handoff ドキュメントの作成を促します。作成された handoff は
次の session start で自動注入され、context 圧縮や /clear を挟んでも直前までの作業を引き継げる
ようにします。
v1.0.0
producer と consumer で構成されます。
detect-context-threshold.sh, PostToolUse / PostToolUseFailure): context
使用率が閾値 (既定 75%) を超えたことをツール実行のたびに検知し、超えていれば handoff
ドキュメントの作成を Claude に促す指示を注入するinject-pending-handoff.sh, SessionStart): 新しい context になる clear /
startup で、直近 24 時間以内に作成された未消費の handoff があれば、その内容を前置き文とともに
自動注入する*)tool_response は参照しない)。出力の hookSpecificOutput.hookEventName は入力の
hook_event_name をそのまま返すupdated_at (欠落時はファイル mtime) が
600 秒より古い場合、producer 停止中とみなして検知しない (statusline が構成解除された後に
残った古い値での誤通知・検知抑止を防ぐ)mkdir による atomic 操作で行うため、並列なツール実行があっても通知は
1 回しか発行されないclear|startup)clear / startup で既存 pending 全般を対象にする<git-dir>/session-handoff/ 配下の pending-*.md (mtime 24 時間以内のもの)。
30 日を超えたファイルは best-effort で削除するpending- → consumed-)
の atomic 性により同じ handoff が 2 重に注入されることはない。ただし、claim (rename) の
直後・出力の直前にプロセスが異常終了した場合、その handoff は「消費済み」のまま失われる
(再送しない割り切り)consumed-*.md) の絶対パスを Read で
全文読了するよう指示する定型文に置き換える (残り pending の列挙は維持する)。このとき handoff
ファイルは consumed 側に残る。Claude Code が additionalContext を 10,000 文字で打ち切るため、
余裕を持たせた上限にしている検知 hook が読む context 使用率は、自プラグインでは取得できません。以下のいずれかで
${TMPDIR:-/tmp}/natsuume-context-cache-<uid>/<session_id>.json にキャッシュが書き出されている
ことが前提です。
statusLine.command に登録している (通常の利用経路)/session-handoff:setup で cache 専用の
安定 launcher を登録する (下記)キャッシュが無い/古い間、検知 hook は無音でスキップします (エラーにはなりません)。
/session-handoff:setup は、context 使用率キャッシュの producer を用意するための任意の
セットアップです。現在の ~/.claude/settings.json の statusLine.command を分類し、以下の
いずれかを行います。
~/.claude/session-handoff-statusline-launcher.sh) を設置する。設置前に承認を得る他の statusline を包む前に、1 段の連鎖検査を行います。既存の statusline が指すスクリプト
ファイルの中に、(a) 自 launcher ファイル名への平文参照、または (b) 既知形式の base64 代入行
(例: rate-limit の INNER_COMMAND_B64=...) を decode した中身への参照、のいずれかが見つかった
場合は「既にラップ済み」と判断して再ラップせず、連鎖の存在を報告するに留めます。代入行はあるが
decode に失敗し、かつ自 launcher が既に存在する場合は、循環リスクありとして変更せず曖昧な連鎖を
報告します。
連鎖検査は setup 時点の静的な検査であり、検査をすり抜けた循環構成 (例えば手動編集や他 plugin の
将来変更) が万一残っていた場合の安全網として、launcher は実行時にも固有名の環境変数
(NATSUUME_SESSION_HANDOFF_LAUNCHER_ACTIVE) で自己再帰を検知します。既に設定済みなら何も出力
せず正常終了するため、無限再帰・ハングにはなりません (ただし循環構成が残っている間、表示は
空になります)。
~/.claude/session-handoff-statusline-launcher.sh) を生成して登録し、launcher が実行時に
plugin cache から session-handoff 最新版の scripts/context-cache-dump.sh を解決します
(/plugin update 後も再 setup 不要)閾値は plugin の設定項目 (userConfig) で変更します。
| 項目 | 意味 | 既定値 |
|---|---|---|
threshold | 検知 hook が handoff 作成を促す context 使用率 (%)。1〜99 の数値 (小数可)。範囲外・非数値の場合は既定値を使う | 75 |
/config パネルの「handoff 作成を促す context 使用率 (%)」の行から変更できます (Claude Code v2.1.269 以降)。
値は ~/.claude/settings.json の pluginConfigs に保存されるため、次のように直接書いても設定できます。
{
"pluginConfigs": {
"session-handoff@natsuume-plugins": {
"options": {
"threshold": 80
}
}
}
}
Claude Code は pluginConfigs を user settings (~/.claude/settings.json) と managed settings からだけ
読みます。project の .claude/settings.json や .claude/settings.local.json に書いた値は使われません。
repository root で次を実行します。
npx claudepluginhub natsuume/natsuume-cc-marketplace --plugin session-handoffBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground