一键导入
show-mp-script
// Surfaces the MP_SCRIPT_* marker lines that the plugin-level SessionStart hooks emitted, to determine whether ${CLAUDE_PLUGIN_ROOT}/hooks/marker.sh actually launched in each command-form variant on the current install path.
// Surfaces the MP_SCRIPT_* marker lines that the plugin-level SessionStart hooks emitted, to determine whether ${CLAUDE_PLUGIN_ROOT}/hooks/marker.sh actually launched in each command-form variant on the current install path.
Mac Cowork で、plugin-level SessionStart hook(host 側)から $CLAUDE_PLUGIN_DATA に書いた値が「別の chat session を跨いで」残るかを検証する probe。書き込み&読み戻しは hook(persist.sh)側で行い、その結果は SessionStart の stdout として context に出る。この skill body は対比用に「VM Bash 側から DATA が見えるか/hook が書いたファイルを読めるか」を確認する。
Surfaces UPE_PROBE_* marker lines to test whether the plugin-level UserPromptExpansion hook fires on Cowork. Invoking this skill via slash is itself the trigger; compares against UserPromptSubmit and SessionStart controls.
Triggers the plugin-level PreToolUse hooks by running a sentinel bash command, to test (via session export) whether Cowork runs PreToolUse hook commands through cmd.exe or a POSIX shell, and whether the inline block pattern actually blocks the bash tool.
Surfaces the EXEC_* marker lines emitted by the plugin-level SessionStart hooks, which run hook commands in EXEC FORM (args present). Used to test whether exec form resolves ${CLAUDE_PLUGIN_ROOT} to a real path and exports it as an env var on Cowork, where shell form (§2.1/§2.2) failed both.
Shows what skill-body CLAUDE_PLUGIN_ROOT and friends substitute to on Mac Cowork, whether the VM Bash tool can use that path, and whether the Read tool can read a bundled file at that host path.
Proves whether a skill frontmatter PreToolUse Bash hook fires on Cowork by emitting only a block decision (no echo). A marked bash should be blocked even though no frontmatter stdout surfaces.
| name | show-mp-script |
| description | Surfaces the MP_SCRIPT_* marker lines that the plugin-level SessionStart hooks emitted, to determine whether ${CLAUDE_PLUGIN_ROOT}/hooks/marker.sh actually launched in each command-form variant on the current install path. |
| user-invocable | true |
このプラグインの plugin-level SessionStart hook が session 開始時に 5 種類のエントリを実行しています。直前の context(system-reminder / additional context / hook output として注入されたもの)から、以下のプレフィックスで始まる行を全て一字一句そのまま貼ってください。プレフィックスが見当たらない場合は「無し」と明記してください。
MP_SCRIPT_CONTROL= (変数なしの対照、必ず出るはず)MP_SCRIPT_ECHO_BARE= (top-level echo ${CLAUDE_PLUGIN_ROOT}、裸)MP_SCRIPT_ECHO_SQ= (top-level echo '${CLAUDE_PLUGIN_ROOT}'、single-quote で shell 展開を抑止)MP_SCRIPT_MARKER form=topbare ... (top-level の "${CLAUDE_PLUGIN_ROOT}/hooks/marker.sh" topbare が起動した場合のみ marker.sh が echo する)MP_SCRIPT_MARKER form=bashbrace ... (bash -c '"$CLAUDE_PLUGIN_ROOT/hooks/marker.sh" bashbrace' が起動した場合のみ marker.sh が echo する)判定の見方:
MP_SCRIPT_CONTROL が無い = そもそも plugin-level SessionStart hook が surface していない(観測基盤側の問題、§2.10 系)。MP_SCRIPT_ECHO_BARE の値が実パス = 当該 install 経路で env シェル展開が効いている。空 or literal ${CLAUDE_PLUGIN_ROOT} = 効いていない。MP_SCRIPT_ECHO_SQ の値が literal ${CLAUDE_PLUGIN_ROOT} = 事前置換が走っていない。実パスに置換されていたら事前置換が走っている証拠。MP_SCRIPT_MARKER form=topbare の行が出ている = top-level の "${CLAUDE_PLUGIN_ROOT}/hooks/marker.sh" が実際にスクリプトを起動できた。MP_SCRIPT_MARKER form=bashbrace の行が出ている = bash -c wrap 経由でスクリプトを起動できた。マーカー行を貼った後に、各変種の verdict を 1 行ずつ簡潔にコメントしてください(例:「ECHO_BARE: 実パス resolve / MARKER topbare: 起動した / MARKER bashbrace: 起動しなかった」)。