Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,19 @@
],
"version": "5.2.0"
},
{
"name": "notify-user-input",
"description": "macOS desktop notifications when Claude Code asks for user input",
"source": "./plugins/notify-user-input",
"category": "productivity",
"tags": [
"notification",
"macos",
"desktop",
"hooks"
],
"version": "5.2.0"
},
{
"name": "ralph-loop",
"description": "Continuous self-referential AI loops for interactive iterative development, implementing the Ralph Wiggum technique",
Expand Down
9 changes: 9 additions & 0 deletions plugins/notify-user-input/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "notify-user-input",
"version": "5.2.0",
"description": "macOS notification when Claude waits for user input",
"author": {
"name": "jito",
"email": "git@baleen.me"
}
}
11 changes: 11 additions & 0 deletions plugins/notify-user-input/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# notify-user-input

macOS notifications when Claude Code asks for user input.

## Installation

Part of baleen-plugins marketplace.

## Testing

Ask Claude something that requires confirmation - notification should appear.
28 changes: 28 additions & 0 deletions plugins/notify-user-input/hooks/ask-user-question.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
set -euo pipefail

INPUT=$(cat)
TOOL_NAME=$(echo "$INPUT" | jq -r '.tool_name // empty')

# Only process AskUserQuestion
if [[ "$TOOL_NAME" != "AskUserQuestion" ]]; then
exit 0
fi

# Extract question text
QUESTION_TEXT=$(echo "$INPUT" | jq -r '.questions[0].text // empty')

if [[ -z "$QUESTION_TEXT" ]]; then
exit 0
fi

# Truncate if too long
MAX_LENGTH=100
if [[ ${#QUESTION_TEXT} -gt $MAX_LENGTH ]]; then
QUESTION_TEXT="${QUESTION_TEXT:0:$MAX_LENGTH}..."
fi

# Send macOS notification
osascript -e "display notification \"$QUESTION_TEXT\" with title \"Claude Code\" sound name \"Glass\"" 2>/dev/null || true

exit 0
17 changes: 17 additions & 0 deletions plugins/notify-user-input/hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "../../../schemas/hooks-schema.json",
"description": "Notify when Claude asks for user input",
"hooks": {
"PreToolUse": [
{
"matcher": "AskUserQuestion",
"hooks": [
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/ask-user-question.sh"
}
]
}
]
}
}
Loading