Documentation
Hook
Hooks
What reviewable-html-workbench runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.
Install
> /plugin marketplace add u-ichi/reviewable-html-workbench > /plugin install reviewable-html-workbench@reviewable-html-workbench-local
Ships with reviewable-html-workbench. Installing the plugin gets these hooks.
What fires, and when
PreToolUse
- Matches
ExitPlanModebash "${CLAUDE_PLUGIN_ROOT}/hooks/plan-preview-gate.sh" - Matches
EnterPlanModebash "${CLAUDE_PLUGIN_ROOT}/hooks/plan-preview-cleanup.sh"
Where it lives
- hooks/plan-preview-cleanup.shRunsGitHub
Read the script
#!/bin/bash set -uo pipefail INPUT=$(cat) TOOL_NAME=$(printf '%s' "$INPUT" | jq -r '.tool_name // empty' 2>/dev/null) SESSION_ID=$(printf '%s' "$INPUT" | jq -r '.session_id // empty' 2>/dev/null) if [[ "$TOOL_NAME" != "EnterPlanMode" ]] || [[ -z "$SESSION_ID" ]]; then exit 0 fi if [[ "$SESSION_ID" == *"/"* ]] || [[ "$SESSION_ID" == "." ]] || [[ "$SESSION_ID" == ".." ]]; then exit 0 fi SENTINEL="${TMPDIR:-/tmp}/claude-plan-preview/$SESSION_ID" # lint:allow-os-tmp rm -f "$SENTINEL" 2>/dev/null || true exit 0 - hooks/plan-preview-gate.shRunsGitHub
Read the script
#!/bin/bash set -uo pipefail INPUT=$(cat) TOOL_NAME=$(printf '%s' "$INPUT" | jq -r '.tool_name // empty' 2>/dev/null) SESSION_ID=$(printf '%s' "$INPUT" | jq -r '.session_id // empty' 2>/dev/null) if [[ "$TOOL_NAME" != "ExitPlanMode" ]] || [[ -z "$SESSION_ID" ]]; then exit 0 fi if [[ "$SESSION_ID" == *"/"* ]] || [[ "$SESSION_ID" == "." ]] || [[ "$SESSION_ID" == ".." ]]; then exit 0 fi SENTINEL="${TMPDIR:-/tmp}/claude-plan-preview/$SESSION_ID" # lint:allow-os-tmp if [[ -e "$SENTINEL" ]]; then exit 0 fi LATEST_PLAN="" shopt -s nullglob for PLAN_FILE in "$HOME"/.claude/plans/*.md; do if [[ -z "$LATEST_PLAN" ]] || [[ "$PLAN_FILE" -nt "$LATEST_PLAN" ]]; then LATEST_PLAN="$PLAN_FILE" fi done shopt -u nullglob if [[ -n "$LATEST_PLAN" ]] && grep -Eq 'Plan preview: (unavailable|http)' "$LATEST_PLAN"; then exit 0 fi printf '%s\n' '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"ExitPlanMode requires a plan preview. Add `Plan preview: <url>` or `Plan preview: unavailable (<reason>)` to the plan before exiting Plan Mode."}}' exit 0
Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.
Ships withreviewable-html-workbench
A Claude Code / Codex CLI plugin that lets you review agent-generated HTML documents with inline comments — and have the agent read those comments, reply, and improve the document in the next iteration.
Get the whole plugin

