feat: add claude-yap fun notification hook#506
feat: add claude-yap fun notification hook#506zehnlyai-main wants to merge 1 commit intodavila7:mainfrom
Conversation
Fun, customizable desktop notifications for Claude Code with: - Random cheerful messages from 5 message packs (default, casual, formal, anime, pirate) - Auto-detection of 11+ editors/terminals (VS Code, Cursor, Antigravity, Windsurf, etc.) - Customizable name prefix, sounds, and messages via config - macOS (terminal-notifier) and Linux (notify-send) support - Two hook events: Stop (task done) and Notification (needs approval) Install: npx claude-code-templates@latest --hook automation/claude-yap Repo: https://github.com/zehnlyai-main/claude-yap Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@shoxurhmirzo is attempting to deploy a commit to the Daniel Avila's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
2 issues found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="cli-tool/components/hooks/automation/claude-yap.json">
<violation number="1" location="cli-tool/components/hooks/automation/claude-yap.json:10">
P0: Supply-chain risk: this hook auto-clones and executes an unpinned external repository. Unlike every other hook in this directory (which use self-contained inline commands), this downloads and runs arbitrary code from a third-party GitHub repo at `HEAD`. The repo owner can change `claude-yap.sh` at any time and all users will silently execute it.
At minimum, pin to a specific commit SHA (`git clone` then `git -C checkout <sha>`) and add a note about the external dependency. Ideally, inline the notification logic like the other hooks do, or vendor the script into this repo so it goes through code review.</violation>
<violation number="2" location="cli-tool/components/hooks/automation/claude-yap.json:10">
P2: Hook auto-install logic checks only directory existence, so partial/corrupt installs are not recovered and failures are silently masked.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| @@ -0,0 +1,27 @@ | |||
| { | |||
There was a problem hiding this comment.
P0: Supply-chain risk: this hook auto-clones and executes an unpinned external repository. Unlike every other hook in this directory (which use self-contained inline commands), this downloads and runs arbitrary code from a third-party GitHub repo at HEAD. The repo owner can change claude-yap.sh at any time and all users will silently execute it.
At minimum, pin to a specific commit SHA (git clone then git -C checkout <sha>) and add a note about the external dependency. Ideally, inline the notification logic like the other hooks do, or vendor the script into this repo so it goes through code review.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At cli-tool/components/hooks/automation/claude-yap.json, line 10:
<comment>Supply-chain risk: this hook auto-clones and executes an unpinned external repository. Unlike every other hook in this directory (which use self-contained inline commands), this downloads and runs arbitrary code from a third-party GitHub repo at `HEAD`. The repo owner can change `claude-yap.sh` at any time and all users will silently execute it.
At minimum, pin to a specific commit SHA (`git clone` then `git -C checkout <sha>`) and add a note about the external dependency. Ideally, inline the notification logic like the other hooks do, or vendor the script into this repo so it goes through code review.</comment>
<file context>
@@ -0,0 +1,27 @@
+ "hooks": [
+ {
+ "type": "command",
+ "command": "if [ ! -d \"$HOME/.claude-yap\" ]; then echo 'Installing claude-yap...' && git clone --depth 1 https://github.com/zehnlyai-main/claude-yap.git \"$HOME/.claude-yap\" 2>/dev/null && chmod +x \"$HOME/.claude-yap/claude-yap.sh\"; fi; \"$HOME/.claude-yap/claude-yap.sh\" stop 2>/dev/null; true"
+ }
+ ]
</file context>
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": "if [ ! -d \"$HOME/.claude-yap\" ]; then echo 'Installing claude-yap...' && git clone --depth 1 https://github.com/zehnlyai-main/claude-yap.git \"$HOME/.claude-yap\" 2>/dev/null && chmod +x \"$HOME/.claude-yap/claude-yap.sh\"; fi; \"$HOME/.claude-yap/claude-yap.sh\" stop 2>/dev/null; true" |
There was a problem hiding this comment.
P2: Hook auto-install logic checks only directory existence, so partial/corrupt installs are not recovered and failures are silently masked.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At cli-tool/components/hooks/automation/claude-yap.json, line 10:
<comment>Hook auto-install logic checks only directory existence, so partial/corrupt installs are not recovered and failures are silently masked.</comment>
<file context>
@@ -0,0 +1,27 @@
+ "hooks": [
+ {
+ "type": "command",
+ "command": "if [ ! -d \"$HOME/.claude-yap\" ]; then echo 'Installing claude-yap...' && git clone --depth 1 https://github.com/zehnlyai-main/claude-yap.git \"$HOME/.claude-yap\" 2>/dev/null && chmod +x \"$HOME/.claude-yap/claude-yap.sh\"; fi; \"$HOME/.claude-yap/claude-yap.sh\" stop 2>/dev/null; true"
+ }
+ ]
</file context>
Summary
Adds claude-yap — fun, customizable desktop notifications for Claude Code.
~/.claude-yap/config.jsonterminal-notifier) and Linux (notify-send) supportInstall
How it works
~/.claude-yap/~/.claude-yap/config.json(name prefix, message pack, sounds, editor)Example notifications
Repo: https://github.com/zehnlyai-main/claude-yap
Summary by cubic
Adds a new
claude-yapnotification hook component to send fun desktop alerts on Stop and Notification events. Improves developer feedback with auto-install and macOS/Linux support.cli-tool/components/); addedhooks/automation/claude-yap.jsonfor desktop notifications.zehnlyai-main/claude-yapto~/.claude-yapon first run and invokesclaude-yap.shfor Stop/Notification.terminal-notifier) and Linux (notify-send); auto-detects common editors/terminals; configurable via~/.claude-yap/config.json.docs/components.json; no new environment variables or secrets.Written for commit b5a227e. Summary will update on new commits.