Skip to content
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.

From plugin
reviewable-html-workbench
3033 skills1 hook

Claude Code

> /plugin marketplace add u-ichi/reviewable-html-workbench
> /plugin install reviewable-html-workbench@reviewable-html-workbench-local

What fires, and when

PreToolUse

  • MatchesExitPlanModebash "${CLAUDE_PLUGIN_ROOT}/hooks/plan-preview-gate.sh"
  • MatchesEnterPlanModebash "${CLAUDE_PLUGIN_ROOT}/hooks/plan-preview-cleanup.sh"
Read hooks/hooks.json

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.

@u-ichi
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.

Stars on GitHub

Momentum

stars in total
303
Star history of u-ichi/reviewable-html-workbench on GitHub, a chart by star-history.com

More plugins that ship hooks.

claude-code-mastery

claude-code-mastery

Gives you a guide to setting up Claude Code, covering global instructions, MCP servers, custom commands, hooks and skills, plus tools for generating commit messages and auditing code for security issues. This version is marked obsolete, with a newer starter kit recommended instead.

2 skills+2560
@thedecipherist@thedecipherist
Install Plugin
okf

okf

Gives your coding agent skills to author, maintain, validate and visualize Open Knowledge Format bundles, portable markdown knowledge that both your team and your agents can read. Includes a backfill skill for building a bundle from an existing repository's git history and session transcripts.

4 skills+3453
@scaccogatto@scaccogatto
Install Plugin
claudeforge

claudeforge

Automatically creates, enhances and maintains CLAUDE.md files for Claude Code projects, so you don't have to write and update them by hand.

3 hooks+1434
@alirezarezvani@alirezarezvani
Install Plugin
filetree

filetree

A Claude Code plugin that maintains FILETREE.md, a one-line description per file with content hashes for staleness detection. Lets the LLM grasp repo layout in a few hundred tokens before touching code.

1 skill+2163
@nekocode@nekocode
Install Plugin
fluencyloop

fluencyloop

Keeps you fluent in code that AI writes: each feature is designed, built with the reasoning behind each decision explained, and recorded as docs, decisions and review summaries, so the understanding stays with the code.

6 skills1 hook46
@baokhang83@baokhang83
Install Plugin
d2

d2

A Claude Code plugin that reads your codebase and draws its infrastructure and architecture with D2, then keeps those diagrams in step with the code as it changes. Command: /d2:diagram.

1 skill+218
@heathdutton@heathdutton
Install Plugin
trigger-tree

trigger-tree

Shows which docs your AI agent actually discovers, using local telemetry with no token cost. Includes a CI gate that fails a pull request with the affected file and a suggested fix.

1 skill4 hooks16
@hedde@hedde
Install Plugin

Questions about the hooks in reviewable-html-workbench.

Which coding agents can use the hooks in reviewable-html-workbench?
The hooks in reviewable-html-workbench install in Claude Code and Cursor: each runs Claude Code hooks from .claude/settings.json, so copy the hooks there.