#!/bin/bash # Team dashboard reminder (SessionStart + UserPromptSubmit). # If this project has a "Live status page:" URL, remind Claude to run the # team-dashboard skill loop. Prints nothing in other projects. input=$(cat) event=$(printf '%s' "$input" | jq -r '.hook_event_name // "UserPromptSubmit"') dir=$(printf '%s' "$input" | jq -r '.cwd // empty') [ -z "$dir" ] && dir="$PWD" url="" d="$dir" # Walk up to 3 levels so it also works from a subfolder like site/. for _ in 1 2 3 4; do for f in "$d/CLAUDE.md" "$d/reports/status.md" "$d/reports/launch.md"; do [ -f "$f" ] || continue url=$(grep -m1 -oE 'Live status page:[^h]*https://claude\.ai/[^ )]+' "$f" | grep -oE 'https://claude\.ai/[^ )]+') [ -n "$url" ] && break 2 done d=$(dirname "$d") done [ -z "$url" ] && exit 0 if [ "$event" = "SessionStart" ]; then msg="This project has a live team dashboard: $url. Load the team-dashboard skill and follow its section 2 loop all session. First read the CEO's 'answers' and unread 'chat' (read == false) with ArtifactData and act on them, then keep agents, the board and the conversation current." else msg="Team dashboard ($url): before replying, check ArtifactData 'answers' and unread 'chat' for CEO input. After any agent start or report, or anything that lands, update agents/board/chat per the team-dashboard skill (one batch, with if_version)." fi jq -n --arg e "$event" --arg m "$msg" '{hookSpecificOutput:{hookEventName:$e, additionalContext:$m}}'